Manually turn off monitor
You can by using the preferences command for X server (http://systembash.com/content/how-to-turn-off-your-monitor-via-command-line-in-ubuntu/)
- To turn off the monitor
$ xset dpms force off
- To turn on the monitor
$ xset dpms force on
Pressing a key or moving the mouse will also switch the monitor on if it has been turned off. You can assign the command to a key if you like using shortcuts.
To add on to the other answer, I found that when I entered xset dpms force off
and pressed the Enter key, my screen would turn off and turn on again.
By running the command below, I was able to get the screen to turn off without turning on.
sleep 3; xset dpms force off
Just to add more options... You can run
xrandr --output <DISPLAY_NAME> --brightness 0
To determine your display name, simply runxrandr
. It will provide you with information on connected displays, so you can actually turn on and off any of them
Beware though, after running this command, you won't be able to turn your screen on by moving your mouse or using a keyboard. You will have to either use second monitor or blindly type
xrandr --output <DISPLAY_NAME> --brightness 1
So, X RandR provides you with better control over your screens, but it does what it does. It can also be used for other things, like changing resolution, orientation, rate, etc. It is also very easy to run it inside scripts. If you want, you can write a script to make your screen nicely fade to black. Brightness parameter can take fractions
More on X RandR
Example of X RandR script, bind to Fn keys