Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detecting if the monitor is powered off

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.

like image 686
Matt Gorecki Avatar asked Apr 28 '11 03:04

Matt Gorecki


People also ask

How tell if monitor is turned on?

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.

Why is my monitor not turning on even when plugged in?

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.


1 Answers

Here is an older answer that might help: How to Determine if LCD Monitor is Turned on From Linux Command Line

like image 128
Max Avatar answered Sep 25 '22 00:09

Max