https://bugzilla.novell.com/show_bug.cgi?id=480804
User jnelson-suse@jamponi.net added comment
https://bugzilla.novell.com/show_bug.cgi?id=480804#c2
Jon Nelson changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
Info Provider|jnelson-suse@jamponi.net |
--- Comment #2 from Jon Nelson 2009-03-13 07:24:00 MST ---
I could, but it wouldn't do you any good.
The fact is, do_suspend() (located in /usr/lib/pm-utils/functions around line
226) does not have an analogue to HIBERNATE_METHOD which is used by
do_hibernate() (starting around line 244).
I'll even supply you with a patch shortly. Tested.
Now, even in the presence of /usr/sbin/s2ram, if I place
SUSPEND_METHOD="kernel"
in /etc/pm/config.d/anyfile, then I get the kernel suspend behavior.
--- /usr/lib/pm-utils/functions 2009-03-01 21:15:39.000000000 -0600
+++ functions 2009-03-13 08:19:24.000000000 -0500
@@ -30,6 +30,7 @@
INHIBIT=/var/run/pm-utils.inhibit
PM_LOGFILE=${PM_LOGFILE:=/var/log/pm-suspend.log}
SUSPEND_MODULES=""
+SUSPEND_METHOD=""
HIBERNATE_METHOD=""
S2DISK_CONF="/var/lib/s2disk.conf"
TEMPORARY_CPUFREQ_GOVERNOR="performance"
@@ -228,16 +229,28 @@
local RET
echo "INFO: going to suspend. In case of problems with the selected
suspend options,"
echo "INFO: please read
/usr/share/doc/packages/pm-utils/README.smart-suspend-to-RAM"
- get_s2ram_opts
- set -x
- if [ -x /usr/sbin/s2ram ]; then
- /usr/sbin/s2ram $S2RAM_OPTS
- RET=$?
- else
- pm-pmu --suspend || echo -n "mem" > /sys/power/state
- RET=$?
+ if [ -z "$SUSPEND_METHOD" ]; then
+ if [ -x /usr/sbin/s2ram ]; then
+ SUSPEND_METHOD="userspace"
+ else
+ SUSPEND_METHOD="kernel"
+ fi
fi
- set +x
+ case $SUSPEND_METHOD in
+ userspace)
+ set -x
+ get_s2ram_opts
+ /usr/sbin/s2ram $S2RAM_OPTS
+ RET=$?
+ set +x
+ ;;
+ kernel)
+ set -x
+ pm-pmu --suspend || echo -n "mem" > /sys/power/state
+ RET=$?
+ set +x
+ ;;
+ esac
return $RET
}
@@ -361,7 +374,7 @@
fi
return $RET
done < /proc/modules
- # if we came this far, there was nothing to do,
+ # if we came this far, there was nothing to do,
# the module is no longer loaded.
return 0
}
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.