Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Prevent XScreenSaver from flashing unlocked screen
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

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


Joined: 17 Apr 2017
Posts: 13
Location: /home/lxuser

PostPosted: Sat Dec 21, 2024 11:22 am    Post subject: Prevent XScreenSaver from flashing unlocked screen Reply with quote

Hi,
I've been using x11-misc/xscreensaver for a while on my laptop. It's fast and seems to be a bit more secure than the rest of common screen lock apps. But there is one thing...

I simply can't configure it well enough to prevent it from showing the unlocked screen for a very brief period (500ms?) before it shows the lock screen itself. This happens after I wake the laptop up from sleep but it doesn't occur every time - it's like 50:50.

The setup is systemd + i3wm with the screensaver being started by auto-running:

Code:
xscreensaver --no-splash


It feels like the system goes to sleep before the saver has a chance to lock itself. Is there anybody else using XScreenSaver on a similar setup?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22853

PostPosted: Sat Dec 21, 2024 2:05 pm    Post subject: Reply with quote

This is an inherent problem with a screensaver / screenlocker that is not integrated in the rendering path. At the time you enter suspend, you were recently active, so the screen is correctly not blanked. When you resume, your X server is restored and begins rendering to the screen, showing whatever you had open. Soon afterward, but not instantly, the kernel will get around to scheduling xscreensaver, which will notice that the current time says you have been idle for hours, and will react by blanking / locking the screen. As you observed, this may or may not be fast enough to happen before Xorg renders to the monitor. The typical solution to this is that you need to run xscreensaver-command -lock on the suspend path, so that the screen is already blanked and locked before you enter suspend, and is still that way when you resume.
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