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.
I've taken a look at nvidia-settings -q ConnectedDisplays
and nvidia-settings -q EnabledDisplays
, 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?
I've also looked at xrandr --properties
and it always reports default connected 1920x1080+0+0 0mm x 0mm
regardless.
Where else can I look?
EDIT: Max, thanks for pointing me in the right direction. At this point I've installed the ddccontrol
package and I'm able to run ddccontrol -p
. 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.
Here is an older answer that might help: How to Determine if LCD Monitor is Turned on From Linux Command Line