Skip to content

Conversation

@pmenzel
Copy link
Collaborator

@pmenzel pmenzel commented Aug 31, 2026

Apply with:

sudo bee remove nvidia_current-580.178.04-0.x86_64 nvidia_current-570.144-0.x86_64 nvidia_current-535.230.02-0.x86_64 nvidia_current-535.104.05-0.x86_64 nvidia_current-510.108.03-0.x86_64 nvidia_current-510.60.02-1.x86_64
sudo bee install --force nvidia_current-580.178.04-1.x86_64 nvidia_current-570.144-1.x86_64 nvidia_current-535.230.02-1.x86_64 nvidia_current-535.104.05-1.x86_64 nvidia_current-510.108.03-1.x86_64 nvidia_current-510.60.02-2.x86_64
sudo bee update nvidia-mxlinks-0.17-0

nvidiactl from https://github.molgen.mpg.de/mariux64/mxtools/ needs to be updated to make use of this.

$ bee diff /src/mariux/beeroot/packages/nvidia_current-580.178.04-0.x86_64.bee.tar.bz2 /src/mariux/beeroot/packages/nvidia_current-580.178.04-1.x86_64.bee.tar.bz2
--- A: /src/mariux/beeroot/packages/nvidia_current-580.178.04-0.x86_64.bee.tar.bz2
+++ B: /src/mariux/beeroot/packages/nvidia_current-580.178.04-1.x86_64.bee.tar.bz2
  [only  B] <directory> /usr/share/nvidia/580.178.04/egl
  [only  B] <directory> /usr/share/nvidia/580.178.04/egl/egl_external_platform.d
  [only  B] <regular> /usr/share/nvidia/580.178.04/egl/egl_external_platform.d/10_nvidia_wayland.json
  [only  B] <regular> /usr/share/nvidia/580.178.04/egl/egl_external_platform.d/15_nvidia_gbm.json
  [only  B] <regular> /usr/share/nvidia/580.178.04/egl/egl_external_platform.d/20_nvidia_xcb.json
  [only  B] <regular> /usr/share/nvidia/580.178.04/egl/egl_external_platform.d/20_nvidia_xlib.json
  [only  B] <directory> /usr/share/nvidia/580.178.04/glvnd
  [only  B] <directory> /usr/share/nvidia/580.178.04/glvnd/egl_vendor.d
  [only  B] <regular> /usr/share/nvidia/580.178.04/glvnd/egl_vendor.d/10_nvidia.json
  [only  B] <symlink -> libnvidia-egl-gbm.so.1.1.3> /usr/share/nvidia/580.178.04/lib/libnvidia-egl-gbm.so.1
  [only  B] <regular> /usr/share/nvidia/580.178.04/lib/libnvidia-egl-gbm.so.1.1.3
  [only  B] <symlink -> libnvidia-egl-wayland.so.1.1.20> /usr/share/nvidia/580.178.04/lib/libnvidia-egl-wayland.so.1
  [only  B] <regular> /usr/share/nvidia/580.178.04/lib/libnvidia-egl-wayland.so.1.1.20
  [only  B] <symlink -> libnvidia-egl-xcb.so.1.0.5> /usr/share/nvidia/580.178.04/lib/libnvidia-egl-xcb.so.1
  [only  B] <regular> /usr/share/nvidia/580.178.04/lib/libnvidia-egl-xcb.so.1.0.5
  [only  B] <symlink -> libnvidia-egl-xlib.so.1.0.5> /usr/share/nvidia/580.178.04/lib/libnvidia-egl-xlib.so.1
  [only  B] <regular> /usr/share/nvidia/580.178.04/lib/libnvidia-egl-xlib.so.1.0.5
  [only  B] <directory> /usr/share/nvidia/580.178.04/vulkan
  [only  B] <directory> /usr/share/nvidia/580.178.04/vulkan/icd.d
  [only  B] <regular> /usr/share/nvidia/580.178.04/vulkan/icd.d/nvidia_icd.json
  [only  B] <directory> /usr/share/nvidia/580.178.04/vulkan/implicit_layer.d
  [only  B] <regular> /usr/share/nvidia/580.178.04/vulkan/implicit_layer.d/nvidia_layers.json
146 entries, 0 only in A, 22 only in B, 0 changed
$ bee diff /src/mariux/beeroot/packages/nvidia-mxlinks-0.1{6,7}-0.x86_64.bee.tar.bz2
--- A: /src/mariux/beeroot/packages/nvidia-mxlinks-0.16-0.x86_64.bee.tar.bz2
+++ B: /src/mariux/beeroot/packages/nvidia-mxlinks-0.17-0.x86_64.bee.tar.bz2
  [only  B] <symlink -> /usr/share/mxgfx/lib/libnvidia-egl-gbm.so.1> /usr/lib/libnvidia-egl-gbm.so.1
  [only  B] <symlink -> /usr/share/mxgfx/lib/libnvidia-egl-wayland.so.1> /usr/lib/libnvidia-egl-wayland.so.1
  [only  B] <symlink -> /usr/share/mxgfx/lib/libnvidia-egl-xcb.so.1> /usr/lib/libnvidia-egl-xcb.so.1
  [only  B] <symlink -> /usr/share/mxgfx/lib/libnvidia-egl-xlib.so.1> /usr/lib/libnvidia-egl-xlib.so.1
  [only  B] <symlink -> /usr/share/mxgfx/lib/libnvidia-vksc-core.so.1> /usr/lib/libnvidia-vksc-core.so.1
57 entries, 0 only in A, 5 only in B, 0 changed

…ions

The Vulkan ICD, implicit layer and GLVND-EGL vendor JSON differ between
driver versions – 580.178.04 uses api_version 1.4.312 and adds the
VK_LAYER_NV_present layer referencing libnvidia-present.so.580.178.04 –
so they cannot be kept as a single hardcoded copy in nvidiactl. Install
them verbatim below /usr/share/nvidia/VERSION, which is on no loader
search path, and let nvidiactl link the selected version into /etc.

Resolves: mariux64/mariux64-issues#161
Assisted-by: qwen3.5-397b-a17b
The `for i in lib*.so.$PKGVERSION` loop never matches the EGL external
platform libraries -- 580.178.04 ships libnvidia-egl-wayland.so.1.1.20,
libnvidia-egl-gbm.so.1.1.3, libnvidia-egl-xlib.so.1.0.5 and
libnvidia-egl-xcb.so.1.0.5, 570.144 the older 1.1.19, 1.1.2 and 1.0.1 --
because upstream versions those libraries independently of the driver. They
were absent from the package, and with them Wayland and GBM EGL, without
anything saying so on the node. Install them below ${LIBDIR}, together with
10_nvidia_wayland.json, 15_nvidia_gbm.json and, where the driver ships them,
20_nvidia_xlib.json and 20_nvidia_xcb.json.

The one-line comment above each loop records the driver the files came in
with: Wayland with 378.13, GBM with 495.44 and xlib/xcb with 560. The
.manifest of the archived beebuilds agrees -- 460.39 and 470.74 carry the
Wayland files only, 510.60.02 and 535.230.02 the Wayland and GBM ones, and
570.144 all four.

The file names are the same in every driver, so the libraries must not be
linked into /usr/lib the way the ${PKGVERSION}-qualified ones are: two
installed drivers would collide. nvidia-mxlinks links the sonames the JSON
files name instead.

580.178.04-1 is built and in the repository already, so it gets a new
revision; the other five have not been built yet and are changed in place.

The JSON stays inert until nvidiactl learns the relative path
egl/egl_external_platform.d/<file>, just like everything else below
/usr/share/nvidia/<version>.

Issue: mariux64/mariux64-issues#161
Assisted-by: claude-opus-5
Update the version from 0.16 to 0.17.

nvidia_icd_vksc.json names the bare soname libnvidia-vksc-core.so.1, while
the driver package links the ${PKGVERSION}-qualified file names into
/usr/lib only and keeps the soname link below /usr/share/mxgfx/lib.
/usr/share/mxgfx/lib is on none of the ld.so search paths, so the bare name
resolves through a link in /usr/lib alone:

    $ cat /etc/ld.so.conf
    /lib
    /usr/lib
    /usr/local/lib
    $ ldconfig -N -v 2>/dev/null | grep '^/'
    /lib: (from /etc/ld.so.conf:1)
    /usr/local/lib: (from /etc/ld.so.conf:3)

/usr/lib is absent from the second listing only because /lib is a symbolic
link to it and ldconfig drops the duplicate: "ldconfig: Path `/usr/lib'
given more than once".

The driver ships the library already, so the link is overdue rather than
new. It looked resolvable so far only because /etc/ld.so.cache is stale on
hotelcalifornia:

    $ ldconfig -p | grep vksc
        libnvidia-vksc-core.so.1 (libc6,x86-64) => /lib/libnvidia-vksc-core.so.1
    $ ls -l /usr/lib/libnvidia-vksc-core.so.1
    ls: cannot access '/usr/lib/libnvidia-vksc-core.so.1': No such file or directory

With the link shipped here the cache entry becomes true; a host that
already carries the stale one needs `ldconfig` once.

On a driver without Vulkan SC -- 510 and 535 -- the entry dangles, as
libnvidia-api.so.1 already does on drivers older than 525.

Issue: mariux64/mariux64-issues#161
Assisted-by: claude-opus-5
Update the version from 0.17 to 0.18.

The EGL external platform JSON names bare sonames -- 10_nvidia_wayland.json
libnvidia-egl-wayland.so.1, 15_nvidia_gbm.json libnvidia-egl-gbm.so.1,
20_nvidia_xlib.json libnvidia-egl-xlib.so.1 and 20_nvidia_xcb.json
libnvidia-egl-xcb.so.1. The libraries are installed below
/usr/share/mxgfx/lib, which is on none of the ld.so search paths, so those
names resolve through a link in /usr/lib alone; see the previous commit for
the search paths.

The file names carry no ${PKGVERSION}, so the libraries themselves must not
be linked into /usr/lib the way the qualified ones are -- two installed
drivers would collide -- and only the sonames are linked here.

Entries for a library a driver does not ship dangle -- 510 and 535 have no
libnvidia-egl-x{lib,cb}.so.1 -- as libnvidia-api.so.1 already does on
drivers older than 525.

Issue: mariux64/mariux64-issues#161
Assisted-by: claude-opus-5
Seven bee-files have to be built for the loader JSON to reach a node, in an
order that puts the two driver revisions in use today first, and each of
them installs files whose absence is silent on the node. Collect that in
one script instead of seven beesh invocations typed by hand.

The packages compile nothing – the .run payload is unpacked and copied –
so the builds run locally and sequentially; no cluster node is needed.
After each driver the script lists the loader JSON in the built package and
names the ones that are missing.

Assisted-by: claude-opus-5
@pmenzel pmenzel force-pushed the nvidia-add-loader-json-and-more-egl-libraries branch from 54b717d to f5b7ba6 Compare August 31, 2026 21:14
@pmenzel pmenzel merged commit 457d165 into master Sep 1, 2026
pmenzel added a commit to mariux64/mxtools that referenced this pull request Sep 2, 2026
Commit 1b6868ec8801 ("nvidiactl: Manage Vulkan and GLVND-EGL loader JSON on
GPU selection") hardcoded the JSON taken from NVIDIA-Linux-x86_64-570.144,
assuming the content is version independent. It is not. Comparing the files
in the beebuilds below /src/mariux/beeroot/build-archives:

    driver        api_version   file_format_version   nvidia_layers.json
    510.60.02     1.3.194       1.0.0                 "layer": { }
    510.108.03    1.3.194       1.0.0                 "layer": { }
    535.104.05    1.3.242       1.0.0                 "layer": { }
    535.230.02    1.3.242       1.0.0                 "layer": { }
    570.144       1.4.303       1.0.1                 "layers": [ { } ]
    580.178.04    1.4.312       1.0.1                 "layers": [ { }, { } ]

Only 10_nvidia.json is identical across all six. 580.178.04 also adds a
second layer, VK_LAYER_NV_present, whose library_path is the fully versioned
libnvidia-present.so.580.178.04 rather than a bare soname, so the hardcoded
copy silently dropped it.

Since /usr/share/nvidia/kernel/<kver>/current selects any of those six
drivers depending on the booted kernel, one hardcoded copy is wrong on most
hosts -- it overclaimed api_version 1.4.303 on 510 and 535 nodes and
underclaimed it on 580 nodes.

Let 'nvidia_current' ship the files verbatim below /usr/share/nvidia/<version>,
which is on no loader search path, and only link the selected version into
/etc here. A file is linked when it exists, so drivers packaged before that
change get nothing rather than a dangling link and this can be deployed
before every driver is rebuilt.

Link: mariux64/bee-files#3429
Resolves: mariux64/mariux64-issues#161
Assisted-by: Claude Opus 5 <noreply@anthropic.com>
pmenzel added a commit to mariux64/mxtools that referenced this pull request Sep 2, 2026
Since bee-files PR 3429, 'nvidia_current' ships the Wayland, GBM, Xlib and XCB
external-platform JSON together with their libraries, but nothing puts them on
a loader search path. Link them like the rest, the existing guard skipping the
two that 510.60.02 does not have.

Test on a node with an NVIDIA GPU selected:

    for l in $(grep -Rh library_path /etc/{vulkan,glvnd,egl} | cut -d'"' -f4 | sort -u) ; do echo "$l: $(readlink -e "$(ldconfig -p | awk -v l=$l '$1==l{print $NF;exit}')" || echo NOT FOUND)" ; done

Link: mariux64/bee-files#3429
Assisted-by: Claude Opus 5 <noreply@anthropic.com>
pmenzel added a commit to mariux64/mxtools that referenced this pull request Sep 7, 2026
Commit a5f42d7cbd2b ("nvidiactl: Stop managing the loader JSON below /etc")
took the runtime linking out. Put the same directories on the loader search
path statically instead, pointing at the mxgfx tree that nvidiactl already
switches:

    /etc/vulkan/icd.d                -> /usr/share/mxgfx/vulkan/icd.d
    /etc/vulkan/implicit_layer.d     -> /usr/share/mxgfx/vulkan/implicit_layer.d
    /etc/glvnd/egl_vendor.d          -> /usr/share/mxgfx/glvnd/egl_vendor.d
    /etc/egl/egl_external_platform.d -> /usr/share/mxgfx/egl/egl_external_platform.d

/node/usr_share_mxgfx thus stays the single switch: it points to
/usr/share/nvidia/<version>, where 'nvidia_current' ships the JSON since
bee-files PR 3429, and the loaders see exactly the files of the driver
selected for the booted kernel. On generic and nouveau nodes it points to
mxgfx-generic, which has no such directories, and the links do not resolve.

Being constant and installed by mxtools, they are on the master as well and
pdist distributes them like any other file -- no EXCEPTS entry, no drift, no
state that can outlive the GPU.

The paths are compiled into the loaders and /etc comes first, so nothing
that lives below /usr/share is displaced:

    $ strings /usr/lib/libEGL.so.1 | grep vendor.d
    /etc/glvnd/egl_vendor.d:/usr/share/glvnd/egl_vendor.d
    $ strings /usr/share/nvidia/580.178.04/lib/libEGL_nvidia.so.580.178.04 | grep external_platform.d
    /etc/egl/egl_external_platform.d:/usr/share/egl/egl_external_platform.d

A link that does not resolve is the quiet case: opendir() returns the very
ENOENT that today's missing directory returns, and the remaining directory
is scanned as before. On a generic node, with the link installed to a
DESTDIR:

    $ strace -e trace=openat eglinfo -B 2>&1 | grep -E 'egl_vendor|_mesa.json'
    openat(AT_FDCWD, "/etc/glvnd/egl_vendor.d", ...|O_DIRECTORY) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/usr/share/glvnd/egl_vendor.d", ...|O_DIRECTORY) = 3
    openat(AT_FDCWD, "/usr/share/glvnd/egl_vendor.d/50_mesa.json", O_RDONLY) = 3

    $ __EGL_VENDOR_LIBRARY_DIRS=$DESTDIR/etc/glvnd/egl_vendor.d:/usr/share/glvnd/egl_vendor.d \
        strace -e trace=openat eglinfo -B 2>&1 | grep -E 'egl_vendor|_mesa.json'
    openat(AT_FDCWD, "…/destdir/etc/glvnd/egl_vendor.d", ...|O_DIRECTORY) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/usr/share/glvnd/egl_vendor.d", ...|O_DIRECTORY) = 3
    openat(AT_FDCWD, "/usr/share/glvnd/egl_vendor.d/50_mesa.json", O_RDONLY) = 3

The leaf directories are linked rather than /etc/{vulkan,glvnd,egl}, so
/etc/vulkan stays a real directory and a loader settings file below
/etc/vulkan/settings.d remains possible -- /etc is the only loader search
path that is writable where /usr is a read-only shared image.

Nodes on which the previous, runtime variant already ran carry
/etc/vulkan/icd.d and friends as real directories. install_symlink() now
refuses those loudly instead of installing into them, see commit
ffa33f6d76b6 ("install.sh: Never let install_symlink descend into its link
name"); remove them once by hand. pdist heals them on its own, it moves a
directory aside where the master has a symbolic link.

Link: mariux64/bee-files#3429
Resolves: mariux64/mariux64-issues#161
Assisted-by: Claude Opus 5 <noreply@anthropic.com>
pmenzel added a commit to mariux64/mxtools that referenced this pull request Sep 11, 2026
Commit a5f42d7cbd2b ("nvidiactl: Stop managing the loader JSON below /etc")
took the runtime linking out. Put the same directories on the loader search
path statically instead, pointing at the mxgfx tree that nvidiactl already
switches:

    /etc/vulkan/icd.d                -> /usr/share/mxgfx/vulkan/icd.d
    /etc/vulkan/implicit_layer.d     -> /usr/share/mxgfx/vulkan/implicit_layer.d
    /etc/glvnd/egl_vendor.d          -> /usr/share/mxgfx/glvnd/egl_vendor.d
    /etc/egl/egl_external_platform.d -> /usr/share/mxgfx/egl/egl_external_platform.d

/node/usr_share_mxgfx thus stays the single switch: it points to
/usr/share/nvidia/<version>, where 'nvidia_current' ships the JSON since
bee-files PR 3429, and the loaders see exactly the files of the driver
selected for the booted kernel. On generic and nouveau nodes it points to
mxgfx-generic, which has no such directories, and the links do not resolve.

Being constant and installed by mxtools, they are on the master as well and
pdist distributes them like any other file -- no EXCEPTS entry, no drift, no
state that can outlive the GPU.

The paths are compiled into the loaders and /etc comes first, so nothing
that lives below /usr/share is displaced:

    $ strings /usr/lib/libEGL.so.1 | grep vendor.d
    /etc/glvnd/egl_vendor.d:/usr/share/glvnd/egl_vendor.d
    $ strings /usr/share/nvidia/580.178.04/lib/libEGL_nvidia.so.580.178.04 | grep external_platform.d
    /etc/egl/egl_external_platform.d:/usr/share/egl/egl_external_platform.d

A link that does not resolve is the quiet case: opendir() returns the very
ENOENT that today's missing directory returns, and the remaining directory
is scanned as before. On a generic node, with the link installed to a
DESTDIR:

    $ strace -e trace=openat eglinfo -B 2>&1 | grep -E 'egl_vendor|_mesa.json'
    openat(AT_FDCWD, "/etc/glvnd/egl_vendor.d", ...|O_DIRECTORY) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/usr/share/glvnd/egl_vendor.d", ...|O_DIRECTORY) = 3
    openat(AT_FDCWD, "/usr/share/glvnd/egl_vendor.d/50_mesa.json", O_RDONLY) = 3

    $ __EGL_VENDOR_LIBRARY_DIRS=$DESTDIR/etc/glvnd/egl_vendor.d:/usr/share/glvnd/egl_vendor.d \
        strace -e trace=openat eglinfo -B 2>&1 | grep -E 'egl_vendor|_mesa.json'
    openat(AT_FDCWD, "…/destdir/etc/glvnd/egl_vendor.d", ...|O_DIRECTORY) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/usr/share/glvnd/egl_vendor.d", ...|O_DIRECTORY) = 3
    openat(AT_FDCWD, "/usr/share/glvnd/egl_vendor.d/50_mesa.json", O_RDONLY) = 3

The leaf directories are linked rather than /etc/{vulkan,glvnd,egl}, so
/etc/vulkan stays a real directory and a loader settings file below
/etc/vulkan/settings.d remains possible -- /etc is the only loader search
path that is writable where /usr is a read-only shared image.

Nodes on which the previous, runtime variant already ran carry
/etc/vulkan/icd.d and friends as real directories. install_symlink() now
refuses those loudly instead of installing into them, see commit
ffa33f6d76b6 ("install.sh: Never let install_symlink descend into its link
name"); remove them once by hand. pdist heals them on its own, it moves a
directory aside where the master has a symbolic link.

Test results Firefox 155.0.1:

1.  about:support shows:

    > WebGL 1 Driver Renderer NVIDIA Corporation -- NVIDIA GeForce RTX 2080/PCIe/SSE2
    > WebGL 1 Driver Version  3.2.0 NVIDIA 580.178.04

2.  Frames per second for 1024 x 1024:

     5000: 57 to 52
    20000: 48 to 50
    25000: 41
    30000: 35

Link: mariux64/bee-files#3429
Resolves: mariux64/mariux64-issues#161
Assisted-by: Claude Opus 5 <noreply@anthropic.com>
Sign in to join this conversation on GitHub.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant