Powerd comments

James Smith metal.lunchbox at gmail.com
Tue Mar 16 15:51:57 EDT 2010


>     - if on battery, the laptop will auto-shutdown after its been
> 	asleep for 1 hour.  if plugged in, it will sleep forever.
I've used powerd and really love how it works, especially how easy it
is to configure and hack. I agree with the design decisions for the
most part but auto-shutdown after sleeping for an hour, seems like a
problem. When someone puts their laptop to sleep they expect that
they'll be able to resume. The XO uses so little power in sleep mode
and booting takes long enough on the XO that maintaining the ability
to quickly resume should take priority. I understand that there is a
desire to avoid hard shutdowns due to empty battery, but isn't there
way to make it sleep until battery is criticaly low. I know that it is
difficult to poll battery level when in sleep mode but maybe you could
have rtcwake bring the computer out of sleep not after 1 hour but
after a time powerd estimates that the battery can support sleep.
Since we have power consumption controlled in sleep it should be easy
to estimate how long we can keep the computer in suspend at the
battery level immediately before sleep. Wake a little short of this
time and poll the battery and see if we need to shutdown, if not
snooze until shortly before we think the battery will run out. Its all
there in powerd already except shutdown time should be determined by a
function to estimate how long the battery will last in sleep instead
of reading from the config file.

Also, is there a reason the config file has to be in /etc/ and not
/home/olpc . It seems like it would be useful to let the user edit
powerd settings as user and not as root.

Thanks again for all the work on powerd

james



More information about the Devel mailing list