After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 688229 - Activating suspend from power button menu does not work
Activating suspend from power button menu does not work
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: gnome-session
git master
Other Linux
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-11-13 10:01 UTC by Martin Pitt
Modified: 2012-11-13 12:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GsmConsoleKit: Properly initialize upower client (1.46 KB, patch)
2012-11-13 10:18 UTC, Martin Pitt
committed Details | Review

Description Martin Pitt 2012-11-13 10:01:59 UTC
From https://launchpad.net/bugs/1041137:

When using the ConsoleKit backend, pressing the power button brings up the "what do you want to do" [Suspend] [Shutdown] ... dialog, but clicking the Suspend buttons do not actually work. ~/.xsession-errors shows

gnome-session[1921]: libupower-glib-CRITICAL: up_client_get_can_suspend: assertion `UP_IS_CLIENT (client)' failed
Comment 1 Martin Pitt 2012-11-13 10:05:11 UTC
The problem is that up_client_new() is only called in gsm_consolekit_on_name_owner_changed(), but that's not usually called for UPower (and even then, the check at the top would not even make it work if upowerd restarted).

I have a patch, testing it more thoroughly now.
Comment 2 Martin Pitt 2012-11-13 10:18:34 UTC
Created attachment 228866 [details] [review]
GsmConsoleKit: Properly initialize upower client

Tested patch.
Comment 3 Matthias Clasen 2012-11-13 11:14:30 UTC
Review of attachment 228866 [details] [review]:

Makes sense; please push to gnome-3-6 as well
Comment 4 Martin Pitt 2012-11-13 12:19:15 UTC
Comment on attachment 228866 [details] [review]
GsmConsoleKit: Properly initialize upower client

Pushed to master and gnome-3-6, thanks for the review!