Introducing PowerManager

David Zeuthen david at fubar.dk
Fri Jan 7 08:54:10 PST 2005


Hi,

Sorry for the lag,

On Tue, 2005-01-04 at 21:15 +0000, Richard Hughes wrote:
> Davyd Madeley (not me, although I'm helping) has began work on
> PowerManager [http://live.gnome.org/PowerManager] - A solution to the
> gnome/kde > hal > acpi/pmu/etc problem.
> 
> Basically I wanted some feedback.
> 
> HAL would be queried for for example /proc/acpi/ac_adapter (not done), and

Yes, there are plans to add hal device objects for the presence of ACPI
things like batteries, buttons, ac_adapters and so forth.

> PowerManager would handle all the high level configuration. HAL could then
> be populated by PowerManager itself.
> 

I'm not really sure what you mean by high level configuration and I'm
not
really sure what PowerManager would do. My thinking on this problem is
basically that

 1. Have HAL export the interesting objects from ACPI

 2. If polling is required for e.g. a battery, start some process that
    updates the values for e.g. battery levels

 3. Export methods on the org.freedesktop.Hal.Device.<somename>
interface
    that maps to certain binaries. This would include SetLCDBrightness
(),
    Standby() etc.

 4. Desktop level applications simply queries HAL for values and invokes
    applications as appropriate.

Right now I'm working on infrastructure to support 2. and 3. in a way
such that it's easy to support various backends; e.g. for 3.: depending 
on the make of the laptop SetLCDBrightness() needs to be implemented in
various ways. For 2.: batteries are polled in various ways.

Now, I'm not sure moving all this to a separate D-BUS service
(PowerManager)
and so forth is the way to go - it just seems like extra work. But maybe
I'm
missing something?

Cheers,
David

_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list