Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
XFCE desktop appears before lockscreen
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Latrina
n00b
n00b


Joined: 13 Aug 2017
Posts: 29
Location: Cambridge, UK

PostPosted: Wed Jul 15, 2020 3:35 pm    Post subject: XFCE desktop appears before lockscreen Reply with quote

Hello folks,

I have got this issue that when the laptop is resumed from sleep via lid open action, the session can be seen as it was left off before lockscreen comes up.
This does not happen when the laptop goes to sleep naturally via time out, but only with lid open/close action.

Googling here and there I found out that it is a known glitch, and that basically delaying the sleep of a few seconds or immediately turning the screen off upon lid close should solve the issue.

This is done by creating a systemd hook with a simple "sleep 3" script. However though, I use OpenRC + laptop-mode-tools, and adding a sleep delay to /etc/acpi/actions/lm_lid.sh doesn't seem to work.

Any ideas of how I can get rid of this annoying glitch?

Thanks :)
_________________
USE="-systemd"
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 16202

PostPosted: Thu Jul 16, 2020 1:30 am    Post subject: Reply with quote

This works exactly as expected. When the system resumes, it displays the last thing it showed before it suspended. Shortly after, the screensaver notices that hours or days have elapsed since your last activity, and it blanks and locks the screen. If the laptop was already blanked before it went to sleep, then on resume it shows the same blank screen it had before it slept.

The fix is to explicitly blank and lock the screen before entering suspend. The mechanism may vary depending on your screensaver. If you use xscreensaver, then running xscreensaver-command -lock with access to the X session should work. Delaying the sleep, on its own, has no effect, and that should be true even under systemd. It's possible that the sleep was added because systemd has some special logic to blank the screen, and the sleep is there to try to give that logic time to run. If so, then the sleep is still the wrong solution, because there is no guarantee that systemd will blank the screen within any particular interval.
Back to top
View user's profile Send private message
Latrina
n00b
n00b


Joined: 13 Aug 2017
Posts: 29
Location: Cambridge, UK

PostPosted: Fri Jul 17, 2020 11:19 am    Post subject: Reply with quote

Thank for the explanation Hu. I will take a closer look to it this weekend. This glitch has really annoyed me :P
_________________
USE="-systemd"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments 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