You are not logged in.

#1 2020-08-05 22:08:13

piomiq
Member
From: Warsaw, Poland
Registered: 2017-08-04
Posts: 25
Website

Is there a way to detect whether an external screen is in on/off mode?

Hi

I'm trying to detect if my external monitor is turned on/off. I need this because usually my external screen is tuned off I turn on it occasionally. Just because this is projector. The issue is that KDE/Plasma sees it even screen is turned off, but connected (here via HDMI). In result I can move mouse on invisible screen, right corner functionality doesn't work, I can move window on this screen and sometimes on this invisible screen I got running windows. To work around this I just set in KDE/Plasma showing new window on cursor position.

I found that xrandr only returns status if any screen if connected or not. I would like to know also if is turned on/off just to be able switch off/on it by xrandr.
In this moment I turn off secondary screen for sddm (by script /usr/share/sddm/scripts/Xsetup) to get one login screen otherwise I have two login screens on one (my screens  have different resolution, so it looked really ugly).

Thanks in advance.

Offline

#2 2020-08-06 01:27:17

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: Is there a way to detect whether an external screen is in on/off mode?

Take a look at https://bbs.archlinux.org/viewtopic.php?id=257700
This is marginally the same issue.  I'll leave this open for now in case it is not.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2020-08-07 20:13:35

piomiq
Member
From: Warsaw, Poland
Registered: 2017-08-04
Posts: 25
Website

Re: Is there a way to detect whether an external screen is in on/off mode?

Thank you for url with similar topic. Unfortunately issue wasn't solved. Therefore still I don't know how to detect if external monitor is on/off. I'm digging in Internet but cannot find any solution.

I tried following things:

  • xrandr reports always connected no matter if display is on/off (tested on monitor and projector)

  • xset -q shows always "Monitor is On" and not matter if display is on/off (tested on both devices)

  • xev shows nothing, called like this: xev -root -event randr

  • x-on-resize shows nothing, called like this: x-on-resize -a or x-on-resize -s :0

  • sudo ddccontrol -p the displays detected (need to be i2c kernel modules loaded), but no information if they are turn on/off. At end says that "Missing monitors supported DDC/CI".

  • sudo ddcutil the displays detected (need to be i2c kernel modules loaded), but no information if they are turn on/off

  • sudo udevadm monitor --property reports something if I turn off my primary monitory, but when I turn on and off projector nothing happens.

Last edited by piomiq (2020-08-07 22:59:09)

Offline

Board footer

Powered by FluxBB