A friend had an interesting problem for me to solve; he wanted to know how to turn off his laptop’s monitor without shutting down the system or waiting for it to go off. He wanted to leave it working during the night on the desk in his room, without the light from the LCD bothering him while he slept.
Luckily there is a Linux command to do just about anything. To turn off your monitor from a terminal, run this command:
sleep 1 && xset dpms force off
Moving the mouse or pressing a key will turn the monitor back on.
The sleep 1 (wait for one second) is needed only when you are typing the command in a terminal. This is because the command is executed as soon as the enter key is pressed, when it lifts up X turns the monitor back on.
The xset command is used for setting X display preferences. In this case it uses VESA Display Power Management Signaling to turn off the monitor.
You can create a desktop or panel launcher to do the same thing.

Right click on the desktop and select Create Launcher. Use the command xset dpms force off, give it a name, and choose a nice icon. You can also drag it on to your panel for convenient access.
[update] An anonymous commenter asks: Is there anyway to lock the screen and power down the monitor in one launcher?
Use this command to run the screensaver (which will lock), wait, and then turn off the monitor:
gnome-screensaver-command --lock && sleep 2 && xset dpms force off


You can also use Brightside bound to a screen corner or edge if you prefer.
[...] VÃa Tombuntu [...]
[...] Fonte Parziale: Tombuntu [...]
[...] If you’re running a Linux-powered laptop and you want to switch off the screen, without waiting for the laptop to go into sleep mode, then this is a great tip from Tombuntu. [...]
[...] algun tiempo y el monitor se apaga para ahorrar energÃa. La solucion la encontré en el blog de Tombuntu y nos sugiere lo [...]
Awesome tip. I have a problem though
It works great from the terminal but when I create a custom launcher and execute it, the screen simply turns off then turns back on. Pretty similar to what happens in the terminal if you leave out the sleep command.
Any ideas?
Hmm, I should have added what I run – that might help huh !
Ubuntu 7.10
nvidia 8800 GTS w/ 169.04 nvidia drivers
desktop effects enabled
If you need any others, let me know.
mike:
the only thing I can think of would be to try creating a launcher with a longer sleep time.
It works great!!
Silly me, I believe it was just me slightly moving the mouse after letting go of the button. Put it towards a case of PEBKAC I think
Thanks you so much!
[...] it to go off. He wanted to leave it working during the night on the desk in his room, without thehttp://tombuntu.com/index.php/2007/12/13/create-a-virtual-monitor-power-button/IT Resource Center forums – nx6110 laptop monitor shuts off after …May 1, 2007 … I have a nx6110 [...]
Thanks for the tip! I am going to use this all the time instead of reaching all the way over to push that button.
thanks for the info
[...] Monitor Off – Command – xset dpms force off [...]
Is there anyway to lock the screen and power down the monitor in one launcher?
Hey, not sure why the application launcher method isn’t working for me.
I double clicked it and nothing happens.
But the command works in terminal.
I’m running ubuntu 8.10. any suggestions?
thanks!
Thanks, that’s exactly what I wanted to do as well: sleep while the computer is on.
To lock the screen and blank the monitor press the Crtl+Alt+L combination
This is sweet, thanks
I’ve been looking for a way to turn my monitor off after i’m done watching tv shows without having to get out of bed
um close the lid? just make sure it doesnt hibernate or shut down etc
How can you not love Linux? Great post.
Really interesting problem… Hows about just closing the lid…
this will come in handy some day.
Why not just turn the monitor off?
Why not just turn the monitor off?
Turn off laptop monitor if you can
[...] Tombuntu he visto una entrada que explica como crear un botón en el escritorio o en el panel para poder [...]
I’d like to point out that by switching ‘off’ to ‘on’ you can wake up the monitor. I’m using these for turning the screen off when I’m going to sleep, then I have my alarm script turn the screen back on and open up firefox to my morning lineup. Saves me a good minute every morning.
Great!
The next command placed in /etc/crontab will turn on the monitor at desired time:
/usr/bin/xset dpms force on
This worked perfectly! Thank you so very much!
Just a question tough, Does it switch off the backlight too? Sorry if it’s a silly question but I read that the backlight doesn’t turn off easily or something like that.
The backlight should switch off.
This does not work anymore on ubuntu 10.04? Any idea
It’s still working on all my systems.
How can you not love Linux? Great post.
can you not love Linux?
thank you very much indeed for that
Skrót wygaszaj?cy ekran…
Je?li u?ywamy Linuksa na komputerze przeno?nym bardzo przydatn? rzecz? mo?e by? przycisk do wygaszania ekranu, niestety niektóre urz?dzenia nie dysponuj? fizycznym wy??cznikiem, wówczas warto stworzy? sobie skrót np. na pulpicie i prz[...]…