S1 suspend (aka standby) is available if /sys/power/state contains the
"standby" keyword. This patch checks for this if it it doesn't find "mem"
for S3 suspend.

Fixes bug 28008.
---
 pm/pm-functions.in |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/pm/pm-functions.in b/pm/pm-functions.in
index dfbc59f..c1b00b3 100644
--- a/pm/pm-functions.in
+++ b/pm/pm-functions.in
@@ -296,6 +296,9 @@ if [ -z "$SUSPEND_MODULE" ]; then
        elif [ -c /dev/pmu ] && pm-pmu --check; then
                SUSPEND_MODULE="kernel"
                do_suspend() { pm-pmu --suspend; }
+       elif grep -q standby /sys/power/state; then
+               SUSPEND_MODULE="kernel"
+               do_suspend() { echo -n "standby" >/sys/power/state; }
        fi
 fi
 
-- 
1.7.0.4
_______________________________________________
Pm-utils mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pm-utils

Reply via email to