Skip to content

Run Xvfb without DRI3 when DRINODE is not in the container - #193

Closed
ehfd wants to merge 2 commits into
linuxserver:masterfrom
ehfd:drinode-missing
Closed

ehfd wants to merge 2 commits into
linuxserver:masterfrom
ehfd:drinode-missing

Conversation

@ehfd

@ehfd ehfd commented Sep 27, 2026 •

Copy link
Copy Markdown

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

Description:

svc-xorg takes DRINODE only when that node exists in the container. Otherwise it logs so, and Xvfb starts without -glamor -dri, with EGL pinned to Mesa as for any software server. A software server also loads no EGL external platform (an empty __EGL_EXTERNAL_PLATFORM_CONFIG_FILENAMES), so it cannot reach NVIDIA's GBM platform where the pin does not apply.

Both hunks apply unchanged to ubunturesolute, arch, fedora44 and kali. dev already carries the first, and the second applies there with an offset. alpine324 takes the first and has no glvnd pin for the second.

Benefits of this PR and context:

This is the crash in linuxserver/docker-chromium#78. The NVIDIA runtime gives the container the driver's libraries but no /dev/dri, and DRINODE names a render node that is not there. Xvfb still starts glamor on it and comes up on NVIDIA's EGL. When it then probes GLX, libnvidia-egl-gbm finds no DRM device and reads a pointer that drmGetDevices2 never set, so the X server crash-loops and no display comes up. Before the zero-copy update, the X server did not start glamor, so the same compose worked. The library fix is NVIDIA/egl-gbm#9, not merged yet.

The reporter's runtime also puts the driver's own libEGL ahead of glvnd's: their backtrace runs from swrast_dri.so straight into libEGL_nvidia, with no glvnd frame between, where a glvnd stack shows libEGL.so.1 there. glvnd's pin to Mesa never reaches such a library, so even a software server, with no DRINODE at all, crashes the same way. libEGL_nvidia reads __EGL_EXTERNAL_PLATFORM_CONFIG_FILENAMES itself, and with it empty NVIDIA's EGL has no GBM platform, answers the probe with no display, and Xvfb keeps Mesa's configs.

How Has This Been Tested?

On a Tesla P100 (driver 580.178), with ghcr.io/linuxserver/chromium:latest (b1ee1dc8-ls55, whose svc-xorg/run is identical to master's), under the NVIDIA runtime, with the patched script mounted over the stock one and a headless Chromium connected to the web client:

  • The reporter's setup (no /dev/dri, DRINODE and DRI_NODE set to /dev/dri/renderD129): stock crash-loops with the issue's backtrace (libnvidia-egl-gbm.so.1+0x34a5). With the patch, the display comes up and the stream encodes on NVENC H.264.
  • The render node passed in: DRI3 zero-copy on NVENC, as on stock.
  • A driver libEGL ahead of glvnd's, on a GTX 1080 Ti (driver 580.178.04) in ghcr.io/linuxserver/chromium:latest, with /dev/dri hidden from Xvfb and glvnd made to hand out NVIDIA's EGL whatever the pin says: master's software server crashes in libnvidia-egl-gbm; with the second commit it serves. With the pin in effect it serves either way. The same change is in the Selkies image as selkies-project/selkies@6addb643, where it also held on an RTX 4090 with driver 595.71.05, the reporter's driver branch.

Source / References:

Copilot AI lite review requested due to automatic review settings September 27, 2026 06:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

ehfd added 2 commits October 1, 2026 14:07
A DRINODE the container does not have still started glamor on it. Under
the NVIDIA runtime, which provides the driver's libraries but no /dev/dri,
Xvfb then came up on NVIDIA's EGL and crashed in libnvidia-egl-gbm when it
probed GLX.
A runtime can put the NVIDIA driver's own libEGL ahead of glvnd's, as
the reporter's in linuxserver/docker-chromium#78 does (its backtrace runs
from swrast_dri.so straight into libEGL_nvidia, with no glvnd frame).
The pin to Mesa's EGL vendor is glvnd's, so it never reaches that
library: the GLX probe still asks NVIDIA's EGL for the GBM platform's
default display, and with no /dev/dri libnvidia-egl-gbm crashes.

An empty __EGL_EXTERNAL_PLATFORM_CONFIG_FILENAMES, which libEGL_nvidia
reads itself, leaves NVIDIA's EGL without its GBM platform, so it
answers the probe with no display and Xvfb keeps Mesa's configs. In
ghcr.io/linuxserver/chromium:latest on a GTX 1080 Ti (580.178.04), with
/dev/dri hidden and NVIDIA's EGL handed out whatever the pin says, Xvfb
crashes on master and serves with this; with the pin in effect it serves
either way.
@ehfd
ehfd force-pushed the drinode-missing branch from ba27dcd to 6ac2ba8 Compare October 1, 2026 05:07
@thelamer

thelamer commented Oct 2, 2026

Copy link
Copy Markdown
Member

implemented in dev

@thelamer thelamer closed this Oct 2, 2026
@ehfd
ehfd deleted the drinode-missing branch October 2, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

4 participants