Re: Announcement: Common Power-Management Framework
On Fri, 2005-12-02 at 10:47 +0000, Matthew Garrett wrote:
> Kevin Locke <email@example.com> wrote:
> > Fundamentally, our goal is to create an architecture-independent,
> > power-system-independent, and power-daemon-independent system to handle
> > power-related events (e.g. lid close, battery events). This will likely
> > happen by hooks from the power daemons (scripts in their event handlers)
> > that will invoke a common event handler. This common handler will run
> > its system-independent scripts (possibly in the style of a runlevel)
> > based on its configuration, then return control to the daemon to
> > complete its handling.
> To a large extent, this sort of work is currently being done in HAL. Is
> there any need to create another level of abstraction, or should we just
> work on that?
Interesting. I wasn't aware to what extent HAL is able to notify
programs about power-related events. In fact, we had briefly discussed
receiving events from HAL in addition to the power-daemons. Perhaps
with some work, we would be able to rely completely on HAL.
The common power-management framework is really intended to be a policy
layer, so it may still have some value for running scripts based on
power events (it could fill the roll of the "small daemon" you talk
about in your second mail to this thread). However, I realize that the
GNOME Power Manager, and likely a KDE equivalent, already handles
several of the tasks normally associated with power-management, so
perhaps there is no need for another program to be handling events.
What are your (or anyone else's) thoughts about the value of a daemon to
invoke scripts based on the power-related HAL events? Is this
unnecessary given the function of the GNOME Power Manager and
equivalents, or would it have enough value to be worth implementing?
Would it be better to spend our time adding features to the Gnome Power
Manager and equivalents instead of creating a separate program? I'm
sure we will be discussing this extensively on the powermgmt-devel list
in the near future, but I would like to hear what the -devel community
thinks of this idea (it's too easy to justify ones own work in ones own
> It also sounds (though I'm not certain) like you're
> concentrating on system-wide power management transitions, whereas I'd
> argue that it needs to be possible for configuration to be done on a
> per-user basis (you wouldn't believe the degree of argument over whether
> closing the lid of a laptop should trigger a suspend or not)
You are correct that we had been talking about this from a system-wide
perspective. Per-user is a nice idea, it would be great for each user
to be able to configure their own preferences for what actions are
taken. We will probably need to address the issues of no users logged
in and users with differing actions (where one would want to suspend and
the other to ignore the event). But that should be doable.