From: Henrik.Carlqvist@deadspam.com   
      
   On Thu, 30 Sep 2021 04:14:28 +0000, Rich wrote:   
      
   > Mike wrote:   
   >> In article , Rich    
   >> wrote:   
   >>   
   >>>> ... whether or not the monitor is turned on?   
   >>   
   >>> it is possible that "xset q" will tell you what you want.   
   >>>   
   >>>One of the things that it returns is:   
   >>>   
   >>> DPMS (Energy Star):   
   >>> Standby: 600 Suspend: 600 Off: 600 DPMS is Enabled Monitor   
   >>> is On   
   >>>   
   >>>Note the "Monitor is On" line.   
   >>   
   >> It is possible it will lie to you too :(   
   >> ...   
   >> Maybe this is only querying whether the computer thinks the monitor   
   >> should be active/blanked/part sleeped/deep sleeped,   
   >> rather than interrogating the monitor to find if the power is on.   
   >   
   > What it tells you is whether X has used the DPMS signalling to instruct   
   > the monitor to turn itself off.   
   >   
   > If you are looking for it being physically turned on/off, then this   
   > method will not help detect that fact.   
      
   Many years ago, before Xorg was able to automagically select the right   
   resolution for your monitor (maybe this was on the XFree86 days) you had   
   to edit your Xorg.conf or xfree86.conf to add modelines which matched   
   your monitor. Somehow I was able to automate this during install calling   
   some program which queried the monitors capabilities using dpms and then   
   added the needed modelines to xorg.conf. Once xorg.conf fixed this   
   automagically I no longer needed this in my custom installation scripts   
   and I have now forgotten what the name of the program was.   
      
   A similar program is dmidecode, but that was not the tool used to query   
   monitor capabilities.   
      
   My guess is that the program querying the monitor for resolutions will   
   only work if the monitor is on.   
      
   Maybe the command was xcmddc, but then possibly it only did work with   
   VGA monitors.   
      
   regards Henrik   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|