Device-Kit Will Replace HAL in GNOME
By Qing-Ming Jeff Cai on Nov 27, 2008
During the GNOME 2.25 release cycle, GNOME Power Manager will be moved from a HAL dependency and on to a new DeviceKit-power dependency.
DeviceKit-power is a new mechanism daemon that moves the battery profiling and statistics interface system-wide, and also does the history recording once per system, rather than once per session. It also moves to an interface that is legacy-free and is more focused on the entire power management system thatn HAL ever was.
HAL has grown into a mega-daemon doing a little bit of everything, it evolved with DBUS over a number of years and is now pretty horrible code.
HAL also has a very low level interface, and so apps needed tons of complicated code in the session to do simple things like work out remaining battery lifetime.
DeviceKit-Power also implements a Qos interface for latency control, and in the future will be used for aggressive application power control. This is needed to produce a desktop that uses little power when idle, but doesn't feel sluggish.
DeviceKit is a very small simple daemon that is basically a thin wrapper over udev.
It's designed to be very easy to implement for Solaris and FreeBSD, and
you could even do it in a few hundred lines of python, if you knew all
the hardware details about those platforms. You would just have to
populate a directory tree that looked like a power_supply class under
Linux and everything would "just work" assuming there was something on
those platforms that could parse the trivial udev rules .
One option that might be best (but slightly controversial) would be for
FreeBSD or Solaris to present a Linux compatible /sys device tree,
either populated in userspace, or better, in the kernel.