From f75ffa2e8c5391b50177375f0b46653dbd38cc7f Mon Sep 17 00:00:00 2001 From: Victor Lowther Date: Thu, 20 Mar 2008 12:48:19 -0500 Subject: Changed kernel hibernation to use the default kernel method unless overridden. Hopefully this will get rid of the bug reports where "platform" causes problems. If it does not, we should probably default to "shutdown" as the default method. --- pm/defaults | 7 ++++--- pm/module.d/kernel | 3 ++- pm/pm-functions.in | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pm/defaults b/pm/defaults index 19d38ec..449d34a 100644 --- a/pm/defaults +++ b/pm/defaults @@ -5,11 +5,12 @@ ########################################################## # Default method to power down the system when hibernating. -# If commented out, the system will use "shutdown" as a +# If commented out, the system will use the kernel default as a # default value. # -# Check /sys/power/disk for valid values. -# HIBERNATE_MODE="platform" +# Check /sys/power/disk for valid values. The default value +# will be surrounded by [square brackets]. +# HIBERNATE_MODE="shutdown" # Whetner we need to post the video card when resuming from # hibernate. You should not normally need to set this. diff --git a/pm/module.d/kernel b/pm/module.d/kernel index 9a6b5ad..7e40cd5 100755 --- a/pm/module.d/kernel +++ b/pm/module.d/kernel @@ -22,7 +22,8 @@ check_hibernate() do_hibernate() { - echo -n "${HIBERNATE_MODE}" > /sys/power/disk + [ "$HIBERNATE_MODE ] && \ + echo -n "${HIBERNATE_MODE}" > /sys/power/disk echo -n "disk" > /sys/power/state } diff --git a/pm/pm-functions.in b/pm/pm-functions.in index aebbd0c..a3050da 100644 --- a/pm/pm-functions.in +++ b/pm/pm-functions.in @@ -35,7 +35,7 @@ LC_COLLATE=C # These should be overridden by defaults and/or config.d settings. # Specifically, distros should override these by modifying defaults, # and end users should modify these using files in /etc/pm/config. -HIBERNATE_MODE="shutdown" +HIBERNATE_MODE="" HIBERNATE_RESUME_POST_VIDEO="no" SLEEP_MODULE="kernel" # These variables will be handled specially when we load the config file. -- cgit v1.2.3