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 670820 - user menu "suspend" option doesn't lock the session
user menu "suspend" option doesn't lock the session
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.2.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-02-26 04:06 UTC by David F.
Modified: 2012-03-23 23:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Lock session instead of activating the screensaver (647 bytes, patch)
2012-02-26 04:10 UTC, David F.
needs-work Details | Review
Lock session instead of activating the screensaver (1.03 KB, patch)
2012-02-26 19:51 UTC, David F.
committed Details | Review
Patch to fix the commited patch (949 bytes, patch)
2012-02-28 15:45 UTC, Gert Kulyk
reviewed Details | Review
userMenu: Fix LockRemote call (1.09 KB, patch)
2012-03-03 20:20 UTC, drago01
committed Details | Review

Description David F. 2012-02-26 04:06:58 UTC
Preconditions:
 - screensaver is enabled (I set 10 min.)
 - session locking enabled and set to anything besides "after the screen goes blank" (I set 30 min.)
 - NVidia binary blob graphics device driver (don't know if this is related)

Experienced behaviour:
When I use the suspend functionality in the g-s user menu, the shell is unlocked after resuming and I experience the same symptoms as https://bbs.archlinux.org/viewtopic.php?pid=1007305#p1007305.

Expected behaviour:
After resuming the shell is locked and requires the user's password to unlock.


If I do however make the changes in the patch, everything works as I expect it. I don't know though, if this behaves correctly™ in other use cases.


See also: https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/847814
Comment 1 David F. 2012-02-26 04:10:15 UTC
Created attachment 208434 [details] [review]
Lock session instead of activating the screensaver
Comment 2 drago01 2012-02-26 17:19:00 UTC
Review of attachment 208434 [details] [review]:

Locking the screen is what we want to do here not activating the screensaver so the patch makes sense even though it isn't clear to me why the screen doesn't get locked when activating the screensaver.

Can you attach a proper patch? (using git format-patch) ?
Comment 3 David F. 2012-02-26 19:47:37 UTC
(In reply to comment #2)
> Review of attachment 208434 [details] [review]:
> 
> Locking the screen is what we want to do here not activating the screensaver so
> the patch makes sense even though it isn't clear to me why the screen doesn't
> get locked when activating the screensaver.

Maybe because in my configuration screen locking doesn't depend on the screen saver or vice-versa.
Comment 4 David F. 2012-02-26 19:51:51 UTC
Created attachment 208449 [details] [review]
Lock session instead of activating the screensaver
Comment 5 David F. 2012-02-26 19:52:28 UTC
Comment on attachment 208449 [details] [review]
Lock session instead of activating the screensaver

generated with git format-patch
Comment 6 drago01 2012-02-26 20:15:18 UTC
Thanks, pushed.
Comment 7 Gert Kulyk 2012-02-28 15:45:32 UTC
Created attachment 208595 [details] [review]
Patch to fix the commited patch

While the original patch was ok, the commited one contains a typo which makes suspending impossible. I'm attaching a fix.
Comment 8 Florian Müllner 2012-02-28 17:17:53 UTC
Review of attachment 208595 [details] [review]:

Looks right - please re-attach with a proper commit message.
Comment 9 drago01 2012-03-03 20:20:33 UTC
Created attachment 208919 [details] [review]
userMenu: Fix LockRemote call

Commit 37cbfe29 replace the SetActiveRemote with a LockRemote call but didn't
change the paramters, so remove the incorrect boolean parameter.

---

Same patch with a fixed commit message.
Comment 10 Jasper St. Pierre (not reading bugmail) 2012-03-03 20:31:17 UTC
Review of attachment 208919 [details] [review]:

Go ahead.
Comment 11 drago01 2012-03-03 20:39:04 UTC
Attachment 208919 [details] pushed as 1f9c83d - userMenu: Fix LockRemote call
Comment 12 Julien Olivier 2012-03-22 19:13:15 UTC
In the preferences, I have unchecked "Require my password when waking from suspend", and it asks me for my password when suspending from the menu (but not on closing the lid). It's on Ubuntu Precise, so it might be distro-specific though.
Comment 13 David F. 2012-03-23 23:48:14 UTC
Ok, so instead of locking the session unconditionally we need to check, if automatic session locking is enabled and act accordingly.

Should Julien or I open a new bug for this?