Comment 17 for bug 224697

Revision history for this message
Chow Loong Jin (hyperair) wrote : Re: [Bug 224697] Re: Disable hibernation if swap is on file

On Sun, 2008-10-05 at 19:29 +0000, PetrB wrote:
> Is this the current patch?
> http://patches.ubuntu.com/p/pm-utils/extracted/30-swap-file.patch
>
> User will have no idea why is hibernation disabled. What about
> documenting the patch?
>
> check_hibernate()
> {
> - [ -f /sys/power/disk ] && grep -q disk /sys/power/state
> + # There has been rumor that hibernation of WUBI system (using swap file) causes freeze.
> + # See https://bugs.launchpad.net/debian/+source/pm-utils/+bug/224697
> + grep -q "/.*[[:space:]]file[[:space:]]" /proc/swaps && return 1
> + [ -f /sys/power/disk ] && grep -q disk /sys/power/state && return 0
> }
I doubt documenting the patch will do any good in that aspect, although
it's always good to document the patch. The general user doesn't apt-get
source pm-utils to figure out why it doesn't hibernate.
--
Chow Loong Jin