detecting hibernation capability
Richard Hughes
hughsient at gmail.com
Tue Nov 29 14:11:40 PST 2005
On Tue, 2005-11-29 at 15:59 -0600, Ben Liblit wrote:
> Is there a standard way for HAL to report whether a machine is capable
> of hibernating? If not, should there be? Is this the sort of thing HAL
> ought to own?
>
> I dearly hope that my laptop will be able to hibernate one day, but it
> certainly cannot now. I'm not using swsusp2 or similar things, and
> directly running "echo disk > /sys/power/state" yields EINVAL.
>
> Detecting that my laptop cannot hibernate ought to be easy; "cat
> /sys/power/state" reports "standby mem" with no mention of "disk".
> Perhaps there will be weird corner cases or exceptions, but one hopes
> that checking this file will be the right thing in the majority of cases.
Assuming this is a sane check (cc'ing relevant people), we'll need some
more keys on the computer device:
(bool) power_management.can_suspend
(bool) power_management.can_hibernate
(bool) power_management.can_standby
I think we need to expose these keys (rather than just returning invalid
from the scripts) so GUI programs can hide the options that do not
apply.
I'm happy to code this if required.
Richard.
More information about the hal
mailing list