Due to a recent bug, each time my screen turns off, I cannot get it back on.
Currently, the screen starts turning off after the computer is locked – which effectively means that I cannot lock my computer without having to completely restart it.
Is there a way to lock it, but without the monitor going to sleep/off?
Best Answer
If you need or want a solution that prevents the screen to fall asleep, but that does dim/lock the screen after a while, there is another solution: instead of the system's own dim/lock option, use the script below to run in the background. You will need to install
xprintidle
.How to set up:
Disable all dim / lock options in System Settings. (In Brightness & lock AND in "Energy" settings)
install xprintidle:
Find your screen name; run in a terminal:
Look for the name in the line where it says "connected". Your screen name could be for example
VGA-1
orDVI-I-1
.Copy the script below, set the correct screen_name, the idle time before it should lock/dim the screen, and paste it into an empty file. Save it as
lock_dim.py
The script
Test the script by opening a terminal and type:
If it works as you like, add it to your startup applications: Open Dash > "Startup Applications" > "Add", add the command: