tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Making powerd=YES default

Since powerd already deals with things other than power (at the very least, it can receive and process temp-sensor alarms, intrusion indicators, etc.) so it probably should not exit. If you exit, then there's no way for user-land to process events from those other sensor types...

On Tue, 26 Jul 2011, Jean-Yves Migeon wrote:

On 25.07.2011 21:40, Jukka Ruohonen wrote:
On Mon, Jul 25, 2011 at 09:17:03PM +0200, Martin Husemann wrote:
Unless you plan to share /etc/powerd/scripts between different machines, I
don't see what such subdirectories would buy you.

To further clarify this a little: IMO the scripts should be shared by
machines. But this implies consistent MI interfaces in the kernel.

Thus, the current hack is to either use the subdirectories or resort to
things like this (from scripts/sleep_button):

Obviously, both approaches leave a lot to be desired.

Polishing power management framework (or even powerd(8)) is a really big
project in itself. It also has to offer interfaces for programming, like
time of wakeup, suspend maybe, and even policy (like power control:
powersaving or performance, etc.). This needs some thinking and trying,
before having something that we feel comfortable with.

IMHO, it should even be renamed from "powerd" to "eventd", as it will
probably manage more that just power (like aps(4)).

So let me summarize a bit, so we can move further; do everyone agree if I:
- patch powerd(8) so that it checks for power_type, and if none is
provided, log and exit

        => that means that all ports/arches that want to see powerd(8) enabled
and resident should now register a backend (nominal case).

        => in case some want to execute powerd(8) regardless of a backend
presence, add a flag for that (maybe -f?), and let those that want it
add it to rc.conf.

- set powerd=YES in etc/defaults/rc.conf

Please raise your voice if you have concerns.

Jean-Yves Migeon


| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at |
| Kernel Developer |                          | pgoyette at  |

Home | Main Index | Thread Index | Old Index