Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Screen not locked after suspend
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
victorsk
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jul 2010
Posts: 92

PostPosted: Fri Dec 25, 2015 3:53 pm    Post subject: [SOLVED] Screen not locked after suspend Reply with quote

Good day everyone,

I've installed Gentoo kde-plasma 5.5.1 with SDDM display manager and I am two steps away from a perfect system. One problem I have here is the screen doesn't lock after resuming from sleep mode. I definitely checked "lock screen on resume" option in Screen Locking section but it's not working. I've done extensive research and found that the trick to solving is to ensure that screen has to actually somehow lock before going to suspend mode. I also have Gentoo XFCE system on my other laptop and screen locking works there so I tried to apply working technique by removing upower-pm-utils and installing only pm-utils. That didn't work. In fact, without upower-pm-utils I can't even see the "Sleep" option in close on lid. Unfortunately, solution that works with XFCE doesn't work with plasma. I also use exactly the same kernel configuration I used in my previous Gentoo Plasma set up where screen locking did work after resume. The only difference between my previous Gentoo plasma install (over which I installed the current one) is that in previous I had LightDM as my DM and this time I SDDM. I also ensured that I have kde-plasma power management package installed.

So if I want to have screen locked after suspend, I have to manually lock it before closing the lid. Is there a way to automate the screen locking part before going to sleep? This is the only solution I can think of. If there is more elegant solution, please let me know.

ADDED: In my previous Plasma installation (LightDM) I had screen lock appear after suspend but sometimes the screen lock didn't kick in right away and entire desktop conents were visible. Thus, I believe it would be a better solution to automatically lock the screen before the suspend kicks in to ensure that after suspend the screen remains locked. This is the problem also discussed here:

http://blog.martin-graesslin.com/blog/2015/01/locking-the-screen-before-system-suspends/

And so I am looking for a way to automatically lock screen before suspend.
Thank you kindly,
Victor.


Last edited by victorsk on Sun Dec 27, 2015 7:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
ophuls
n00b
n00b


Joined: 05 Jun 2015
Posts: 7

PostPosted: Sun Dec 27, 2015 5:37 pm    Post subject: Reply with quote

Hi Victor,
I had the same problem after updating plasma to 5.5.0 (before was working good using SDDM).
I solved it uninstalling upower-pm-utils and updating sys-auth/consolekit to ver. 1.0.0-r1.
After this I also lost the "Suspend" and "Hibernate" options but I get it back adding the following files to /etc/polkit-1/localauthority/50-custom.d/
Code:
$ ls /etc/polkit-1/localauthority/50-custom.d/
20-org.freedesktop.consolekit.system.suspend-multiple-users.pkla
30-org.freedesktop.consolekit.system.hibernate-multiple-users.pkla


Here is the content of the files:
20-org.freedesktop.consolekit.system.suspend-multiple-users.pkla
Code:
[Allow all users to suspend]
Identity=unix-group:users
Action=org.freedesktop.consolekit.system.suspend-multiple-users;org.freedesktop.consolekit.system.suspend
ResultAny=yes
ResultInactive=no
ResultActive=yes


30-org.freedesktop.consolekit.system.hibernate-multiple-users.pkla
Code:
[Allow all users to hibernate]
Identity=unix-group:users
Action=org.freedesktop.consolekit.system.hibernate-multiple-users;org.freedesktop.consolekit.system.hibernate
ResultAny=yes
ResultInactive=no
ResultActive=yes


I still have the sometimes the glitch on resume (desktop will show for fraction of a second before the locking screen).
Hope this can help

thomas
Back to top
View user's profile Send private message
victorsk
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jul 2010
Posts: 92

PostPosted: Sun Dec 27, 2015 7:27 pm    Post subject: Reply with quote

ophuls wrote:
Hi Victor,
I had the same problem after updating plasma to 5.5.0 (before was working good using SDDM).
I solved it uninstalling upower-pm-utils and updating sys-auth/consolekit to ver. 1.0.0-r1.
After this I also lost the "Suspend" and "Hibernate" options but I get it back adding the following files to /etc/polkit-1/localauthority/50-custom.d/
Code:
$ ls /etc/polkit-1/localauthority/50-custom.d/
20-org.freedesktop.consolekit.system.suspend-multiple-users.pkla
30-org.freedesktop.consolekit.system.hibernate-multiple-users.pkla


Here is the content of the files:
20-org.freedesktop.consolekit.system.suspend-multiple-users.pkla
Code:
[Allow all users to suspend]
Identity=unix-group:users
Action=org.freedesktop.consolekit.system.suspend-multiple-users;org.freedesktop.consolekit.system.suspend
ResultAny=yes
ResultInactive=no
ResultActive=yes


30-org.freedesktop.consolekit.system.hibernate-multiple-users.pkla
Code:
[Allow all users to hibernate]
Identity=unix-group:users
Action=org.freedesktop.consolekit.system.hibernate-multiple-users;org.freedesktop.consolekit.system.hibernate
ResultAny=yes
ResultInactive=no
ResultActive=yes


I still have the sometimes the glitch on resume (desktop will show for fraction of a second before the locking screen).
Hope this can help

thomas


It worked! Thank you for your advise :) They should definitely change your skill to a higher level :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum