<div dir="ltr"><div>Somebody on Stackoverflow pointed out that for some systems, <br></div><div><br></div><div>xset -q</div><div><br></div><div>returns some info about the displays currently connected and if the driver and monitor support it will return a string such as "Monitor is On" if the display is currently powered on. If that command reports that info for your system reliably, then I could imagine one could create a shell script to query that string and then sound a bell by printing an ASCII bell character `tput bel` or the beep program or aplay or some other audio player program.<br></div><div><br></div><div><a href="https://unix.stackexchange.com/questions/76479/querying-display-power-status-on-linux-xorg-on-command-line" target="_blank">https://unix.stackexchange.<wbr>com/questions/76479/querying-<wbr>display-power-status-on-linux-<wbr>xorg-on-command-line</a></div><div><br></div><div>However, when I tried this on my system, it would still report "Monitor is On" even if I pressed the power switch to turn off my monitor. This might mean that my system is merely detecting the physical connection of the display?</div><div><br></div><div>Someone else on another site suggested installing the ddccontrol package and running</div><div><br></div><div>sudo ddccontrol -p</div><div><br></div><div>to probe the monitor for details that might indicate power status but it seems with my Nvidia drivers there might be a bug and it won't work for my system. Fun times! If you're using the open source drivers you may have more luck.<br></div><div><br></div><div>Now, even if you found a way to read the state, as far as obtaining a response by pressing the buttons on the monitor this would be a little more difficult since most of the time the buttons on the monitor only affect the microcontroller inside the monitor for the on-screen display controls such as brightness/contrast. The ability to interface with that microcontroller would be quite the hardware hacking challenge. What is your goal? Could this be solved with an out of the box solution such as a photodiode circuit to point at your monitor and detect the presence of light?</div><div><br></div><div> - Jess<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 1, 2018 at 10:47 AM, Chime Hart via SGVLUG <span dir="ltr"><<a href="mailto:sgvlug@sgvlug.net" target="_blank">sgvlug@sgvlug.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Well, some days ago I asked a similar question in a blind Linux list, but with no responses. Essentially what I would like is if I push the button on the monitor, either a tone would play or a message would inform if the monitor is on or off? If it were tones, we would probably want asending or desending, depending. Also, I suppose only a pc-speaker would handle that. Thanks so much in advance for any guidance.<span class="HOEnZb"><font color="#888888"><br>
Chime<br>
<br>
</font></span></blockquote></div><br></div>