Comment 5 for bug 267331

Revision history for this message
Alan Knowles (alan-akbkhome) wrote :

This is what gnome-power-manager calls to determine if it should show suspend. (run as normal user, not root)

bus-send --session --print-reply --dest="org.freedesktop.PowerManagement" --type=method_call --reply-timeout=6000 /org/freedesktop/PowerManagement org.freedesktop.PowerManagement.CanSuspend
it should say true, but it actually says false.

To try and get it to suspend from the command line:
bus-send --session --print-reply --dest="org.freedesktop.PowerManagement" --type=method_call --reply-timeout=6000 /org/freedesktop/PowerManagement org.freedesktop.PowerManagement.Suspend int32:0

By changing the file /usr/lib/hal/scripts/linux/hal-system-power-suspend-linux

and removing this bit,
#if [ $seconds_to_sleep != "0" ] ; then
        #alarm_not_supported
#fi
And changing:/usr/lib/pm-utils/pm-functions
 # Try userspace software suspend
        if [ -c /dev/snapshot ] && command_exists s2disk ; then
TO-->
 # Try userspace software suspend
        if [ -c /dev/snapshot ] && command_exists s2ram ; then

I got suspend to display everywhere.. (not sure which change fixed it... - but it's back!)