title: Detecting if the monitor is powered off
body: <p>I have a kiosk type application and I need to be notified if the LCD TV is powered off so I can chastise someone.  I'm running Ubuntu 10.10 with nVidia video cards and the nVidia drivers.  The TVs are plugged in via HDMI.</p>
  
  <p>I've taken a look at <code>nvidia-settings -q ConnectedDisplays</code> and <code>nvidia-settings -q EnabledDisplays</code>, but both always report the monitor is connected.  I'm guessing that this value is only set once when the monitor is first powered on?</p>
  
  <p>I've also looked at <code>xrandr --properties</code> and it always reports <code>default connected 1920x1080+0+0 0mm x 0mm</code> regardless.</p>
  
  <p>Where else can I look?</p>
  
  <p>EDIT:  Max, thanks for pointing me in the right direction.  At this point I've installed the <code>ddccontrol</code> package and I'm able to run <code>ddccontrol -p</code>.  If the monitor is turned on I receive a bunch of power, color and geometry values, and if the monitor is turned off it returns mostly empty.  I'm going to work on a little python script to parse it out.</p>