You are not logged in.

#1 2022-11-15 03:37:16

emjustem
Member
Registered: 2022-09-23
Posts: 16

setting up multiple X Screens for multimonitor

I have 3 monitors, and for various reasons I want them each on their own x screen
I think I set up my xorg.conf right but something must be wrong. When I boot up into X, all 3 monitors work, except they seem to be part of the same Screen. I can move windows between them and xrandr only lists one Screen; finally and most importantly, I can't launch an app on a specific screen using DISPLAY=:0.1 or :0.2. Anyone see what I am doing wrong? One thing I'm not really clear on is how I assign a "Monitor" section to a physical device (like how a a Device section has a "BusID"), so maybe that's the issue.

You may notice something unusual with a disabled Device, that's for something else, GPU passthrough to virtual machines

Section "ServerLayout"
	Identifier "layout"
	Screen 0 "main"
	Screen 1 "secondary" RightOf "main"
	Screen 2 "crt" LeftOf "main"
	Inactive "rx6800"
EndSection

Section "Device"
	Identifier "rx590"
	Driver "amdgpu"
	BusID "PCI:4:0:0"
EndSection

Section "Device"
	Identifier "rx6800"
	Driver "amdgpu"
	BusID "PCI:3:0:0"
EndSection

Section "Screen"
	Identifier "main"
	Device "rx590"
	Monitor "main"
EndSection

Section "Screen"
	Identifier "rx6800"
	Device "rx6800"
EndSection

Section "Screen"
	Identifier "crt"
	Device "rx590"
EndSection

Section "Screen"
	Identifier "secondary"
	Device "rx590"
EndSection

#CRT
Section "Monitor"
	#Identifier "HDMI-A-1"
	Identifier "HDMI-A-1"
EndSection

#main
Section "Monitor"
	Identifier "DisplayPort-3"
EndSection

#secondary
Section "Monitor"
	Identifier "DVI-D-0"
EndSection

Offline

#2 2022-11-15 08:59:51

seth
Member
Registered: 2012-09-03
Posts: 33,623

Re: setting up multiple X Screens for multimonitor

Check and post your xorg log, https://wiki.archlinux.org/title/Xorg#General but

Monitor "main"

is wrong (the "main" monitor has the identifier "DisplayPort-3" and that'll probably not work, resp. if that's the output name in "xrandr" you can skip those sections)
Other screens have no monitor attached at all.

Inactive "rx6800"

You intentionally don't want to use this?

Offline

#3 2022-11-15 23:25:55

emjustem
Member
Registered: 2022-09-23
Posts: 16

Re: setting up multiple X Screens for multimonitor

Ok, I made those corrections.

Here's my xorg.log https://pastebin.com/Tkgs50KJ

and my xrandr output: https://pastebin.com/7NQ9V6pq

You are correct, even after the corrections they seem to still be acting as one screen.

You intentionally don't want to use this?

Well, I don't want to use it as a device for X. I want to pass it through to a VM.

Offline

#4 2022-11-15 23:27:05

emjustem
Member
Registered: 2022-09-23
Posts: 16

Re: setting up multiple X Screens for multimonitor

Ok, I made those corrections.

Here's my xorg.log https://pastebin.com/Tkgs50KJ

and my xrandr output: https://pastebin.com/7NQ9V6pq

You are correct, even after the corrections they seem to still be acting as one screen.

You intentionally don't want to use this?

Well, I don't want to use it as a device for X. I want to pass it through to a VM.

Offline

#5 2022-11-16 07:05:37

seth
Member
Registered: 2012-09-03
Posts: 33,623

Re: setting up multiple X Screens for multimonitor

Put https://man.archlinux.org/man/extra/xf8 … n#Option~3 into the device sections and reference the desired output names there as well.
Not sure whether the current behavior is bc. of the amdgpu driver or the second GPU present.

Offline

#6 2022-11-18 04:21:28

emjustem
Member
Registered: 2022-09-23
Posts: 16

Re: setting up multiple X Screens for multimonitor

I've made those changes, no luck. conf: http://0x0.st/oIkn.txt

Offline

#7 2022-11-18 08:16:13

seth
Member
Registered: 2012-09-03
Posts: 33,623

Re: setting up multiple X Screens for multimonitor

Section "Device"
	Identifier "rx590"
	Driver "amdgpu"
	BusID "PCI:4:0:0"
	Option "ZaphodHeads" "HDMI-A-1,DVI-D-0,DisplayPort-3"
EndSection

You're gonna need 3 ("three") Device Sections, reference one output as ZaphodHeads in each and reference the different devices from different screens.
Depending on what your previous config looked like, you might not even need the ZaphodHeads

Offline

#8 2022-11-23 00:55:43

emjustem
Member
Registered: 2022-09-23
Posts: 16

Re: setting up multiple X Screens for multimonitor

sorry I had to step away from this for a bit. I've tried with the zaphodheads option and without it, and in both cases I seem to still have a single screen-- although my xorg log DOES seem to know that there are supposed to be 3... but for some reason by the time x finishes starting up, it's back to 1.

xrandr: http://0x0.st/oUzM.txt

xorg.0.log: http://0x0.st/oUzu.txt

/etc/X11/xorg.conf.d/25-monitors.conf: http://0x0.st/oUzS.txt

Offline

#9 2022-11-23 15:37:36

seth
Member
Registered: 2012-09-03
Posts: 33,623

Re: setting up multiple X Screens for multimonitor

What does the log look like w/ "ZaphodHeads" enabled?
https://wiki.archlinux.org/title/ATI#In … _X_screens also back-references the Screen in the Device ("Screen 0"), so try that as well.

This is redundant:

#CRT
Section "Monitor"
	Identifier "HDMI-A-1"
EndSection

#main
Section "Monitor"
	Identifier "DisplayPort-3"
EndSection

#secondary
Section "Monitor"
	Identifier "DVI-D-0"
EndSection

Offline

#10 2022-11-24 02:09:21

emjustem
Member
Registered: 2022-09-23
Posts: 16

Re: setting up multiple X Screens for multimonitor

Ok, it looks like backreferencing the screen in the device, (or possibly commenting out the Monitor sections, or possibly one of those plus enabling zaphodheads) has done it. I now have actual separate X screens.

However, there is still one issue:
https://wiki.archlinux.org/title/Multih … te_screens says that I can launch programs on the other screens by setting the DISPLAY env var, the example they use is

DISPLAY=:0.1 urxvt &

However, when I try

 DISPLAY=:0.1 xfce4-terminal 

it still opens on the main screen. I also tried with DISPLAY=:0.2 and :1.0 and :2.0 but none of them worked (:1.0 and :2.0 gave an error about being unable to open the display, :0.1 and :0.2 simply opened on the main screen)



Edit: Interestingly, I have noticed that DISPLAY=:0.1 does work when I use twm instead of xfce.

Last edited by emjustem (2022-11-24 05:10:58)

Offline

#11 2022-11-24 07:22:13

seth
Member
Registered: 2012-09-03
Posts: 33,623

Re: setting up multiple X Screens for multimonitor

DISPLAY=:0.1 xfce4-terminal

I suspect that xfce4-terminal runs a master process and subsequent instance will use IPC (dbus) to make that master process spawn a new window - you cannot switch the DISPLAY, because you're not creating a new X11 client.
Try

DISPLAY=:0.1 xfce4-terminal --disable-server

This will apply to several more "sophisticated" programs (esp. browsers), xterm/urxvt are better testcases for this.

Offline

Board footer

Powered by FluxBB