Ubuntu won't suspend automatically any more

Posted by Sparhawk on Ask Ubuntu See other posts from Ask Ubuntu or by Sparhawk
Published on 2012-08-07T07:10:34Z Indexed on 2012/09/24 3:51 UTC
Read the original article Hit count: 347

In the last month or so, Ubuntu (12.04) has stopped sleeping automatically. I've gone to System Settings > Power, and verified (and toggled) "suspend on inactive for" to 5 minutes (for both battery and "when plugged in"), but the system stays awake.

I've also tried used code similar to

$ gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 300
$ gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 300

to set the timeout values. I've also verified these in dconf Editor. Previously, I could set this quite low to make my computer sleep quickly, but now it no longer works either.

I'm not sure if this is relevant, but under old versions of Ubuntu, if I wanted my computer to never suspend (via the CLI), I would also have to set

$ gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac false

At some point, this seemed to have been depreciated (and also gave me the error "No such key 'sleep-inactive-ac'"). I found that it it was enough to set sleep-inactive-ac-timeout to 0. This worked for a while, but at some point auto-suspend stopped working as stated above. Oddly enough, the sleep-inactive-ac key is still present when I look via dconf editor. However, when I click it, it says "no schema", and the summary, etc. fields are blank.

To test if the dconf power plugin was working, I tried playing around with other settings in the schema. Idle-dim-time and idle-dim-ac work as expected . However, setting sleep-display-ac to 5 seconds has no effect.

I'm also not sure if this is relevant, but I've uninstalled gnome-screensaver, and installed xscreensaver. I have tried killing xscreensaver and re-installing gnome-screensaver, but this did not help.

I've also had some trouble with DPMS. I'm not sure if this is related, but I'll put the information here, just in case. Using xscreensaver, I set Power Management to enabled, with standby and suspend timeouts to 10 minutes. I've verified these settings in ~/.xscreensaver and xset q. However, the screen blanks after about 30 seconds. If I turn off DPMS (either via xscreensaver GUI or modifying ~/.xscreensaver), it won't blank at all, so I know that DPMS is partially reading the xscreensaver settings.

-- edit I've attempted more troubleshooting, by creating a new user account, then logging out of the main account and into the new account. I've tried modifying the timeouts via dconf, but get the same results as above (i.e. it doesn't work, nor does sleep-display-ac, but idle-dim-time and idle-dim-ac work). Also, the depreciated sleep-display-ac key is not visible, so I think that this is probably unrelated.

-- edit I've since moved to gnome-shell instead of unity, and still have this problem, so I guess that it's something to do with gnome-power-manager.

© Ask Ubuntu or respective owner

Related posts about 12.04

Related posts about power-management