PDA

View Full Version : Command to turn off display



Smajjk
March 14th, 2013, 05:56 AM
In xubuntu, are there any way to give a command in the terminal which will turn off the display?

schragge
March 14th, 2013, 09:43 AM
I guess it depends on monitor you're using. You can try
sudo apt-get install ddccontrol and play with it.

steeldriver
March 14th, 2013, 09:50 AM
In an X session, you may be able to do it with xrandr - you will need to know the name of the output device e.g. by running 'xrandr -q'



$ xrandr -q
Screen 0: minimum 8 x 8, current 1680 x 1050, maximum 8192 x 8192
VGA-0 disconnected (normal left inverted right x axis y axis)
LVDS-0 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 331mm x 207mm
1680x1050 60.0*+ 50.0
DVI-D-0 disconnected (normal left inverted right x axis y axis)


Then in my case I would turn it off with


xrandr --output LVDS-0 --off

Setting the value to 'auto' should turn it back on e.g.

xrandr --output LVDS-0 --auto

stinkeye
March 14th, 2013, 02:35 PM
Try...

xset dpms force suspend

Smajjk
March 15th, 2013, 04:59 AM
Try...

xset dpms force suspend

As this seemed like the simplest option I tried it first, and it WORKED! Thank you :)

Btw, I'm on a Thinkpad T61 and this command turned off its display.

jayanth.n.murthy
November 27th, 2013, 07:49 AM
Just run this in the terminal and you are good to go,:)

perl -e 'select(undef,undef,undef,.5)' && xset dpms force off