Display Power Management Signaling

DPMS (Display Power Management Signaling) enables power saving behaviour of monitors when the computer is not in use. The time of inactivity before the monitor enters into a given saving power level, standby, suspend or off, can be set as described in DPMSSetTimeouts(3). Note that DPMS was developed for CRT monitors, and on LCD displays, there is normally no difference between the standby, suspend and off modes.

Setting up DPMS in X

Note: As of Xorg 1.8 DPMS is auto detected and enabled if ACPI is also enabled at kernel runtime.

Add the following to a file in /etc/X11/xorg.conf.d/ in the Monitor section:

Option "DPMS" "true"

Add the following to the ServerFlags section, change the times (in minutes) as necessary:

Option "StandbyTime" "10"
Option "SuspendTime" "20"
Option "OffTime" "30"
Note: If the "OffTime" option does not work, use screen blanking instead, which will keep the monitor turned on with a black image. Alternatively, change "blanktime" to "0" to disable screen blanking
Option         "BlankTime" "30"

To disable DPMS, change /etc/X11/xorg.conf.d/10-monitor.conf as below:

Section "Monitor"
    Identifier "LVDS0"
    Option "DPMS" "false"
EndSection

Section "ServerFlags"
    Option "StandbyTime" "0"
    Option "SuspendTime" "0"
    Option "OffTime" "0"
    Option "BlankTime" "0"
EndSection

Section "ServerLayout"
    Identifier "ServerLayout0"
EndSection

Modify DPMS and screensaver settings with a command

It is possible to turn off your monitor with the xset command which is provided by the xorg-xset package.

Examples:

Command Description
xset s off Disable screen saver blanking
Change blank time to 1 hour
Turn off DPMS
Disable DPMS and prevent screen from blanking
Turn off screen immediately
Standby screen
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(1) 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]

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;
gollark: Well, yes.
gollark: Yes, that is why it says "[file] already installed".
gollark: Ah, so it's NEWLY INSTALLINATED and conflictizing.
gollark: It would be weird if they made packages for every single linux-firmware-broadcom update.
gollark: I assume that's the version.

See also

This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.