Quantcast
Channel: [In]effective Theory
Viewing all articles
Browse latest Browse all 53

A Lighter Pommed

$
0
0

One of my main gripes with running linux (Arch w/ dwm) on a macbook pro is that the hotkeys handler daemon is a bloated, half-decade-old, mildly bitrotted clunker from debian: pommed. The two major features I view as unnecessary:

  • It comes with two clients - one for gnome, and one for windowmaker - with which it communicates via dbus. This adds a couple thousand lines of C and a dbus dependency.

  • It also supports automatically changing the brightness of the various backlights depending on the value reported by the built-in ambient light sensor. This particular feature is difficult to configure well or properly disable.

I don't think it's a coincidence that these two are also the source of the two major bugs I've encountered. The first bug: pommed goes into an endless loop if dbus is not running, each time writing a single entry to the configured log (syslog, for me). Thus, if I want to be able to use my hard drive, I need dbus, despite the fact that there's no actual dependency if I'm not using gnome or windowmaker. The second: under some conditions (when the ambient light sensor isn't functioning correctly, perhaps?), pommed thinks it receives a new ambient light event once or twice a second. Fortunately, these aren't logged except in debug mode, but they do keep pommed steady at 2% CPU usage, and mildly damage battery life.

The solution is obvious - cut the unnecessary "features". I've created a stripped-down version of pommed, pommed-light, which supports 90% of the use cases with 90% fewer bugs.


Viewing all articles
Browse latest Browse all 53

Latest Images

Trending Articles





Latest Images