I found this answer to make my screen go blank with xset dpms force off.

But most of the times it only works for a brief moment and the screen comes back. I never managed to get this to work an second try or a second time if it worked the first time.

Is there a trick to this that I missed?


This is because X reacts to user input and turns the screen on again (like when you release the enter key).

Try sleep 3 ; xset dpms force off and don't touch the keyboard or mouse right after that.

This will wait 3 secs before running the command.


This is in my experience almost certainly caused by your windowing application checking if the keyboard was used recently, after the command was successfully executed. That things sometimes work probably has to do with how fast the xset command can be loaded into memory and executed, if that takes time then your screen is blanked after the keyboard check. If it is executed once chances are high that you xset executes without such a delay the next time and it will not work at all.

I suggest you make an alias

alias blank='sleep 0.2; xset dpms force off'

and use that. Those 0.2 seconds delay always were enough on my system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.