cannot suspend, GpmControlError.Code0: Cannot suspend as not allowed from policy Failed

Bug #393021 reported by Martin Pool
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
devicekit-power (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: gnome-power-manager

This seems to be a new regression in Karmic within the last week. (ie it was working a week ago, and is not working with yesterday's or today's updates.)

My Thinkpad X61s no longer shows options to suspend or hibernate in the logout dialog or from the gnome-power-manager applet. Also, the gpm applet always shows a mains plug even when the machine is running from battery, and the power history option no longer shows anything about a battery.

I worked through the steps in https://wiki.ubuntu.com/DebuggingGNOMEPowerManager which confirm that the kernel and lower levels of the machine *can* suspend correctly and do see a battery. It seems to be a higher level problem in the UI:

mbp@lithe% dbus-send --system --print-reply --dest="org.freedesktop.Hal" /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Suspend int32:0
method return sender=:1.0 -> dest=:1.104 reply_serial=2
   int32 0
*** at this point the machine suspended and resumed correctly ***
mbp@lithe% gnome-power-cmd suspend
Suspending
Error org.freedesktop.DBus.GLib.UnmappedError.GpmControlError.Code0: Cannot suspend as not allowed from policy
Failed
*** it did not suspend here ***
mbp@lithe% ubuntu-bug gnome-power-manager
ubuntu-bug gnome-power-manager 2.73s user 1.56s system 19% cpu 22.101 total
mbp@lithe% dbus-send --session --print-reply --dest="org.freedesktop.PowerManagement" --type=method_call --reply-timeout=6000 /org/freedesktop/PowerManagement org.freedesktop.PowerManagement.CanSuspend
method return sender=:1.19 -> dest=:1.82 reply_serial=2
   boolean false
mbp@lithe% gconftool-2 -g /apps/gnome-power-manager/general/can_suspend
true
mbp@lithe% polkit-auth | grep power-management.suspend
org.freedesktop.hal.power-management.suspend
mbp@lithe% hal-device | grep power_management.can_suspend
  power_management.can_suspend = true (bool)
  power_management.can_suspend_hybrid = false (bool)
mbp@lithe% pm-is-supported --suspend || echo "Not supported"
mbp@lithe% pm-is-supported --suspend

I see that policykit 0.9-4ubuntu1 was installed yesterday, perhaps the problem is in there.

ProblemType: Bug
Architecture: i386
Date: Sun Jun 28 08:51:46 2009
DistroRelease: Ubuntu 9.10
Package: gnome-power-manager 2.27.1-0ubuntu3
ProcEnviron:
 PATH=(custom, user)
 LANG=en_AU.UTF-8
 SHELL=/bin/zsh
ProcVersionSignature: Ubuntu 2.6.30-9.10-generic
SourcePackage: gnome-power-manager
Uname: Linux 2.6.30-9-generic i686

Revision history for this message
Martin Pool (mbp) wrote :
Revision history for this message
Martin Pool (mbp) wrote :

May also be interesting:

mbp@lithe% polkit-auth --show-obtainable
com.ubuntu.devicedriver.install
com.ubuntu.systemservice.setproxy
com.ubuntu.systemservice.setnoproxy
com.ubuntu.systemservice.setkeyboard
org.gnome.cpufreqselector
org.freedesktop.consolekit.system.stop-multiple-users
org.freedesktop.consolekit.system.restart-multiple-users
org.freedesktop.policykit.read
org.freedesktop.policykit.revoke
org.freedesktop.policykit.grant
org.freedesktop.policykit.modify-defaults
org.freedesktop.systemtoolsbackends.set
org.freedesktop.systemtoolsbackends.self.set
org.freedesktop.hal.power-management.shutdown-multiple-sessions
org.freedesktop.hal.power-management.reboot-multiple-sessions
com.ubuntu.screenresolution.mechanism.configure
com.ubuntu.screenresolution.mechanism.dontzap
org.freedesktop.devicekit.power.qos.set-minimum-latency
org.freedesktop.devicekit.power.qos.cancel-request
org.freedesktop.network-manager-settings.system.modify
com.hp.hplip.installplugin
org.gnome.gconf.defaults.set-system
org.gnome.gconf.defaults.set-mandatory
org.gnome.clockapplet.mechanism.settimezone
org.gnome.clockapplet.mechanism.settime
org.gnome.clockapplet.mechanism.configurehwclock
org.freedesktop.hal.storage.mount-fixed
org.freedesktop.hal.storage.unmount-others
org.freedesktop.hal.storage.crypto-setup-fixed

Revision history for this message
Martin Pool (mbp) wrote :

I see in polkit-gnome-authorization that permission to suspend etc is supposed to be implicitly granted to active local console users. I'm not sure why it's not detecting me as such.

Revision history for this message
Eduard Sanchez Biete (esbiete) wrote :

Martin, I had the same problem, but it's now solved in the lastest devicekit-power package update (008-1ubuntu2).

Changed in gnome-power-manager (Ubuntu):
status: New → Fix Released
affects: gnome-power-manager (Ubuntu) → devicekit-power (Ubuntu)
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.