Multi-Screen (3) setup and management

First boot, after … 3years ? messing around, everything seems to be working fine. This install is minimal, not my definite choice, but for now I’m tackling problems before doing a (hopefully final) complete reinstall.

. I can’t get the three screen to work correctly
… 1 screen on the left of the laptop, HDMI plug
… 1 screen on the right of the laptop, USBc plug
whenever I change the setup for one, it remove the other, and now I have the main menu on the left screen (even though the “main” is set to be the central one, the laptop); and as my right screen is upright (for easier text reading) it makes the other screen “out of frame” I only see the bottom of open windows

Any idea ?

The P15 Gen2 has an Intel UHD graphic and RTX A2000 4GB

My bet is your screens are different resolutions. I’ve encountered a LOT of fun with mixed resolutions.

What eventually worked for me was making very small changes, applying between each movement. If the “keep configuration” dialog is not visible, move the display to the opposite location first and save that (if you only see the bottom of the window, after reset, move that screen above the other one).

In my setup, I have 3x 2k screens above 3x 4k screens and trying to get them all online at the same time and aligned properly was a nightmare. I had to start by moving the monitors that are physical on top to be position in the display manager as below my actual bottom monitors. Once I saved this, I was able to reposition them above the others, save, and it kept them.

As for the monitors not be on at all to start, I had this issue too but it seemed to work itself out with me positioning and saving the others, then toggling power on one that wasn’t working, adjusting its position, saving, repeat.

Eventually I was able to get all six on and position correctly but there are still bugs with this configuration I have not worked out. Some application UIs are not clickable after they are moved to my lower res monitors (I suspect it’s a relative mouse position issue but not sure how to confirm).

2 Likes

TY for the tips, and welcome back after 1y (as the forum pointed out)
And yes, I’ve been struggling with non-clickable UIs … my browser !

OK, so I’ll go back to it, and change and change until finding something acceptable :slight_smile:

Hi Erica,
I’ve had the same experience. Debian and Fedora templates have different way of handling this I think. As I am using only Debian templates, this was something that I had to

  • manage lid switch and screen turn off when lid is closed (turn-off-internal-display-if-lid-is-closed.sh)
  • manage desktop layouts by using autorandr.py script (also from within the same script)

In addition, if some VMs were started before connecting the screens, or if some unknown unhandled situation has happened before connecting the screens, I run a separate fix script for (might be debian-specific) fixing the clickable areas. (screen_fix_multi.sh)

I am sharing both for your consideration. Now I don’t have any issues mostly. Running a combination of scripts as required saves my day. I could not automate it further, if you have any suggestions that’s fine as well.

script 1: turn off display if lid is closed script:

turn_on_internal_display() {
	echo "turning on internal display"
	xrandr --output eDP-1 --auto
}

turn_off_internal_display() { 
	echo "turning off internal display"
	xrandr --output eDP-1 --off 
}

handle_resume() { 
	echo "Checking laptop lid"
	LID_STATE=$(cat /proc/acpi/button/lid/LID/state | awk '{print $2}')
	if [ "$LID_STATE" == "closed" ]; then 
		echo "lid is closed"
		turn_off_internal_display 
	elif [ "$LID_STATE" == "open" ]; then 
		echo "lid is open"
		turn_on_internal_display 
	fi 
} 

echo " "
echo "Step 1"
handle_resume
echo " "
echo "Step 2"
echo calling autorandr
python3 $HOME/autorandr/autorandr.py

mapfile -t MONITORS < <(xrandr --listmonitors | grep -v Monitors| awk '{print $4}')

if [ "$LID_STATE" == "open" ]; then
LEFTMONITOR=${MONITORS[1]}
RIGHTMONITOR=${MONITORS[2]}
LAPTOPMONITOR=${MONITORS[0]}
else
LEFTMONITOR=${MONITORS[0]}
RIGHTMONITOR=${MONITORS[1]}
LAPTOPMONITOR=
fi


echo " "
echo "Step 3"
if [ -z "$RIGHTMONITOR" ]; then 
	echo "No right monitor found"
	echo " "
	exit 0
fi
echo setting up leftmonitor: $LEFTMONITOR, rightmonitor: $RIGHTMONITOR
echo " "
if [ -n "$RIGHTMONITOR" ]; then 
	xrandr --output $LEFTMONITOR --primary
	xrandr --output $RIGHTMONITOR --right-of $LEFTMONITOR
fi
if [ -n "$LAPTOPMONITOR" ]; then 
	if [ -n "$RIGHTMONITOR" ]; then 
		echo setting up laptop monitor $LAPTOPMONITOR, right of rightmonitor: $RIGHTMONITOR
		xrandr --output $LAPTOPMONITOR --right-of $RIGHTMONITOR
	fi
fi

echo " "
echo "Step 4"

MINVIDEORAM=`xrandr --verbose| grep "Screen 0"|sed -e 's/.*current //' -e  's/\,.*//'| awk '{print $1*$3*4/1024}'`
echo setting min video ram to $MINVIDEORAM
qvm-features dom0 gui-videoram-min $MINVIDEORAM
qvm-features dom0 gui-videoram-overhead 0

script 2: invoke it with a vm name
$ fix_multi.sh work

VM=$1
echo Asus left, philips right
LEFT="2560x1440_sol"
RIGHT="1920x1080_sag"
UNITED="4480x1440_birlesik" 

qvm-run $VM xrandr --newmode $LEFT 128 2560 2561 2562 2563 1440 1441 1442 1443
qvm-run $VM xrandr --newmode $RIGHT 128 1920 1921 1922 1923 1080 1081 1082 1083
qvm-run $VM xrandr --newmode $UNITED 128 4480 4481 4482 4483 1440 1441 1442 1443
qvm-run $VM xrandr --addmode DUMMY0 $LEFT
qvm-run $VM xrandr --output DUMMY0 --mode $LEFT

qvm-run $VM xrandr --addmode DUMMY1 $RIGHT
qvm-run $VM xrandr --output DUMMY1 --mode $RIGHT

qvm-run $VM xrandr --addmode DUMMY0 $UNITED
qvm-run $VM xrandr --addmode DUMMY1 $UNITED
qvm-run $VM xrandr --output DUMMY0 --mode $UNITED

Probably you can find some more resources if you search on this on the forum.

Also, you may need to adjust the modelines and the screen resolutions in script 2.

1 Like

Same here, I’ve installed using Debian as main, + Fedora for some

I haven’t checked the lid closing but the power mgt is set to switch off the screen after a few minutes, which seems to be working

Side screen are perm plugged, they are ON before the system starts, therefore before any VM or anything else starts

Thank you, I’ll try that, but IDK where to get this script, … in dom0 ?

All three screens are the exact same resolution: 60hz 1920 × 1080 16:9

If I let the default disposition (all three aligned, same orientation) they all work
Screen 1 (laptop); screen 2 (left, HDMI); screen 3 (right, USB-c)

As soon as I start changing the disposition:
screen 2 (left, HDMI); Screen 1 (center, laptop); screen 3 (right, USB-c)
the desktop starts to behave:
The main (with Qubes menu) screen is set to the laptop in options, yet I endup having the menu on the left one
The right screen is upright (for document reading), so I set it as such (rotate) in the option and that makes the screen blank, and push the others out of frame

Could it be something about my NVDIA card versus my Intel UHD ? I’m not even sure which one is running ?

Testing:

  • Debian run with all 3 screen; struggling a bit for the upright but managed to get it working finally
  • Fedora run with all 3 screen, including the upright one, no problem.

So there is something in Qubes :confused:

EDIT: While reinstalling Qubes, I noticed that all three screens are recognized and work just fine (except the one upright which is not rotated)
So it is definitely something inside Qubes-OS parameter :frowning:

It is supposed to be run on dom0.

TY,
Just to make sure: My last post is about fresh install of native OS on this computer, and reporting the result, not about VM with these OS.

When I set it up (inside Qubes) the display, I assume it to be inside dom0, since it’s a system configuration menu, no ?

Some more test:

  • Debian KDE running with 3 screen including on upright (rotate)
  • Fedora KDE running with 3 screen including on upright (rotate)
  • MX-23.6 SystemD (not default SysVinit) KDE running with 3 screen including on upright (rotate)
  • Suse KDE running with 3 screen including on upright (rotate)
  • Kali XCFE: Exact same problem as with Qubes
  • MX-23.6 SystemD XFCE: Exact same problem as with Qubes

Does that gives a hint to anyone ? Could it be because of XFCE ?

EDIT: Adding Desktop Environment for each
They all run X11

Assuming I’m right about XFCE,
What risk is there to change the DE in Dom0 (to Gnome which I don’t like of to KDE which I’m found of since Mandrake and the Suse)
I see in this post that KDE seems to be a candidate and the “right” choice ?
Or should I just wait, using only 2 screens, for the next rev’up onboarding KDE ?