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.
It may seem obvious, but first, make sure the monitor is turned on. If you don't see a power LED (blue, green, or orange light) on the monitor's front or bottom, press the power button again.
If the light on the monitor remains off, the monitor is not receiving power from either the wall outlet or the power adapter. If you have a flat panel LCD monitor, unplug the monitor power cable, wait about 30 seconds, reconnect the cable and then turn on the monitor. This resets the electronics on the monitor.
Here is an older answer that might help: How to Determine if LCD Monitor is Turned on From Linux Command Line
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With