Difference between revisions of "Display Power Management Signaling"

From ArchWiki
Jump to: navigation, search
(add to Power management category)
(misc formatting)
Line 3: Line 3:
 
{{i18n|Display Power Management Signaling}}
 
{{i18n|Display Power Management Signaling}}
  
'''DPMS''' (Display Power Management Signaling) is a technology that allows power saving behaviour of monitors when the computer is not in use.
+
'''[[Wikipedia:VESA Display Power Management Signaling|DPMS]]''' (Display Power Management Signaling) is a technology that allows power saving behaviour of monitors when the computer is not in use.
  
= Setting up DPMS in X =
+
== Setting up DPMS in X ==
Add the following to your <code>/etc/X11/xorg.conf</code> in the <code>Monitor</code> section:
+
Add the following to your {{filename|/etc/X11/xorg.conf}} in the <code>Monitor</code> section:
 
  Option "DPMS" "true"
 
  Option "DPMS" "true"
{{Note|As of Xorg 1.8 DPMS is auto detected and enabled if ACPI is also enabled at kernel runtime|}}
+
{{Note|As of Xorg 1.8 DPMS is auto detected and enabled if ACPI is also enabled at kernel runtime}}
  
 
Add the following to the <code>ServerLayout</code> section, change the times (in minutes) as necessary:
 
Add the following to the <code>ServerLayout</code> section, change the times (in minutes) as necessary:
Line 14: Line 14:
 
  Option "SuspendTime" "20"
 
  Option "SuspendTime" "20"
 
  Option "OffTime" "30"
 
  Option "OffTime" "30"
'''Note:''' If the ''"OffTime"'' option does not work replace it with the following, (change the ''"blanktime"'' to ''"0"'' to disable screen blanking)
+
{{Note|If the ''"OffTime"'' option does not work replace it with the following, (change the ''"blanktime"'' to ''"0"'' to disable screen blanking)
 
  Option        "BlankTime" "30"
 
  Option        "BlankTime" "30"
 +
}}
  
= DPMS Interaction using xset =
+
== DPMS Interaction using xset ==
 
It is possible to turn off your monitor using the <code>xset</code> tool.  Note that you may need to prefix the command with <code>sleep 1;</code> for it to work correctly.  For example:
 
It is possible to turn off your monitor using the <code>xset</code> tool.  Note that you may need to prefix the command with <code>sleep 1;</code> for it to work correctly.  For example:
 
  sleep 1; xset dpms force off
 
  sleep 1; xset dpms force off
Line 30: Line 31:
 
  xset dpms force on  (also implicitly enables DPMS features)  
 
  xset dpms force on  (also implicitly enables DPMS features)  
  
 +
===To see your 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
  
 
+
===Put screen into standby===
 
+
==To see your current settings==
+
xset q
+
<pre>
+
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
+
</pre>
+
 
+
==Put screen into standby==
+
 
  xset dpms force standby
 
  xset dpms force standby
  
==Put screen into suspend==
+
===Put screen into suspend===
 
  xset dpms force suspend
 
  xset dpms force suspend
  
==Turn off screen immediately==
+
===Turn off screen immediately===
 
If you leave your computer, you don't need to wait for the timeout you set that the display turns off. Simply enforce it by using the xset command.
 
If you leave your computer, you don't need to wait for the timeout you set that the display turns off. Simply enforce it by using the xset command.
 
  xset dpms force off
 
  xset dpms force off
  
 
+
===Change Blank time from 5 min to 1 hour===
==Change Blank time from 5 min to 1 hour==
+
 
  xset s 3600 3600
 
  xset s 3600 3600
  
== Disable DPMS and prevent screen from turning off ==
+
=== Disable DPMS and prevent screen from turning off ===
 
Useful when watching movies or slideshows (thanks damir):
 
Useful when watching movies or slideshows (thanks damir):
 
  xset -dpms;xset s off
 
  xset -dpms;xset s off
  
==Turn off DPMS==
+
===Turn off DPMS===
 
  xset -dpms
 
  xset -dpms
  
==Disable screen saver blanking==
+
===Disable screen saver blanking===
 
  xset s off
 
  xset s off
  
 
+
===xset screen-saver control===
==xset screen-saver control==
+
 
You can use xset to control your screensaver:
 
You can use xset to control your screensaver:
 
  xset s [timeout [cycle]]   
 
  xset s [timeout [cycle]]   
Line 83: Line 80:
 
  xset s reset
 
  xset s reset
  
==xset display.sh==
+
===xset display.sh===
 
You could also copy this script:
 
You could also copy this script:
 
{{file|name=/usr/local/bin/display.sh|content=
 
{{file|name=/usr/local/bin/display.sh|content=
Line 102: Line 99:
 
}}
 
}}
  
Make it executable (<tt>chmod u+x /usr/local/bin/display.sh</tt>) and just run <tt>display.sh off</tt>. For the latter to work you need to include /usr/local/bin into your path, otherwise you have to execute it with the whole path:
+
Make it executable (<code>chmod u+x /usr/local/bin/display.sh</code>) and just run <code>display.sh off</code>. For the latter to work you need to include {{filename|/usr/local/bin}} into your path, otherwise you have to execute it with the whole path:
 
  # With /usr/local/bin in your PATH
 
  # With /usr/local/bin in your PATH
 
  display.sh suspend
 
  display.sh suspend
Line 109: Line 106:
 
  /usr/local/bin/display.sh standby
 
  /usr/local/bin/display.sh standby
  
= DPMS Interaction in a console with setterm =
+
== DPMS Interaction in a 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.  
 
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.  
  
Line 120: Line 117:
 
{{Note|If you haven't already read the brief DPMS article linked to below, please skim it to understand how DPMS can be used in the console the same as in X.}}
 
{{Note|If you haven't already read the brief DPMS article linked to below, please skim it to understand how DPMS can be used in the console the same as in X.}}
  
== Prevent screen from turning off (in console) ==
+
=== Prevent screen from turning off (in console) ===
 
  $ setterm -blank 0 -powerdown 0
 
  $ setterm -blank 0 -powerdown 0
  
Line 127: Line 124:
 
  # echo -ne "\033[9;0]" >> /etc/issue
 
  # echo -ne "\033[9;0]" >> /etc/issue
  
==Pipe the output to a cat to see the escapes ==
+
=== Pipe the output to a cat to see the escapes ===
 
  $ setterm -powerdown 2>&1 | exec cat -v 2>&1 | sed "s/\\^\\[/\\\\033/g"
 
  $ 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==
+
===Pipe the escapes to any tty (with write/append perms) to modify that terminal===
 
Note the use of '''>>''' instead of '''>'''.  For permission issues using sudo in a script or something, you can use the '''tee''' program to append the output of setterm to the tty device, which tty's let appending sometimes but not writing.
 
Note the use of '''>>''' instead of '''>'''.  For permission issues using sudo in a script or something, you can use the '''tee''' program to append the output of setterm to the tty device, which tty's let appending sometimes but not writing.
 
  $ setterm -powerdown 0 > /dev/tty3
 
  $ setterm -powerdown 0 > /dev/tty3
  
===Bash loop to set ttys 0-256===
+
====Bash loop to set ttys 0-256====
 
  $ for i in {0..256}; do setterm -powerdown 0 >> /dev/tty$i; done; unset i;
 
  $ for i in {0..256}; do setterm -powerdown 0 >> /dev/tty$i; done; unset i;
  
= Troubleshooting =
+
== Troubleshooting ==
  
== xset DPMS settings don't work with xscreensaver ==
+
=== xset DPMS settings don't work with xscreensaver ===
  
 
[[xscreensaver]] uses it's own DPMS settings. See the settings for xscreensaver for more information.
 
[[xscreensaver]] uses it's own DPMS settings. See the settings for xscreensaver for more information.
  
=== xscreensaver DPMS ===
+
==== xscreensaver DPMS ====
You can configure xscreensaver's DPMS settings manually by editing your ~/.xscreensaver file as below, or using the xscreensaver-demo gui.
+
You can configure xscreensaver's DPMS settings manually by editing your {{filename|~/.xscreensaver}} file as below, or using the xscreensaver-demo gui.
 
<pre>
 
<pre>
 
timeout: 1:00:00
 
timeout: 1:00:00
Line 161: Line 158:
 
</pre>
 
</pre>
  
= External Resources =
+
== External Resources ==
 
* [http://webpages.charter.net/dperr/dpms.htm PC Monitor DPMS specification explanation]
 
* [http://webpages.charter.net/dperr/dpms.htm PC Monitor DPMS specification explanation]

Revision as of 03:22, 30 July 2011

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

DPMS (Display Power Management Signaling) is a technology that allows power saving behaviour of monitors when the computer is not in use.

Setting up DPMS in X

Add the following to your Template:Filename in the Monitor section:

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

Add the following to the ServerLayout 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 replace it with the following, (change the "blanktime" to "0" to disable screen blanking)
Option         "BlankTime" "30"

DPMS Interaction using xset

It is possible to turn off your monitor using the xset tool. Note that you may need to prefix the command with sleep 1; for it to work correctly. For example:

sleep 1; xset dpms force off

To control Energy Star (DPMS) features (a timeout value of zero disables the mode):

xset -dpms Energy Star features off
xset +dpms Energy Star features on
xset dpms [standby [suspend [off]]]     
xset dpms force standby 
xset dpms force suspend 
xset dpms force off 
xset dpms force on  (also implicitly enables DPMS features) 

To see your 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

Put screen into standby

xset dpms force standby

Put screen into suspend

xset dpms force suspend

Turn off screen immediately

If you leave your computer, you don't need to wait for the timeout you set that the display turns off. Simply enforce it by using the xset command.

xset dpms force off

Change Blank time from 5 min to 1 hour

xset s 3600 3600

Disable DPMS and prevent screen from turning off

Useful when watching movies or slideshows (thanks damir):

xset -dpms;xset s off

Turn off DPMS

xset -dpms

Disable screen saver blanking

xset s off

xset screen-saver control

You can use xset to control your screensaver:

xset s [timeout [cycle]]  
xset s default    
xset s on
xset s blank              
xset s noblank    
xset s off
xset s expose             
xset s noexpose
xset s activate           
xset s reset

xset display.sh

You could also copy this script: Template:File

Make it executable (chmod u+x /usr/local/bin/display.sh) and just run display.sh off. For the latter to work you need to include Template:Filename into your path, otherwise you have to execute it with the whole path:

# With /usr/local/bin in your PATH
display.sh suspend

# Without /usr/local/bin in your PATH
/usr/local/bin/display.sh standby

DPMS Interaction in a 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]
Note: If you haven't already read the brief DPMS article linked to below, please skim it to understand how DPMS can be used in the console the same as in X.

Prevent screen from turning off (in console)

$ 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

Note the use of >> instead of >. For permission issues using sudo in a script or something, you can use the tee program to append the output of setterm to the tty device, which tty's let appending sometimes but not writing.

$ 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;

Troubleshooting

xset DPMS settings don't work with xscreensaver

xscreensaver uses it's own DPMS settings. See the settings for xscreensaver for more information.

xscreensaver DPMS

You can configure xscreensaver's DPMS settings manually by editing your Template:Filename file as below, or using the xscreensaver-demo gui.

timeout:	1:00:00
cycle:		0:05:00
lock:		False
lockTimeout:	0:00:00
passwdTimeout:	0:00:30
fade:		True
unfade:		False
fadeSeconds:	0:00:03
fadeTicks:	20
dpmsEnabled:	True
dpmsStandby:	2:00:00
dpmsSuspend:	2:00:00
dpmsOff:	4:00:00

External Resources