GNOME Bugzilla – Bug 660267
Suspend with media key doesn't properly lock screen
Last modified: 2011-11-14 14:10:54 UTC
Created attachment 197589 [details] [review] patch to correct the issue When suspending with a media key, the screen doesn't properly get locked. This is a similar issue to bug 655924 The attached patch fixes the problem. See the downstream report: https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/859498
This happens in Arch Linux too: pressing the power button on my laptop to suspend results in an unlocked session (only for a few seconds) after resuming. I've tried the attached patch, and it seems to fix the problem for me.
commit edba2b53c947ad999898fa4183ec9db8e43d5d9b Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 7 21:40:18 2011 +0100 media-keys: Fix suspend button not locking the screen Because we call UPower synchronously, so cannot process notifications during that time. Same bug as bug 655924, and same fix as 31fe6c18b9ca1034815e4cbffa6e6ea1336e4aec https://bugzilla.gnome.org/show_bug.cgi?id=660267 Conflicts: configure.ac
The commit there seems broken, 3.2.1 displays "couldn't sleep using UPower: ... The name org.freedesktop.UPower was not provided by any .service files" warnings in the session log It does seem you try to connect to upower on the session bus where it's on the system one?
confirmed. (gnome-settings-daemon:1294): media-keys-plugin-WARNING **: couldn't sleep using UPower: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
Created attachment 199501 [details] [review] Use the system bus. Patch to make it use the system bus instead. Suspend via key works again.
patch from comment 5 makes suspend/hibernate from media key work but the original issue still exists. the screen is not locked
(In reply to comment #5) > Created an attachment (id=199501) [details] [review] > Use the system bus. > > Patch to make it use the system bus instead. Suspend via key works again. I already fixed that in master and gnome-3-2 yesterday: http://git.gnome.org/browse/gnome-settings-daemon/commit/?id=3b41d8d62ebef1070e4304ad40cf395d12834808 Ionut, if the problem persists with the upstream repo, please reopen the bug.
I didn't had lock enabled in Screen panel. Definitely works
*** Bug 664005 has been marked as a duplicate of this bug. ***