I can suspend to disk fine through
/usr/share/hal/scripts/hal-system-power-hibernate, but not through kpowersave. Screen goes off, but the computer does not halt. I have to forcefully turn it off and then resuming does not work.
From looking at kpowersave.cpp, it does this:
"""
// sent to admin interface if we are run as root
if (getuid() == 0)
res = dbusSendSimpleMessage(ADMIN_MESSAGE, "SuspendToDisk");
else
res = dbusSendSimpleMessage(ACTION_MESSAGE, "SuspendToDisk");
"""
And this seems to arrive in /usr/lib/powersave/do_acpi_sleep here:
suspend2disk)
IMG_SZ=0
read IMG_SZ < /sys/power/image_size
$MYECHO /sys/power/state disk
RET=$? # 28=ENOSPC, "not enough swap."
#
# the logic here is:
# if image_size > 0 (without kernel support, IMG_SZ will be zero),
# and we got ENOSPC, then try again with image_size set to zero.
if [ $RET -eq 28 -a $IMG_SZ -ne 0 ]; then # try again with minimal image size echo 0 > /sys/power/image_size $MYECHO /sys/power/state disk RET=$? echo $IMG_SZ > /sys/power/image_size
fi
[ "$SUSPEND2DISK_RESTORE_CLOCK" == "yes" ] && $HWCLOCK $OPT
;;
I can suspend to disk fine through hal/scripts/ hal-system- power-hibernate , but not through kpowersave. Screen goes off, but the computer does not halt. I have to forcefully turn it off and then resuming does not work.
/usr/share/
From looking at kpowersave.cpp, it does this: essage( ADMIN_MESSAGE,
"SuspendToDis k"); essage( ACTION_ MESSAGE,
"SuspendToDis k");
"""
// sent to admin interface if we are run as root
if (getuid() == 0)
res = dbusSendSimpleM
else
res = dbusSendSimpleM
"""
And this seems to arrive in /usr/lib/ powersave/ do_acpi_ sleep here: image_size
echo 0 > /sys/power/ image_size
$MYECHO /sys/power/state disk
RET=$ ?
echo $IMG_SZ > /sys/power/ image_size RESTORE_ CLOCK" == "yes" ] && $HWCLOCK $OPT
suspend2disk)
IMG_SZ=0
read IMG_SZ < /sys/power/
$MYECHO /sys/power/state disk
RET=$? # 28=ENOSPC, "not enough swap."
#
# the logic here is:
# if image_size > 0 (without kernel support, IMG_SZ will be zero),
# and we got ENOSPC, then try again with image_size set to zero.
if [ $RET -eq 28 -a $IMG_SZ -ne 0 ]; then # try again with minimal image size
fi
[ "$SUSPEND2DISK_
;;
I've found a patch for kpowersave which seems to use HAL (and therefor acpi-support) instead: www.mail- archive. com/powersave- devel%40forge. novell. com/msg00687. html
http://
This might be available in a new upstream release.