Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to know if there is any way I can disable the screen on a linux distro I'm using Debian. I found a few way to do that with X installed, but not without X.

share|improve this question
    
If you have no Xserver installed, then what exactly do you want to disable? Can you explain what you want a bit more? –  Telemachus Aug 29 '09 at 0:41
1  
What exactly are you talking about? please clarify –  hasenj Aug 29 '09 at 1:37
    
@Mnml: in a comment below, you mention a laptop and turning off the screen. I'm not sure you want to create a headless server on a laptop. This strikes me as pretty counter-intuitive. –  Telemachus Aug 29 '09 at 2:13
2  
@Telemachus: I'm using a old tablet as a little "home" server, it's fast enough for the services I'm running on It (dovecot etc) and it's not using a lot of electricity... It would be even better without the screen ;-) –  mnml Aug 29 '09 at 15:30
add comment

4 Answers

You can turn off the screen on your laptop using the xset command:

xset dpms force off

DPMS is Display Power Management Signaling, a standard to reduce power consumption in monitors. xset is of course an X utility. If you need to accomplish this without X involved, use setterm:

setterm -powerdown 1

The full list of options to manipulate your screen:

xset -dpms  		# Disable DPMS
xset +dpms  		# Enable DPMS
xset s off  		# Disable screen blanking
xset s 150  		# Blank the screen after 150 seconds
xset dpms 300 600 900   	# Set standby, suspend, & off times (in seconds)
xset dpms force standby 	# Immediately go into standby mode
xset dpms force suspend 	# Immediately go into suspend mode
xset dpms force off 	# Immediately turn off the monitor
xset -q 			# Query current settings

setterm -blank 10   		# Blank the screen in 10 minutes
setterm -powersave on   	# Put the monitor into VESA power saving mode
setterm -powerdown 20   	# Set the VESA powerdown to 20 minutes

These are all duly explained in the Battery Powered Linux Mini-HOWTO.

share|improve this answer
    
xset require Xserver unfortunately The program 'xset' is currently not installed. You can install it by typing: apt-get install x11-xserver-utils –  mnml Aug 29 '09 at 15:32
    
With setterm -powersave on, I get cannot (un)set powersave mode –  IanVaughan Nov 1 '11 at 20:45
add comment

Check out vbetool. You can turn off the screen with:

vbetool dpms off

The only problem I'm having with this is that the screen doesn't turn back on automatically on e.g. keyboard input. You have to do it manually by typing it in blindly or via SSH:

vbetool dpms on

On Debian Squeeze, vbetool is used in /etc/acpi/lid.sh when X is not available.

share|improve this answer
1  
one could write a little script which blanks the screen, waits for input and then reenables it. Something like vbetool dpms off && read -s -n 1 && vbetool dpms on. –  Bobby Dec 30 '11 at 20:59
add comment

I'm not sure which package provides it, but some ACPI-related package includes scripts for blanking the screen based on whether the laptop's lid is open. Although now that I look at the script itself (/etc/acpi/lid.sh), it seems to only work on X. However, the point is that it provides a framework for triggering actions on lid open/close events. You could modify the script to use setterm, and it might do what you want.

share|improve this answer
add comment

If you have a serial port on your machine you could run it headless.

Do a web search for "linux serial console howto".

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.