You are not logged in.

#1 2015-07-04 16:21:38

Gingko
Member
Registered: 2015-07-04
Posts: 17

Independently suspend monitors driven by the same display hardware.

Hello,

I am working on an embedded device powered by an Archlinux OS installed on a ASRock IMB-151 motherboard.

This device has two screen monitors (actually two LCD panels) connected on it, one using the LVDS interface provided by this motherboard, the other being connected to the HDMI connector, and both are driven by the same display controller (Intel Gen7 Intel Graphics DX 11).

These two LCD panels work by displaying exactly the same thing (that is, the contents of a web page, using the XulRunner application).

This works quite fine, but I am requested now to supply a feature that I don't know if it is even possible:

I need to be able to put LCD panels sleeping separately (that is, blanking screen and disabling power if possible), by software.
That means, I need to be able to:

  • Put LCD panel 1 sleeping

  • …or put LCD panel 2 sleeping

  • …or put both LCD panels sleeping.

I can quite easily suspend or wake both LCD panels at once, using the xset utility.

But do you know if can use xset or another utility, eventually with a specific Xorg configuration, for suspending one LCD panel while keeping the other one displaying normally?

This is required by our customer who wants to be able to discard either one of the LCD panels if ever it happens it becomes defective, without having to disable the whole device.

Thank you very much in advance for any answer.

Gingko

Offline

#2 2015-07-07 08:03:44

revellion
Member
From: Sweden
Registered: 2007-04-10
Posts: 54

Re: Independently suspend monitors driven by the same display hardware.

Simply use xrandr to disable the outputs?. That would likely put the devices into sleep.

Such as

xrandr --output HDMI1 --off

or xrandr --output LVDS1 --off

and then wake em up and set a mode to trigger them to wake up?

check the manpage of xrandr.


Hurricane Electric Certified IPv6 Sage

CPU: Core i7-2600 @ 4.0Ghz | RAM: 16GB (4x4GB) | GFX: AMD Radeon R9 290 4096MB VRAM | HDD: 1x 120GB SATA3 Corsair SSD (~500MB/s RW), 1x SATA2 250GB, 1x SATA2 320GB, 1x 180GB SATA3 Intel SSD
*EDIT* Replaced Nvidia GTX 570 for a AMD Radeon R9 290, and added an extra SSD 180GB

Offline

#3 2015-07-07 08:16:07

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: Independently suspend monitors driven by the same display hardware.

In addition, man xset, it also has a display and even a host switch.

Offline

#4 2015-07-07 08:37:54

Gingko
Member
Registered: 2015-07-04
Posts: 17

Re: Independently suspend monitors driven by the same display hardware.

revellion wrote:

Simply use xrandr to disable the outputs?. That would likely put the devices into sleep.

Such as

xrandr --output HDMI1 --off

or xrandr --output LVDS1 --off

and then wake em up and set a mode to trigger them to wake up?

check the manpage of xrandr.

Yes, I tried to do this in the meantime. This works more or less, but I didn't find how to re-enable each devices reliably afterwards (there doesn't seem to be an --on option, and the --auto option gives me some unwanted side effects that our customer will probably don't understand).

As I was in a hurry, the less bad workaround that I found has been defining these three commands that, in the case of our projet, seems to give what I want, at least visually (DP2 and HDMI1 are the names of our displays, as reported by xrandr) :

xrandr --output HDMI1 --right-of DP2       # for displaying only LVDS
xrandr --output DP2 --right-of HDMI1       # for displaying only HDMI
xrandr --output HDMI1 --same-as DP2        # for returning to dual display

... plus some xset commands for suspending all screens and avoiding screensaver.

As the window of our application doesn't extend beyond the left screen, the result is that the right part of the screen appears black.

I hope to improve that in future versions, but I need first to understand much more better all the way of controlling Xorg displays and layout in Linux/Archlinux.

Gingko

Offline

#5 2015-07-07 09:17:10

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: Independently suspend monitors driven by the same display hardware.

If you're having troube with the xrandr syntax, then try arandr. It's a GUI that can save whatever it does to a script, easy to read and understand. It does not support the --refresh option, but once you understood how it works, things like that can be added manually.

There is no on switch. Under omission of --off, setting a mode turns on a display. I would suggest a chain of --{mode,rate,pos,rotate}, this should cover the basics. The following example turns off eDP1 (the laptop screen) and turns on one of the HDMI ports:

xrandr -output eDP1 --off --output HDMI2 --mode 1920x1080 --rate 60 --pos 0x0 --rotate normal

By the way: Under "normal" circumstances, you have one big giant wall with coordinates starting in the bottom left with 0x0. You basically tell the monitor which part to display, by giving it dimensions (--mode) and a position (--pos). If you want to clone a display, you give it identical dimensions and positions. You can even have displays overlap, say both have --mode 100x100, but the positions are --pos 0x0 and --pos 0x50. You'd have a viewport of 100x150 pixel and the area [50-100]x[0-100] would be visible on both screens. Well, too much blabla, I guess you know what "overlap" means :-)

That means --right of DISPLAY is a script, that takes the dimensions from --mode to calculate --pos.

Offline

#6 2015-07-07 10:46:43

Gingko
Member
Registered: 2015-07-04
Posts: 17

Re: Independently suspend monitors driven by the same display hardware.

Awebb wrote:

If you're having trouble with the xrandr syntax, then try arandr. It's a GUI that can save whatever it does to a script, easy to read and understand. It does not support the --refresh option, but once you understood how it works, things like that can be added manually.

This is not possible.

Although we use Xorg for displaying, our application limits display to only what we have to display (web pages to a mirrored pair of external monitor, located back to back), and the display is not part of the user interface.
We don't have a desktop nor any window manager, so we cannot have any GUI application other than the browser one (XulRunner).
All commands will be given using SSH, and probably later through a small embedded web server (lighttpd), accessed by network from another computer.

This organization raises a lot of problems that I am trying to solve one by one.

Gingko

Offline

#7 2015-07-07 11:26:00

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: Independently suspend monitors driven by the same display hardware.

You can run arandr on any Linux device. I meant it to be an easy way to understand xrandr syntax, as it can generate shell scripts with xrandr code.

Offline

Board footer

Powered by FluxBB