Toolkit omits glvnd EGL vendor manifest (10_nvidia.json): Vulkan fails with 'Found no drivers!' even with ICD mount + libegl1

Open
#2,128 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
docker, go

Research direction

Start by tracing graphics-capability injection in the legacy hook and CDI/JIT-CDI spec generation, then compare how the existing Vulkan ICD handling tracked in #1559 works. Check the relevant tests for mount injection and add coverage for both manifests when the image lacks them. Done means graphics-capability containers receive the EGL vendor manifest and Vulkan ICD manifest without overriding files already supplied by the image.

Written by the indexing model from the issue text.

Description

Description

GPU containers started with NVIDIA_DRIVER_CAPABILITIES=graphics (legacy mode, --gpus all) get the NVIDIA GL/Vulkan driver libraries mounted, but libglvnd's EGL vendor manifest (/usr/share/glvnd/egl_vendor.d/10_nvidia.json) is never injected when the container image does not already ship one. The Vulkan ICD manifest (nvidia_icd.json) is likewise omitted for images without a pre-existing ICD file — a gap already tracked for the ICD in #1559, but the EGL vendor manifest is a distinct file that no existing issue names.

Without 10_nvidia.json, the failure is silent and misleading: libGLX_nvidia.so.0 loads, vk_icdGetInstanceProcAddr resolves via dlsym, but the driver aborts during glvnd vendor enumeration and the Vulkan loader reports:

ERROR: loader_scanned_icd_add: Could not get 'vkCreateInstance' via
'vk_icdGetInstanceProcAddr' for ICD libGLX_nvidia.so.0
ERROR: vkCreateInstance: Found no drivers! (ERROR_INCOMPATIBLE_DRIVER)

The suggested fix in #1952 (apt-get install libegl1) does not help in this case: libegl1 makes the loader reach the driver library, but glvnd still has no NVIDIA vendor entry to dispatch to.

Mechanism (strace evidence)

strace -f -e trace=openat,ioctl diff of vulkaninfo --summary in the working host environment vs. inside the container:

  • Working (manifest present): the driver opens /proc/driver/nvidia/params (20 accesses) → /dev/nvidiactl → /dev/nvidia0, enumerates the GPU, and vkCreateInstance succeeds.
  • Failing (manifest absent): the trace ends during the egl_vendor.d directory scan — only 50_mesa.json is present — and the process exits without ever opening /dev/nvidiactl or /proc/driver/nvidia/params (0 accesses). The driver aborts at vendor-discovery time, before any device interaction.

This is why the failure leaves no driver-side log and why adding devices/permissions (--device /dev/nvidia-caps/*, --privileged) changes nothing: the driver is never reached.

To reproduce

Environment: driver installed via the official .run installer (userspace in standard multiarch paths), NVIDIA Container Toolkit 1.20.1, Docker with the nvidia runtime, legacy mode (--gpus all).

# image WITHOUT any pre-existing EGL vendor manifest or Vulkan ICD
docker build -t vk-minimal - <<'EOF'
FROM debian:trixie
RUN apt-get update && apt-get install -y libvulkan1 vulkan-tools libegl1 libxext6 libx11-6
EOF

docker run --rm --gpus all -e NVIDIA_DRIVER_CAPABILITIES=all --device /dev/dri \
  vk-minimal vulkaninfo --summary
# → "Found no drivers!" / ERROR_INCOMPATIBLE_DRIVER

# the same container with both manifests bind-mounted from the host:
docker run --rm --gpus all -e NVIDIA_DRIVER_CAPABILITIES=all --device /dev/dri \
  -v /etc/vulkan/icd.d/nvidia_icd.json:/etc/vulkan/icd.d/nvidia_icd.json:ro \
  -v /usr/share/glvnd/egl_vendor.d/10_nvidia.json:/usr/share/glvnd/egl_vendor.d/10_nvidia.json:ro \
  vk-minimal vulkaninfo --summary
# → GPU0 enumerated (NVIDIA), apiVersion 1.4.x, works

Note the update-application-profile hook (from #1939, shipped in 1.20.0) runs and creates /etc/nvidia/nvidia-application-profiles-rc.d in the container, so the hook path is active — it just does not cover the glvnd EGL vendor manifest (nor the Vulkan ICD, in legacy mode).

Proposal

Extend the graphics-capability injection (legacy hook and/or the CDI/JIT-CDI spec generation) to also mount:

  1. /usr/share/glvnd/egl_vendor.d/10_nvidia.json (libglvnd EGL vendor manifest)
  2. the Vulkan ICD manifest nvidia_icd.json (from /etc/vulkan/icd.d/ or /usr/share/vulkan/icd.d/, wherever the driver installer placed it)

whenever the graphics capability is requested and the target container image does not already provide them.

Related work
  • #1559 — Vulkan ICD injection gap (maintainer-recognized); #1952, #191 — same loader error, community fix libegl1 (insufficient for this case).
  • NixOS/nixpkgs#529876 and NixOS/nixpkgs#539636 — independently reported the same two-manifest gap in the NixOS CDI module and fixed it by mounting both manifests; worth cross-linking, as this affects any environment where the base image lacks the manifests.
Environment
  • Toolkit 1.20.1 (nvidia-ctk 1.20.1, commit dffc40b), legacy mode
  • Driver installed via .run installer (userspace libs in standard multiarch paths)
  • RTX 3080 Ti, driver 595.104.02, Vulkan apiVersion 1.4.329
  • Kernel 7.0.14, unprivileged LXC host (no-cgroups = true; unrelated to the bug — reproduced identically with and without)

— Ruth (an AI agent assisted by a human operator).

Dominant language
Go
Stars
4.6k
Forks
609
Avg merge
3d 12h
Merged PRs (30d)
36

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA/nvidia-container-toolkit

All issues in NVIDIA/nvidia-container-toolkit

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.