Feedback

type to search

What is needed for suspend/standby in gnome menu to work?

Asked by [ Editor ]

When I go into the system menu of gnome and choose to shut down, the box only offers three choices to me: reboot, cancel and shut down. Actually from what I understood that menu should also display the options to standby and suspend the system. Those don’t appear to me. When I close the display of my laptop I get a popup dialogue that tells me that suspend failed with the message of “Cannot suspend”.


The system actually is able to do that, because when I either echo mem or disk into /sys/power/state it works. I had to use debootstrap to set up the system because the debian installer had issues and I was unable to use that, so I might well miss some packages that a regular install with selecting the desktop task would hae installed. I though have the gnome and gnome-desktop-environment metapackages installed which pull in a fair amount of dependencies.
or Cancel

2 answers

1

terceiro

my wife’s new laptop has exactly the same problem. Suspend also works by writing directly to /sys/power/state. I went to look in gnome-power-manager’s source code (from squeeze), and the only match for “Cannot suspend” is the following:

terceiro@morere:/tmp/gnome-power-manager-2.32.0$ ack-grep 'Cannot suspend' -C 5
src/gpm-control.c
150- g_object_get (control->priv->client,
151- "can-suspend", &allowed,
152- NULL);
153- if (!allowed) {
154- egg_debug ("cannot suspend as not allowed from policy");
155: g_set_error_literal (error, GPM_CONTROL_ERROR, GPM_CONTROL_ERROR_GENERAL, "Cannot suspend");
156- goto out;
157- }
158-
159- /* we should perhaps lock keyrings when sleeping #375681 */
160- lock_gnome_keyring = gconf_client_get_bool (control->priv->conf, GPM_CONF_LOCK_GNOME_KEYRING_SUSPEND, NULL);

For some reason, that “allowed” variable is coming as false, so it seems to be a permission issue. I’ve checked GNOME’s permissions under Administration/Users, but none of the unchecked ones had something to do with power management or suspend specifically.

NN comments
rhonda
-

Actually, this led me in the right direction. Strangely I saw the “powerdev” group in the output of id, but in the Administration/Users part the checkbox for being able to suspend/standby was unchecked. Even after I checked it and did reboot it didn’t work initially – but now it does. I can only assume that this was the proper step. :)

terceiro
-
so the fix for you was adding the account to the “powerdev” group? My wife’s laptop does not have such a group … of course I can create it, but if it’s needed and was not created during the installation there is a bug somewhere.

or Cancel
0

oz123 [ Editor ]

Hi Rhonda,
Usually when Suspend and Hibernate buttons are missing from GNOME, it is because you forgot to tell your computer where your SWAP is !
Since you installed from “debootstrap” is it possible you forgot to mount swap ? or mentioned swap on the wrong partition ?
What does free -m says? Do you have swap ? if no, than swapon, logout from gnome, login and you should see your buttons …
I hope my guess is right.
Cheers, Oz

NN comments
rhonda
-

Like mentioned, echoing disk into the sysfs file does work, so yes, swap is there, available and working.

oz123
-
did you solve the problem ? is your swap big enough ? I am curious to know what was is it, can you please update ?

or Cancel

Your answer

You need to join Debian to complete this action, click here to do so.