[Pm-utils] [patch] Fallback on standby kernel support if suspend isn't available.

Dylan Smith dylan.ah.smith at gmail.com
Fri May 14 16:20:32 PDT 2010


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


More information about the Pm-utils mailing list