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've found a patch for kpowersave which seems to use HAL (and therefor
acpi-support) instead:
http://www.mail-archive.com/powersave-devel%40forge.novell.com/msg00687.html
This might be available in a new upstream release.
--
Use acpi-support event handling
https://launchpad.net/bugs/45661
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs