Introducing PowerManager
Richard Hughes
ee21rh at surrey.ac.uk
Fri Jan 7 09:27:30 PST 2005
On Fri, 07 Jan 2005 11:54:10 -0500, David Zeuthen wrote:
>
> Hi,
>
> Sorry for the lag,
No problem.
>
> Yes, there are plans to add hal device objects for the presence of ACPI
> things like batteries, buttons, ac_adapters and so forth.
Plans? Or code? I think I could help with code. There's been so much
discussion about a simple battery, but I don't want to duplicate other
peoples work or tread on other peoples toes. See my post about mapping the
ACPI bus? Anyone got any code that I can look at? Anything in CVS?
> ... 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
Proper services (ala init.d) or just a simple program (shell script?) that
sleeps lots, then updates hal?
Will these mini-services be in HAL or as an extra package? I think they
should be in HAL proper for maintainability reasons.
>
> 3. Export methods on the org.freedesktop.Hal.Device.<somename>
> interface
> that maps to certain binaries. This would include SetLCDBrightness
> (),
> Standby() etc.
Binaries or shell-scripts? Wouldn't scripts be more flexible?
>
> 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?
My personal opinion is that PowerManager will only be needed if the
HAL ACPI/PMU work is never done. Gnome programmers are dying for a
proper power management solution.
>
> Cheers,
> David
Thanks, Richard
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list