With a small patch to X server it is possible to run several seats with full HW acceleration on 1 GPU each using their own output.
Using a hacked up configuration that will start 3 seat this way.
Solution is using a whole X server as DRM lease manager and “xlease” utility to request leases for 3 other X servers for the seats.
Its not the most elegant solution but it works.
Problem is that it does not work for wayland compositors and xlease utility can lease only 1 output.
VR need to lease 2 outputs, main monitor + headset.
Searching for DRM lease manager got me only returned GitHub - AGLExport/drm-lease-manager
It would need to be integrated to X server and wayland managers.
My question would be if there is a standard solution for multiseat using DRM leases.
Patch for X server for those interested:
diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c
index e2a2a1050..06450aec7 100644
--- a/glamor/glamor_egl.c
+++ b/glamor/glamor_egl.c
@@ -828,6 +828,10 @@ glamor_dri3_open_client(ClientPtr client,
int fd;
drm_magic_t magic;
+ /* When running atop of DRM lease open render node as the device is owned by lessor */
+ if (xf86DRMMasterFd >= 0 )
+ glamor_egl->device_path = drmGetRenderDeviceNameFromFd(glamor_egl->fd);
+
fd = open(glamor_egl->device_path, O_RDWR|O_CLOEXEC);
if (fd < 0)
return BadAlloc;
Thank you, it is great! Together with patch in this thread https://gitlab.freedesktop.org/xorg/xserver/-/issues/664 I’ve got two X’s running, though with some issues with sync. May be there are some additional pieces required?
The patch from gitlab.freedesktop.org is an older patch I wrote for accelerated OpenGL in X on running atop DRM lease.
I was using a separate X server just to manage the leases.
Now I use the DRM Lease Manager instead.
If you also want to use the DRM Lease Manager you should use the patch from my previous post.
You should not mix the patch from freedesktop with the patch from my previous post.
In the DRM Lease Manager patch there is already simplified way to use DRM nodes for Glamor.
It is the first part:
diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c
index 6e0fc6596..e9d704327 100644
--- a/glamor/glamor_egl.c
+++ b/glamor/glamor_egl.c
@@ -803,7 +803,11 @@ glamor_dri3_open_client(ClientPtr client,
fd = open(glamor_egl->device_path, O_RDWR|O_CLOEXEC);
if (fd < 0)
- return BadAlloc;
+ /* Lets try open render node because we may be running atop DRM lease */
+ glamor_egl->device_path = drmGetRenderDeviceNameFromFd(glamor_egl->fd);
+ fd = open(glamor_egl->device_path, O_RDWR|O_CLOEXEC);
+ if (fd < 0)
+ return BadAlloc;
/* Before FD passing in the X protocol with DRI3 (and increased
* security of rendering with per-process address spaces on the
Hello. I applied your “xserver_multiseat.patch” to the Xorg 1.21.1.13 server source code. After successful compilation, I started running 2 Xorg servers for different seats of my computer on one RX 580 video card (HDMI-A-1 and DVI-D-1), but when starting the second server, an incomprehensible list of errors appears, trying to start one Xorg server with enabled drm-lease-manager also causes errors.