detecting hibernation capability
Ben Liblit
liblit at cs.wisc.edu
Tue Nov 29 13:59:21 PST 2005
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.
Centralized detection of hibernation capability may be of interest to
many power-related applications. It is certainly of interest to
gnome-power-manager, which currently simply assumes that hibernation is
available. If it is not available, then several hibernation-related GUI
elements ought to be disabled accordingly.
More information about the hal
mailing list