[Pm-utils] [PATCH] Proposal of auto-hibernate feature
victor.lowther at gmail.com
Tue Dec 1 10:47:33 PST 2009
On Fri, 2009-11-20 at 22:21 +0100, Christian Krause wrote:
> Ever since I've started to use my netbook under Linux I've missed
> quite much the feature of "auto-hibernate" which was available in windows:
> In order to save as much battery power as possible Windows did the
> - after some minutes of inactivity (or closing the LID) the netbook
> was suspended (to RAM)
> - if the user has woken it up during the next 15 minutes, it just
> resumed quickly
> - otherwise it woke up automatically only to fully hibernate now
> By using this process the user didn't had to think about what would
> be the best option to save power or what he must do to prevent that the
> suspend mode would drain the battery, everything was done completely
> automatically. Especially for only occasional usage of the netbook/laptop
> it was very handy and so the time until the next recharge was quite long.
> Using hybrid-suspend was not an option, because even if it would enable
> the user to resume after a complete power-loss it does not prevent draining
> the battery...
> I've missed that feature so much, that Ingo van Lil and I have put together
> an extension to pm-utils which implements this feature.
> It is implemented by only one additional file in /usr/lib/pm-utils/sleep.d/
> and a configuration file in /etc). Both files are attached to this mail.
> What's your opinion about this idea?
> Is there a chance to integrate this into the official pm-utils?
> If yes, we would certainly help to achieve this! ;-)
> Best regards,
Doing it as a hook is a little heavy -- I went ahead and reimplemented
your idea as a sleep method instead.
http://cgit.freedesktop.org/~vlowther/pm-utils/commit/?id=f3886cadd361f9f1659c2f555e5a0e74ed9422b6 has my implementation of your idea -- since it runs as a sleep method, we do not have to worry about locks or mess around with timeouts outside the RTC or anything like that.
If you want to test it, pull the master branch from
git://anongit.freedesktop.org/~vlowther/pm-utils, install on your
system, and run pm-suspend-hybrid.
Please test it out and let me know how it works for you.
More information about the Pm-utils