Hu Administrator
Joined: 06 Mar 2007 Posts: 22852
|
Posted: Sat Dec 21, 2024 2:05 pm Post subject: |
|
|
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. |
|