Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn off screen backlight instead of a blank screen #93

Open
cubetastic33 opened this issue Jan 7, 2020 · 9 comments
Open

Turn off screen backlight instead of a blank screen #93

cubetastic33 opened this issue Jan 7, 2020 · 9 comments

Comments

@cubetastic33
Copy link

Is it possible to make the actual backlight turn off instead of showing the blank screen that comes before the auth screen? Also, is it possible to show an image instead of this blank screen?

@divVerent
Copy link
Contributor

Cool idea; anyone know an API to do that on X11 though?

@nerosun64
Copy link

Cool idea; anyone know an API to do that on X11 though?

I don't know about API but you can use xset dpms force off

@qdzhang
Copy link

qdzhang commented Jan 27, 2021

To turn off screen backlight, you can use this option passing by environment variables:

export XSECURELOCK_BLANK_DPMS_STATE=off

It specifies which DPMS state to put the screen in when blanking.

@cubetastic33
Copy link
Author

is that not the default setting?

@divVerent
Copy link
Contributor

divVerent commented Jan 30, 2021 via email

@cubetastic33
Copy link
Author

Right, but that wasn't what my initial issue was about though - by default xsecurelock does turn off screen backlight for me if I don't type anything for a while in the lockscreen. What I was talking about is the screen that shows up before I press a key to type the password. If I'm using a screensaver module like mpv, then instead of the black screen, mpv shows up - but when no screensaver module is used, it shows a black screen with the backlight turned on, and pressing a key brings up the dialog where we type our password. I was wondering if it was possible to turn of the backlight instead, and pressing a key brings up the dialog.

@divVerent
Copy link
Contributor

divVerent commented Feb 1, 2021 via email

@cubetastic33
Copy link
Author

Sure, making my own saver script is totally fine with me. I tried what you said, but that turns the screen off immediately after I do anything - it turns on momentarily if I move my mouse or type something but then turns off again...

@tjbrn
Copy link

tjbrn commented May 19, 2023

Are there any solutions? xset dpms force off works, but not properly with xsecurelock

#!/bin/sh
sleep 0.1
xset dpms force off
XSECURELOCK_BLANK_DPMS_STATE=off XSECURELOCK_NO_COMPOSITE=1 XSECURELOCK_COMPOSITE_OBSCURER=1 XSECURELOCK_PASSWORD_PROMPT=time xsecurelock

Tried the code above, the desktop content is exposed for half a second after pressing a key with the screen off.

sleep 1 seems to leak the screen less times than sleep 0.1, but still leak sometimes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants