You are not logged in.

#1 2021-09-18 13:23:29

Lonttu03
Member
Registered: 2021-09-18
Posts: 5

Dualhead GPU multiseat setup using xorg-xephyr + any display manager

I've been trying to get a setup working, where arch boots into a display manager that will launch one X server including all monitors (in my case 2), and on login gives the user a fullscreen Xephyr window for his monitor, keyboard and mouse. There's plenty of documentation about this, and i've managed to find some scripts that should do the Xephyr initialization complete with keyboard and mouse grabbing and monitor assignment. The problem is, all of the documentation regarding the implementation on the display manager is outdated. Also i'm not good enough with bash scripting and display manager configuration that i could fix them myself. I tried, but failed miserably.

This 12 year old post from this very forum is the closest i've gotten to anything, but it uses gdm 2.20 meaning that the display manager configuration is obsolete. I tried using gdm 2.20 using gdm-old from AUR, but as luck would have it the package is broken.
https://bbs.archlinux.org/viewtopic.php?id=79620

From what i've understood, this solution has 2 Xephyr wrapper scripts that are given to gdm. One of them summons Xephyr and binds a keyboard and mouse to it, and the other one moves and resizes the Xephyr window to a monitor.

I also found this blog, that had a similar solution using lightdm but lightdm configuration has also chanced since this solution was made.
http://beforeafterx.blogspot.com/2012/0 … mconf.html

I would prefer not to use loginctl for seat assignment if possible. From what i've been testing, it for some reason forgets your hardware assignments on reboot until you add another device to the seat. Then it somehow remembers the assignments.

Here's some system info:

lspci | grep "VGA"
26:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (rev ef)
# /etc/X11/xorg.conf

Section "Device"
        Identifier      "Card0"
        BoardName       "RX 580"
        Driver          "amdgpu"
        BusID           "PCI:26:0:0"
        Option          "Monitor-HDMI-A-0" "Mon-HDMI"
        Option          "Monitor-DVI-D-0" "Mon-DVI"
EndSection

Section "Monitor"
        Identifier      "Mon-HDMI"
        Option          "DPMS"
EndSection

Section "Monitor"
        Identifier      "Mon-DVI"
        Option          "DPMS"
        Option          "RightOf"       "Mon-VGA"
EndSection

Section "Screen"
        Identifier      "Screen-base"
        Device          "Card0"
        Monitor         "Mon-HDMI"
        DefaultDepth    24
        Subsection      "Display"
                Depth   24
                Modes   "1920x1080"
                Virtual 3840 1080
        EndSubSection
EndSection

Section "ServerFlags"
        Option "AllowMouseOpenFail" "yes"
        #Option "DontVTSwitch" "yes"
        #Option "DontZap" "yes"
EndSection

Offline

#2 2021-09-20 00:35:58

bnb2235
Member
Registered: 2011-02-13
Posts: 119

Re: Dualhead GPU multiseat setup using xorg-xephyr + any display manager

I cant offer any help for dual head multiseat. As far as I know, multiseat via loginctl requires two video cards. You can search for multiseat and my username and see some old posts, but the information is still current. I still have the same hardware and loginctl configuration. Currently I run GDM as the display manager. Things are working fine. For me, seat0 uses wayland and seat1 uses x11. I cannot successfully get wayland to run on both seats. On seat0, I can log out and login all day long (if I wanted to). Seat1 can login one time and works thru suspend and so forth. However, a logout on seat1 will not bring back a login screen. To get a login screen back, the computer needs restarted. LightDM can login and out on all seats repeatedly, but currently GDM screen locking and Gnome go together and the logout on seat1 just never happens, so I run GDM. For reference, seat0 runs dual monitors, seat1 uses a single monitor (by choice, not by requirement)

Last edited by bnb2235 (2021-09-20 19:11:15)

Offline

#3 2021-09-20 07:19:04

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,442

Re: Dualhead GPU multiseat setup using xorg-xephyr + any display manager

You can have a zaphod setup on one GPU, using xephyr (or any nested display server)

The challenge here is to
1. run some DM on the hardware DISPLAY
2. make it start sessions on a nested DISPLAY
3. The OP doesn't (?) want to use udev to control the ID_SEAT of input devices

From the generic DMs, lightdm seems to have a sufficient infrastructure for the task and you'll simply have to write static layouts for the nested server(s):
https://askubuntu.com/questions/115421/ … ith-xephyr

Offline

#4 2021-09-20 09:01:47

Lonttu03
Member
Registered: 2021-09-18
Posts: 5

Re: Dualhead GPU multiseat setup using xorg-xephyr + any display manager

seth wrote:

You can have a zaphod setup on one GPU, using xephyr (or any nested display server)]

Alright, i have an idea. I would have one X server running for lightdm and seperate both of my monitors by using zaphod, and replace the lightdm greeter with a Xephyr session on login.
But there are some problems. Firstly, i don't even know if lightdm will give a greeter to both monitors this way, and secondly how am going to get lightdm to point the right seats. There's a high chance lightdm will assume seat0 with default loginctl configuration. The only way around that would be assigning the seats through loginctl, which i'm trying to avoid as it's buggy.

Althogh i'm thinking, could i put a Xephyr launch script into /usr/share/xsessions and launch it that way? I could duplicate it and have different seats defined in the script itself, and that way choose the seat on login.

I'm going to report back if i get any of this to work.

Offline

#5 2021-09-22 08:26:24

Lonttu03
Member
Registered: 2021-09-18
Posts: 5

Re: Dualhead GPU multiseat setup using xorg-xephyr + any display manager

Update on the situation: I got zaphodheads working on my xorg.conf, both of my monitors are now split to seperate X screens.

This should work on most modern amd single-card setups: just replace all the inputs (HDMI-A-0 for example) with what you find from the xrandr command, And if you want to disable mouse crossing between screens, replace rightof "ScreenHDMI" with 0 0 and it's disabled. This xorg.conf is not the cleanest though, there are some commented lines and the monitor entries can probably be left out.

Section "ServerLayout"
	Identifier	"LayoutDual"
	Screen		0		"ScreenHDMI" 0 0
	Screen		1		"ScreenDVI" rightof "ScreenHDMI"
EndSection

Section "ServerFlags"
	Option "DefaultServerLayout" "LayoutDual"        
	Option "AllowMouseOpenFail" "yes"
        #Option "DontVTSwitch" "yes"
        #Option "DontZap" "yes"
EndSection

Section "Device"
        Identifier      "Card0HDMI"
        Driver          "amdgpu"
	Screen		0
	Option		"ZaphodHeads"	"HDMI-A-0"
	#Option		"NoAccel"	"true"
EndSection

Section "Device"
        Identifier      "Card0DVI"
        Driver          "amdgpu"
	Screen		1
	Option		"ZaphodHeads"	"DVI-D-0"
	#Option		"NoAccel"	"true"
EndSection

Section "Monitor"
	Identifier	"MonitorHDMI"
	#Option		"Monitor-HDMI-A-O"	"MonitorHDMI"
EndSection

Section "Monitor"
	Identifier	"MonitorDVI"
	#Option		"Monitor-DVI-D-0"	"MonitorDVI"
EndSection

Section "Screen"
        Identifier      "ScreenHDMI"
        Device          "Card0HDMI"
	Monitor		"MonitorHDMI"
        DefaultDepth    24
	SubSection "Display"
		Depth     24
	EndSubSection
EndSection

Section "Screen"
	Identifier	"ScreenDVI"
	Device		"Card0DVI"
	Monitor		"MonitorDVI"
	DefaultDepth	24
	SubSection "Display"
		Depth     24
	EndSubSection
EndSection

Unfortunately, i couldn't get any display managers to use the screens. I tried LightDM, SDDM, LXDM and GDM on their default configurations but none of them would take advantage of this. GDM seems to ignore the xorg.conf file completely and act in xorg defaults, meanwhile any of the other ones just can't use the second display, they always defaulted to only use the left monitor.

So i tried to tweak LightDM to use the second monitor, but couldn't. I didn't find a way to make lightdm display it's greeter on multiple screens, and turns out i can't use LightDM's seat functionality, because of loginctl. It requires loginctl to have a graphics device attached to the seat defined in LightDM, but if i try to assign a specific port of the graphics device, it will assign the whole graphic device on reboot blanking my displays. I can't split my graphics card in loginctl, thus i can't use LightDM seating.

I've been thinking though, is it possible to run more than one display manager at the same time? And is it also possible to run an X server before any display manager is started? I don't know if it's possible, but if you could start an X server and run 2 instances of a display manager on top of it, on separate screens, this could work. I tried to do some research, but found nothing on this.

Tl:dr, i can't get any display manager to use both X screens.

Offline

#6 2021-09-22 21:07:10

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,442

Re: Dualhead GPU multiseat setup using xorg-xephyr + any display manager

Where does that com from?

Option		"ZaphodHeads"	"DVI-D-0"

Tl:dr, i can't get any display manager to use both X screens.

Because you configured an actual zaphod setup, no xwayland afaics?
https://wiki.archlinux.org/title/Xorg_multiseat

Offline

#7 2021-09-24 12:32:04

Lonttu03
Member
Registered: 2021-09-18
Posts: 5

Re: Dualhead GPU multiseat setup using xorg-xephyr + any display manager

Yes, this is an actual zaphod setup. That option comes from the amdgpu driver, see here for a list of them. LightDM will launch X with zaphod splitting the monitors into two screens, and can only use one of the screens. This setup is using pure X, no wayland or xwayland involved.

Offline

#8 2021-09-24 15:26:13

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,442

Re: Dualhead GPU multiseat setup using xorg-xephyr + any display manager

Sorry, I meant to say write "Xephyr" which I assumed was the premise of this thread?

Offline

#9 2021-09-25 19:39:08

Lonttu03
Member
Registered: 2021-09-18
Posts: 5

Re: Dualhead GPU multiseat setup using xorg-xephyr + any display manager

I haven't setup the xephyr side of things properly yet, as i need to get the display manager to play along first. But i do have some reference scripts that should launch xephyr, assign inputs and make it fullscreen.

Offline

Board footer

Powered by FluxBB