S.K.R. de Jong <
SK...@nowhere.net> wrote:
> On Wed, 29 Sep 2021 13:13:55 +0000, Rich wrote:
>
>> S.K.R. de Jong <
SK...@nowhere.net> wrote:
>>> I frequently connect over VNC to a system running Slackware 14.2
>>> where an X windows session is running on a monitor connected over
>>> DisplayPort to that system.
>>>
>>> Without being physically there, would it be possible to detect,
>>> from the 14.2 command line, whether or not the monitor is turned on? I
>>> have done an online search for solutions and came across a number of
>>> things that seem to work for some people under Red Hat or Ubuntu - but
>>> have yet to find anything that works under Slackware.
>>
>> Provided you have the DISPLAY variable set to point at the remote X
>> server, then 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.
>
> I tried that first, but this is what I get:
>
> DPMS (Energy Star):
> Standby: 7200 Suspend: 7200 Off: 14400
> DPMS is Disabled
>
> I don't know why DPMS is disabled,
Likely you never enabled it, or specifically disabled it at some point.
DPMS stands for Display Power Management Ssignaling and is a VESA
standard that allows the attached computer to signal the monitor to
enter a low power state.
https://en.wikipedia.org/wiki/VESA_Display_Power_Management_Signaling
> and before enabling it I would like to have the certainty that doing
> such a thing is not going to mess up with my existing X session.
Turning it on should do nothing to your existing session (other than
allow the computer to automatically power down your monitor when you
are not using the computer).
> This aside, many people report that the output from xset q is
> not reliable in this respect: it may tell you that the monitor is on
> when it really is off, or vice-versa.
The output from xset tells you whether the computer is signaling the
monitor to turn off or not. Whether the monitor is truly off depends
upon whether the monitor responds to DPMS power down signals and powers
down in response.