Display Power Management Signaling
DPMS (Display Power Management Signaling) enables power saving behaviour of monitors when the computer is not in use. For details on each timeout, see [1]. Note that some monitors make no difference between various DPMS modes.
Contents
Setting up DPMS in X
Add the following to a file in /etc/X11/xorg.conf.d/
in the Monitor
section:
Option "DPMS" "true"
Add the following to the ServerLayout
section, change the times (in minutes) as necessary:
Option "StandbyTime" "10" Option "SuspendTime" "20" Option "OffTime" "30"
Modifying DPMS and screensaver settings using xset
It is possible to turn off your monitor using the xset tool which is provided by installing the xorg-xset package.
Example commands:
Command | Description |
---|---|
xset s off | Disable screen saver blanking |
xset s 3600 3600 | Change blank time to 1 hour |
xset -dpms | Turn off DPMS |
xset s off -dpms | Disable DPMS and prevent screen from blanking |
xset dpms force off | Turn off screen immediately |
xset dpms force standby | Standby screen |
xset dpms force suspend | Suspend screen |
To query the current settings:
$ xset q
... Screen Saver: prefer blanking: yes allow exposures: yes timeout: 600 cycle: 600 DPMS (Energy Star): Standby: 600 Suspend: 600 Off: 600 DPMS is Enabled Monitor is On
See xset
for all available commands.
DPMS interaction in a Linux console with setterm
The setterm utility issues terminal recognized escape codes to alter the terminal. Essentially it just writes/echos the terminal sequences to the current terminal device, whether that be in screen, a remote ssh terminal, console mode, serial consoles, etc.
setterm Syntax: (0 disables)
setterm -blank [0-60|force|poke] setterm -powersave [on|vsync|hsync|powerdown|off] setterm -powerdown [0-60]
Prevent screen from turning off
You can run this command:
$ setterm -blank 0 -powerdown 0
Alternatively you can disable console blanking permanently using the following command:
# echo -ne "\033[9;0]" >> /etc/issue
Pipe the output to a cat to see the escapes
$ setterm -powerdown 2>&1 | exec cat -v 2>&1 | sed "s/\\^\\[/\\\\033/g"
Pipe the escapes to any tty (with write/append perms) to modify that terminal
$ setterm -powerdown 0 >> /dev/tty3
Bash loop to set ttys 0-256
$ for i in {0..256}; do setterm -powerdown 0 >> /dev/tty$i; done; unset i;