[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 14:03:19 PST 2008

On Fri, Feb 08, 2008 at 10:40:51PM +0100, Till Maas wrote:
> On Fri February 8 2008, Victor Lowther wrote:
> > 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.
> Iirc did you create some patches that separte the checks for the different 
> sleep methods for the different backends.

I did.  They just check to see if the kernel supports those methods, not
any other prerequisite.  I do not think that writing a "hibernate will
work" vs. a "hibernate is supported" function is worth the effort.  I
don't have a problem with making it really easy for someone else to
write such a function, though.
> > 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
> How does this break? As soon as someone activates a swap partition, the output 
> of pm-is-supported would change. And in case it is not activated, hibernation 
> would fail anyways. Unless he uses a different sleep-backend than the kernel 
> of course.

Because when pm-is-supported is doing the Right Thing right now.  What
it sounds like the bug is asking for is a pm-sleep-will-probably-work 
command, which would be a great deal harder to implement.

> Regards,
> Till

Victor Lowther
Ubuntu Certified Professional

More information about the Pm-utils mailing list