Recently I have noticed that the brightness and lock settings to turn off the screen after a period of inactivity are being ignored.
I have my settings at 1 minute and to lock the screen when the screen turns off but my computer never seems to turn the screen off.
I have seen similar questions where people are noting an issue where the screens turn back on and the lock screen is showing but I am not getting the computer to lock at all.
Best Answer
I can offer a workaround to this
Never mind the settings in the GUI, you can lock your screen and send your screens into standby via the command line
To lock your screen you could use
or (if don't use gnome3)
and to turn off your monitors (standby) you could use
Now, since you don't want to do this manually, but after a couple of minutes idle time, we need to find out how long you have been idle. This can be done with
xprintidle
xprintidle
will return miliseconds of (xserver) idletimeNow, lets combine this into a script(*). Use your favorite editor to copy/paste the following, modifying the
IDLE_TIME
to your likingThen make it executable with
You can test it out on the commandline
if you are content with it, you can add it to the startup of your Ubuntu, like described in these answers here or with the "Startup" app in Ubuntu - just make sure to use the absolute path to your script.