In my xorg.conf's ServerFlags section I have: Option "MaxClients" "512" This works fine with x11-base/xorg-server-1.20.* With x11-base/xorg-server-21*, X clients start getting BadIDChoice errors once there are ~256 connections: $ for A in $(seq 1 300) ; do xterm & sleep 0.2 ; done ... [212] 17654 $ X Error of failed request: BadIDChoice (invalid resource ID chosen for this connection) Major opcode of failed request: 55 (X_CreateGC) Resource id in failed request: 0x20000000 Serial number of failed request: 3 Current serial number in output stream: 7 At that point, according to xrestop, there were 256 connections (with the balance taken up by window manager, other apps, etc.). Downgrading back to x11-base/xorg-server-1.20.* avoids the error. This happened the first time I tried xorg-server-21* some months ago. I thought maybe https://bugs.gentoo.org/830482 was related, so I tried again now that that is fixed, but the same problem occurs.
I've reproduced this with the Intel drivers too. It looks like https://gitlab.freedesktop.org/xorg/xserver/-/issues/1310 is the report upstream.
I've included some of the details here upstream: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1310#note_1464002
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=632db727dc0c879fa4eb1aedcb747d9a9265d330 commit 632db727dc0c879fa4eb1aedcb747d9a9265d330 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-12-05 10:17:44 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-12-05 10:19:33 +0000 x11-base/xorg-server: backport BadIDChoice fix w/ MaxClients I was hoping this would slip into a release but it hasn't yet. In any case, this fix has been on master for a while & I've been running with it for months. Closes: https://bugs.gentoo.org/857483 Closes: https://bugs.gentoo.org/875977 Signed-off-by: Sam James <sam@gentoo.org> .../files/xorg-server-21.1.4-BadIDChoice.patch | 59 +++++++ x11-base/xorg-server/xorg-server-21.1.4-r1.ebuild | 195 +++++++++++++++++++++ x11-base/xorg-server/xorg-server-9999.ebuild | 2 +- 3 files changed, 255 insertions(+), 1 deletion(-)