Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Jul 2009 09:22:58 +0200 (CEST)
From:      "Rene Schickbauer" <cavac@magicbooks.org>
To:        freebsd-current@freebsd.org
Subject:   RFC: powerd Patch & proposed future changes
Message-ID:  <18510.213.150.228.38.1246864978.squirrel@mail.magicbooks.org>

next in thread | raw e-mail | index | archive | help
Hi!

Yesterday i submitted a patch for powerd to set maximum allowed CPU speed
for adaptive modes (to keep the system cool and using less power).

PR: 136354

Would it also make sense to have powerd run an (optional) user configureable
script on ac state change? I'm thinking about things like dimming TFT
backlight, on EEE PC turning of the webcam and so on.

Another option that could make sense in powerd is checking the battery state
and running a user configureable script when ac-state is set to battery and
battery falls below a configured threshold. The script could do a number of
things like warning the user, scheduling a shutdown and so on in order to
give the user a fair chance to save his/her work and do a clean shutdown (or
just plugin the ac adapter).

powerd currently only adjusts CPU speed, but having a *second* programm
monitor the same kernel variables to work on another part of the same
problem does not seem to make sense.

BTW, i'm also thinking of having the option to have powerd log the battery
status (ac mode + load + charge level) every 5 Minutes or so to syslog. That
way, a second script (log parser) may be able to determine information about
the battery - like how long does it take to charge, rough capacity
estimation and possible degradation of battery.

Just throwing ideas...

LLAP & LG
Rene
-- 
Hackerkey: http://tinyurl.com/pof37z




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?18510.213.150.228.38.1246864978.squirrel>