Package: pm-utils
Version: 0.99.2-3
Severity: important
Tags: patch

If the sysfs method to hibernate is used, the do_hibernate method in
/usr/lib/pm-utils/functions first unconditionally writes "platform" to
/sys/power/disk. If the platform method is not supported, this causes
the subsequent write to /sys/power/state to fail.

The attached patch first checks if the platform method is supported. 

Gaudenz


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.23
Locale: LANG=de_CH.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages pm-utils depends on:
ii  powermgmt-base                1.29       Common utils and configs for power

Versions of packages pm-utils recommends:
ii  hal                           0.5.10-2   Hardware Abstraction Layer
ii  radeontool                    1.5-5      utility to control ATI Radeon back
pn  uswsusp                       <none>     (no description available)
pn  vbetool                       <none>     (no description available)

-- no debconf information
--- functions.orig      2007-11-07 19:50:32.988411041 +0100
+++ functions   2007-11-07 19:58:04.311651567 +0100
@@ -153,7 +153,9 @@
                        $S2DISK_BIN -f $S2DISK_CONF
                        ;;
                kernel)
-                       echo -n "platform" > /sys/power/disk
+                       if grep -q "\bplatform\b" /sys/power/disk ; then
+                               echo -n "platform" > /sys/power/disk
+                       fi
                        echo -n "disk" > /sys/power/state
                        ;;
        esac

Reply via email to