Suspend no longer allowed in Intrepid

Bug #267331 reported by James Blackwell
10
Affects Status Importance Assigned to Milestone
gnome-power-manager (Ubuntu)
Confirmed
Undecided
Unassigned
Nominated for Intrepid by Wouter Stomp

Bug Description

Suspend worked on this Gateway MT6831 with Gutsy and Hardy with no problems, and worked for some time with Intrepid. After a recent intra-Intrepid upgrade, suspend was removed as an option for System->Preferences->Power Management. The new behavior is that on this dual-head system, a window pops up on the external monitor stating something similiar to "This machine is not capable of sleep mode"

The system seems to still be capable of manual suspending and resuming by "sleep 3; echo 3 > /proc/acpi/sleep".
ACPI_SLEEP and ENABLE_LAPTOP_MODE are both true in /etc/default/acpi-support.

Revision history for this message
Kieran Fleming (kieran-fleming) wrote :

I seem to be having the same problem. I don't get an error message about it, but suspend is missing from all the menus.

James Blackwell (jblack)
Changed in gnome-power-manager:
status: New → Confirmed
Revision history for this message
James Blackwell (jblack) wrote :

I believe that this is involving something called policykit. I did attempt to fiddle with the policykit-gnome-auth binary, but can't yet leave instructions on how to fix it. I'd add an affects policykit-gnome-auth or policykit, but I don't see how to do that on the bug list above.

Revision history for this message
James Westby (james-w) wrote :

Hi James,

I don't think this is the fault of policykit, could you please explain why you think
it is, as I may be missing something?

I'm reassigning it back to gnome-power-manager, but we can always move
it back if it is the fault of policykit.

https://wiki.ubuntu.com/DebuggingGNOMEPowerManager may be useful to
you.

Thanks,

James

Revision history for this message
James Blackwell (jblack) wrote :

I suspect policykit because attempts to use the "Shut down the computer" applet leaves the following snippet in /var/log/syslog (take particular note to "Not privileged for action".

Sep 25 03:10:34 comet console-kit-daemon[5895]: GLib-GObject-WARNING: IA__g_object_get_valist: value location for `gchararray' passed as NULL
Sep 25 03:10:34 comet last message repeated 2 times
Sep 25 03:10:34 comet console-kit-daemon[5895]: WARNING: Couldn't read /proc/13008/environ: Failed to open file '/proc/13008/environ': Too many open files
Sep 25 03:10:34 comet gnome-session[13008]: WARNING: Unable to stop system: Not privileged for action: org.freedesktop.consolekit.system.stop no
Sep 25 03:10:34 comet console-kit-daemon[5895]: WARNING: Couldn't read /proc/13008/environ: Failed to open file '/proc/13008/environ': Too many open files

I'm pretty sure I can fix the powerdown problem by running polkit-auth to add the permission to the user. However, trying it out first by adding org.freedesktop.hal.power-management.suspend to the user did not result in the ability to suspend. I was seeing a similiar message related to suspending when closing my laptop immediately after upgrading, but before a reboot, after which, suspension was no longer offered as an option.

This system predates policykit, so I suspect that the package is assuming settings made during initial install that are not provided during upgrades.

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!)

Revision history for this message
James Westby (james-w) wrote :

Hi,

Can someone please run the following commands to find out which of the
following is stopping suspend for you:

  gconftool-2 -g /apps/gnome-power-manager/general/can_suspend

  hal-device | grep power_management.can_suspend

  polkit-auth | grep power-management.suspend

For me it's the hal-device line that is preventing suspend.

Thanks,

James

Revision history for this message
James Westby (james-w) wrote :

Hi,

The problem is that uswsusp is installed, and so pm-utils thinks it should
use that (it recommends uswsusp), however uswsusp doesn't install s2ram,
so it thinks that it can't suspend.

Thanks,

James

Revision history for this message
Wouter Stomp (wouterstomp-deactivatedaccount) wrote :

pm-utils should not recommend uswsusp, right? uswsusp is in universe...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.