[Pm-utils] [RFC] check for swap partition in pm-is-supported for hibernate / suspend-hybrid

Victor Lowther victor.lowther at gmail.com
Fri Feb 8 13:22:54 PST 2008


On Fri, Feb 08, 2008 at 09:34:21PM +0100, Till Maas wrote:
> Hiyas,
> 
> there is a bug report[1] in Red Hat Bugzilla against pm-utils which says that 
> pm-is-supported should check, whether or not there is a swap partition 
> available. I am not sure whether or not this should be done by pm-utils, 
> because currently there are no sanity checks for any sleep method, except 
> that it is checked, whether or not there is an interface to try to 
> hibernate/suspend. Also hal uses pm-is-supported and probably makes the 
> results available in the keys:

I would not add it as an intergal part of pm-utils.  tuxonice,
for example, can be configured to hibernate/resume without touching a
swap partition or a swap file.
 
> power_management.can_suspend (bool) 	 	Yes	 If suspend support is compiled 
> into the kernel. NB. This may not mean the machine is able to suspend 
> successfully.
> 
> power_management.can_suspend_hybrid (bool) 	 	Yes	If the system is capable of 
> hybrid suspend.
> 
> power_management.can_hibernate (bool) 	 	Yes	If hibernation support is 
> compiled into the kernel. NB. This may not mean the machine is able to 
> hibernate successfully.
> 
> Therfore it seems that pm-is-supported should not do any sanity checks in case 
> the output is used by hal, because it would break the hal specification. Do 
> you have any ideas?

Well, I would not have pm-is-supported check for the presence of an 
available swap partition -- a usage scenario that would break involves 
someone who normally runs without swap, and mounts the swap partition just
for hibernate (and that does not count all the intereting backing stores
that tuxonice can use for hibernation).

> Regards,
> Till
> 
> [1] https://bugzilla.redhat.com/show_bug.cgi?id=431956

-- 
Victor Lowther
Ubuntu Certified Professional


More information about the Pm-utils mailing list