google / xsecurelock

X11 screen lock utility with security in mind
Apache License 2.0
863 stars 65 forks source link

External sources can un-DPMS the monitor #165

Open haarp opened 1 year ago

haarp commented 1 year ago

Hello,

there are ways to un-DPMS a monitor while not interrupting the screen locker, e.g. power managers that react to "inhibit screensaver" events. xsecurelock with XSECURELOCK_BLANK_DPMS_STATE in use does not handle this situation well. The display(s) will activate and stay active (albeit blanked) indefinitely, unless acted upon by the user.

This consumes power unnecessarily. It would be cool if xsecurelock could put the display back to sleep when this happens. I don't know if detection of the current DPMS state of all monitors is possible. Maybe just repeating the DPMS command repeatedly while the monitors should be sleeping would do the job.

Thanks!

divVerent commented 6 months ago

The usually intended way to do this would be to configure DPMS with xset in addition to xsecurelock's own blanking.