Comment 16 for bug 224697

Revision history for this message
PetrB (petr-bug) 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
 }