Jump to content

Display Power Management Signaling

From ArchWiki
(Redirected from DPMS)

This article or section needs expansion.

Reason: Does not cover Wayland. (Discuss in Talk:Display Power Management Signaling)

VESA Display Power Management Signaling (DPMS) 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 The standby, suspend and off modes do the same thing on LCD monitors. DPMS was originally developed for CRTs.

Linux console

To alter the terminal, use the setterm command. Its syntax (where 0 disables):

$ setterm --blank [0-60|force|poke]
$ setterm --powersave [on|vsync|hsync|powerdown|off]
$ setterm --powerdown [0-60]
Note
  • Console blanking alone does not enable DPMS power saving. Console blanking is disabled by default. [1]
  • setterm --powerdown does not seem to have any effect when the APM_DISPLAY_BLANK kernel configuration option is not enabled. [2]
  • Console blanking can also be enabled by the consoleblank kernel parameter. See Linux console#Automatic suspend for details.

Some commands just write the terminal sequences to the current terminal device, whether that be in screen, a remote ssh terminal, console mode, serial consoles, etc.

To see the escape codes used, pipe the output as follows:

$ setterm --powerdown 2>&1 | exec cat -v 2>&1 | sed "s/\\^\\[/\\\\033/g"

To modify a specific terminal, redirect the escape codes to it (with write permission):

$ setterm --powerdown 0 >> /dev/tty3
Note >> is used instead of >. For permission issues using sudo in a script or something, you can use tee to append the output of setterm to the tty device, which tty's let appending sometimes but not writing.

Automatically blankscreen tty1

When the system is used as a server but has a display connected, the display will be turned on forever. To turn off display after 5 minutes create a drop-in file. On any key press, display will turn back on.

/etc/systemd/system/getty@tty1.service.d/blankscreen.conf
[Service]
ExecStartPost=-/usr/bin/setterm --blank 5

Xorg

Configuration

To fully disable DPMS and screen blanking on the X Window System, create configuration files:

/etc/X11/xorg.conf.d/10-extensions.conf
Section "Extensions"
    Option "DPMS" "false"
EndSection
/etc/X11/xorg.conf.d/10-serverflags.conf
Section "ServerFlags"
    Option "BlankTime" "0"
EndSection

If you simply want to adjust the delays, change the duration (in minutes):

/etc/X11/xorg.conf.d/10-serverflags.conf
Section "ServerFlags"
    Option "StandbyTime" "10"
    Option "SuspendTime" "20"
    Option "OffTime"     "30"
EndSection
Note If the OffTime option does not work, use screen blanking (i.e. BlankTime) instead.

Runtime settings

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
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(1) for all available commands.

Note
  • XScreenSaver, xfce4-power-manager and lxqt-powermanagement use their own DPMS settings and override xset configuration. See XScreenSaver#DPMS and blanking settings and Xfce#Display blanking for more information.
  • If using the command manually in a shell you may need to prefix it with sleep 1; for it to work correctly, for example sleep 1; xset dpms force off
  • xset dpms 0 0 0, which sets all the DPMS timeouts to zero, could be a better way to "disable" DPMS, since the effect of -dpms would be reverted when, for example, turning off the screen with xset dpms force off.
  • If using xset in xinitrc does not work, specify settings within a file in /etc/X11/xorg.conf.d/, see #Configuration.

Wayland

On Wayland the known DPMS commands from X11 are not applicable, because your compositor controls the screen. Check your compositor for further details on how to configure power saving. In case of a wlroots-based compositor see Wayland#Useful_tools, which list some wlr compatible tools.

Troubleshooting

Monitor won't stay suspended and wakes up every 10-15 seconds

In case of old or buggy hardware you might notice, that the monitor wakes up from suspend every 10-15 seconds, and e.g. monitor OSD shows "DisplayPort no signal". Switching from DisplayPort to DVI or HDMI, or turning off automatic input selection on the monitor might help. Another workaround is to modify the default 10 Hz DRM_OUTPUT_POLL_PERIOD and disable it with kernel parameter drm_kms_helper.poll=0 or via /sys/module/drm_kms_helper/parameters/poll.

See also