pgf at laptop.org
Tue Mar 16 16:33:06 EDT 2010
hello james --
> > - 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
this timer is certainly a prime candidate for being made longer, if
people think it should be.
> 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.
in fact, powerd already does a partial job of this.
the wakeup events currently available are the "SOC"
(state-of-charge) event, which is emitted every time the battery
capacity changes by 1%, and the "critical" event, which is
emitted when the battery is critically low.
if the battery has less than 20% capacity left when the system is
put to sleep, powerd will enable the SOC event to wakeup and check the
battery condition periodically in order to shutdown properly. on
XO-1.5 we may also be able to use the "critical" event -- on XO-1 that
event only comes when the battery is too weak to actually run the
system -- responding to it causes an immediate crash.
> 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.
yes, i'm sure we can do better than we're doing now.
> 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.
well, it's a system service. but perhaps something can be done.
> Thanks again for all the work on powerd
> Devel mailing list
> Devel at lists.laptop.org
paul fox, pgf at laptop.org
More information about the Devel