Hi Adam,
On Sun, Jun 29, 2014 at 10:08 AM, Dr Adam John Trickett <
adam.trickett@???> wrote:
>
> As far as I can tell X and xrandr is able to detect both devices when they
> are
> plugged in but can't actually tell me when they are switched on or off. So
> if I
> only have one monitor powered on (even at the mains) xrandr reports both
> present and hence X and KDE think that there are two monitors in situ.
>
If you control the monitors using xrandr itself rather than power, I think
you can probably rely on the output of xrandr -q. If the monitor is
switched on, you'll see a + (preferred) and a * (current). If you see
neither, but it's still connected, it's off:
I can write a small script to manually change from a 1 to 2 monitor set-up,
> which isn't a problem, I just wondered if anyone knows how to detect if
> there
> is a monitor plugged in but switched off?
>
Xrandr is just a configuration utility onto RandR - resize and rotate. It
doesn't know anything about power. I can't think of a way to detect this,
tbh.
S.
--
Please post to: Hampshire@???
Web Interface:
https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL:
http://www.hantslug.org.uk
--------------------------------------------------------------