Comment 19 for bug 1802138

Revision history for this message
In , Jarno Suni (jarnos) wrote :

I do not see a problem in having even longer delay than a second. But, using "sleep 1; xset dpms force off" has still the problem that user may accidentally touch something so that display will become on again. Besides, it effectively disables Presentation mode user may have set using Power manager's panel item.

A better solution would be to change DPMS settings for the time such a screen locker is running to enable turning display off after reasonable time of inactivity from user, and restore previous settings, when user unlocks. This is possible by using a wrapper script.

I have actually introduced such a version of xflock4 in bug report https://bugzilla.xfce.org/show_bug.cgi?id=10217
attachment
https://bugzilla.xfce.org/attachment.cgi?id=7254
in 2017. It uses 15 second delay, but an initial delay of 1 second could be added.

That script has other modifications such as added screensavers and lockers and optionally using display power management for the locker user may have set in Xfconf. The script can be simplified notably, if hacking the DPMS settings for general lock command set in Xfconf is left out.

I have never got any feedback about the script.

Note: proper screensavers (that have a daemon running when lock command is called) should handle DPMS by themselves.