Ubuntu – How to disable backlight when I lock the screen


When I lock screen, the display does turn black but the display isn't completely off. There is some light coming out of the display in screen lock mode but it get turned off when inactive for 10 minutes as configured from Brightness and Lock setting.

I tried xset dpms force off which completely turn off the display.

Is there any way that when I press Ctrl + Alt + L to lock screen, the screen get locked and the display is completely turned off saving some power.

Best Answer

I am running a script for same problem (source):

sleep 0.5
xset dpms force off
gnome-screensaver-command -l 

This turns monitor off and locks the session. The sleep 0.5 is there to avoid the monitor turning on when you release the Ctrl+Alt keys; maybe you don't need this.

You can try other solution also from there (didn't tried this one yet).

The solution I use is:

  1. I have added the Inhibit Applet to my top panel (this lets me toggle the sleep mode off and on)

  2. In power management I set Put display to sleep when inactive for: 1 minute.

  3. I use the Ctrl+Alt+L (I actually changed my shortcut to Ctrl+Alt+Spacebar) to lock the screen.

So when I am using the laptop the first thing I do is click on my Inhibit Applet in my top panel so my display does not go to sleep in 1 minute of inactivity.

When I am all done and want to lock the screen and turn off the monitor I click on the Inhibit Applet so it allows the sleep timer to work, and I hit my combination of keys to lock the screen Ctrl+Alt+L.

The Screen is locked and in 1 minute the display turns itself off.