Hi again.
Here's another patch for adding TuxOnIce support. I've put the TuxOnIce
tests at the start on the assumption that if someone goes to the trouble
of patching their kernel with support for it, they probably want to use
it. Perhaps it would be good to have a config option that could be used
to force the use of a particular implementation?
The other area I'd like to add support for is setting the various
configuration options for TuxOnIce. Any suggestions in this area?
Regards,
Nigel
--- /usr/lib/pm-utils/functions.orig 2008-01-26 16:44:12.000000000 +1100
+++ /usr/lib/pm-utils/functions 2008-01-26 16:44:16.000000000 +1100
@@ -143,7 +143,9 @@
do_hibernate()
{
if [ -z "$HIBERNATE_METHOD" ]; then
- if [ -x $S2DISK_BIN -a -c /dev/snapshot ]; then
+ if [ -d /sys/power/tuxonice ]; then
+ HIBERNATE_METHOD="tuxonice"
+ elif [ -x $S2DISK_BIN -a -c /dev/snapshot ]; then
HIBERNATE_METHOD="userspace"
else
HIBERNATE_METHOD="kernel"
@@ -157,12 +159,18 @@
echo -n "platform" > /sys/power/disk
echo -n "disk" > /sys/power/state
;;
+ tuxonice)
+ echo "" > /sys/power/tuxonice/do_hibernate
+ ;;
esac
}
do_suspend_hybrid()
{
- if [ -x /usr/sbin/s2both ]; then
+ if [ -d /sys/power/tuxonice ]; then
+ echo 3 > /sys/power/tuxonice/powerdown_method
+ echo > /sys/power/tuxonice/do_hibernate
+ elif [ -x /usr/sbin/s2both ]; then
/usr/sbin/s2both -f $S2DISK_CONF $S2RAM_OPTS
else
exit 1;
_______________________________________________
Pm-utils mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pm-utils