From c2608602de5f501b946be9c38bfb3b45ad30d271 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Mon, 7 Sep 2026 17:34:46 +0200 Subject: [PATCH] nvidia-mxlinks: Link the GBM backend for nvidia-drm Update the version from 0.17 to 0.18. Mesa's GBM loader derives the backend file name from the DRM driver: _gbm_create_device() in src/gbm/main/backend.c asks drmGetVersion() for the driver name, tries _gbm.so below the backends path -- /usr/lib/gbm, as libgbm is configured here -- and only then falls back to dri_gbm.so. For a device driven by nvidia-drm that name is nvidia-drm_gbm.so, and libnvidia-allocator.so.1, which exports gbmint_get_backend and announces the backend name "nvidia", is the library NVIDIA ships for it. Without the link Mesa takes the dri fallback and reports the backend as "drm", which is where the `kmsro: driver missing` messages come from. /usr/lib/gbm belongs to mesalib, so the directory is excluded and only the link is packaged, the way the X11 and xorg driver directories already are. The link is inert on its own: it needs the mxtools change loading the module with KMS enabled, `insmod ${nvlink}/nvidia-drm.ko modeset=1`, which /usr/sbin/nvidiactl:91 does not do yet. Without modeset the NVIDIA /sys/class/drm/cardN has no connectors and NVIDIA's GBM backend returns NULL from create_device for both the card and the render node, so Mesa falls back as before. Link: https://github.molgen.mpg.de/mariux64/mariux64-issues/issues/161 Assisted-by: claude-opus-5 --- nvidia-mxlinks.be0 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nvidia-mxlinks.be0 b/nvidia-mxlinks.be0 index cf0deeb87..de1ee6730 100755 --- a/nvidia-mxlinks.be0 +++ b/nvidia-mxlinks.be0 @@ -1,11 +1,12 @@ #!/bin/env beesh -# BEE_VERSION nvidia-mxlinks-0.17-0 +# BEE_VERSION nvidia-mxlinks-0.18-0 -EXCLUDE=("^/usr/lib/(X11|xorg)(|/modules(|/drivers))$") +EXCLUDE=("^/usr/lib/(X11|xorg)(|/modules(|/drivers))$" + "^/usr/lib/gbm$") mee_install() { - mkdir -pv ${D}{${LIBDIR}/{X11,xorg}/modules/drivers,${DATAROOTDIR},${BINDIR},${SYSCONFDIR}} + mkdir -pv ${D}{${LIBDIR}/{X11,xorg}/modules/drivers,${LIBDIR}/gbm,${DATAROOTDIR},${BINDIR},${SYSCONFDIR}} NVLIBS=( "libEGL_nvidia.so.0" @@ -53,6 +54,9 @@ mee_install() { ln -sv /usr/share/mxgfx/drivers/nvidia_drv.so \ ${D}${LIBDIR}/xorg/modules/drivers/nvidia_drv.so + ln -sv /usr/share/mxgfx/lib/libnvidia-allocator.so.1 \ + ${D}${LIBDIR}/gbm/nvidia-drm_gbm.so + ln -sv /usr/share/mxgfx/bin/nvidia-settings \ ${D}${BINDIR}