DPMS

From MythTV Official Wiki
Revision as of 11:58, 25 May 2010 by Heckheck (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Description

DPMS (Display Power Management Signaling) is a standard from the VESA consortium for managing the power supply of video monitors for computers through the graphics card. The most common use is to shut off the monitor after the computer has been idle for some time.

For further information see Wikipedia:VESA Display Power Management Signaling

Note that using the screen saver to make the display black is not the same as using DPMS to turn the display off. So it makes not very much sense to have the screen saver turned on while DPMS is on. It might even make it hard to test whether DPMS is running or not.

MythTV is aware of DPMS and should prevent it from turning the display off while a show is watched (from which version of MythTV?)

DPMS settings

There are multiple settings that influence monitor power savings:

  • xorg.conf: The monitor section can contain a DPMS option:
Section Monitor
       ...
       Option "DPMS"
       ...
EndSection
  • xorg.conf: The ServerFlags section can contain a NoPM option:
Section "ServerFlags"
       ...
       Option "NoPM" "true"
       ...
EndSection
  • xset can be used from the command line to turn DPMS on/off:
xset -dpms

and:

xset +dpms
  • KDE sometimes has a control panel for power management where DPMS can be selected.
  • Often the BIOS also has options for power management

It is not obvious how these 5 work together. If you know please write it here.

But probably DPMS will work if you add the DPMS option to the Monitor section and make sure that the NoPM section is not placed in ServerFlags. You can also add the following lines to ServerFlags in order to control when the display should be turned off:

Section "ServerFlags"
       ...
      Option  "StandbyTime"   "1"
      Option  "SuspendTime"   "2"
      Option  "OffTime"       "3"
       ...
EndSection

Replace the numbers with the time in minutes you want

Scripts

Turn DPMS on/off with a remote

(Added by Ian Forde)

If you're using MythTV with a monitor and a remote (via lirc), it is possible to use DPMS to power off your monitor. Imagine the scenario where you're using Myth in a bedroom...

Let's say that you've got a Hauppauge grey remote, and want to use the red button for this. Assuming that you've got that button defined in /etc/lircd.conf, put the following into ~<myth user>/.lircrc

 # Red Button
 begin
   prog = irexec
   button = Red
   repeat = 4
   config = /usr/local/bin/monitorpowerbutton.sh
 end

Then you want the following in /usr/local/bin/monitorpowerbutton.sh:

 #!/bin/bash
 
 # adjust these if needed
 export DISPLAY=:0
 export XAUTHORITY=/home/$(ls -l /dev/console|awk '{print $3}')/.Xauthority
 export PATH=${PATH):/usr/X11R6/bin
 
 STATUS=$(xset -q | grep "Monitor is" | awk '{print $3}')
 if [ "${STATUS}" = "On" ]
   then
   xset dpms force off
 else
   # press-any-key should work to wake up, but just in case:
   xset dpms force on
 fi
 exit 0

Inspired by Jarod's power button trick for mythfrontend...

There are more scripts for this purpose at Customized remote control keys

DPMS with lirc and irxevent

(Added by Chris Pinkham)

If you have DPMS enabled and use irxevent with LIRC to control your Myth box, then you may want to configure LIRC to automatically unblank the screen when you press any button on the remote. MythTV will not unblank the screen automatically if you use irxevent to send keypresses to mythfrontend. A simple solution to this is to run irexec along with your existing irxevent and insert the following few lines into your .lircrc file. This will make sure that your screen is unblanked when you click any button on the remote control.

 begin
   prog = irexec
   button = *
   config = xset dpms force on &
 end

Note that this is not necessary if MythTV has been compiled for native lirc support

(Continued by Jim Heck)

While the above method may work in certain cases to fully wake up the screen, you may find that a button press while the screen is in DPMS suspend causes the display to come out of suspend, but not to unblank. This seems to be the case with at least certain NVIDIA cards (observed with a GeForce GT240, but not with a GeForce 7600GS). If this is the case, the following alternate addition to the .lircrc file will cause any button press to deactivate (reset) the screensaver and unblank the screen. Note this assumes the screen is already waking from the suspend state due to the MythTV compiled for native lirc support, but simply not unblanking.

 begin
   prog = irexec
   button = *
   config = xset s reset &
 end