Describe the bug
On a 2-GPU host using the CDI/JIT-CDI path, two pods are created with one GPU allocated to each pod. Vulkan graphics works in the pod assigned one GPU, but fails in the pod assigned the other GPU.
From checking the Toolkit source, CDI does inject graphics files and per-GPU device nodes, including EGL/GLVND/Vulkan configs and matching /dev/dri/* nodes. However, the CDI/JIT-CDI path does not appear to create the legacy NVIDIA application profile:
/etc/nvidia/nvidia-application-profiles-rc.d/10-container.conf
That legacy file sets EGLVisibleDGPUDevices for the allocated GPU minor. Without it, NVIDIA graphics userspace appears to still make some presentation/WSI decisions from a host-global view. This can make the GPU that matches the default/global graphics view work, while the other allocated GPU fails.
A downstream patch that restores this per-container application profile for the allocated GPU minor fixes the issue.
To Reproduce
Detailed steps to reproduce the issue.
- Use a host with 2 NVIDIA GPUs.
- Enable Toolkit CDI/JIT-CDI mode.
- Create two Kubernetes pods, each requesting one NVIDIA GPU.
- Confirm each pod is assigned a different GPU.
- In each pod, run a Vulkan WSI/presentation test, for example an app or probe that checks queue presentSupport and attempts swapchain creation.
- Compare the two pods.
Observed result:
- The pod assigned one GPU works with Vulkan.
- The pod assigned the other GPU fails Vulkan presentation/swapchain support.
- The failing pod has a selected GPU device set, but no /etc/nvidia/nvidia-application-profiles-rc.d/10-container.conf.
Expected behavior
Each pod allocated one full GPU through CDI/JIT-CDI should get a coherent one-GPU graphics view. Vulkan presentation and swapchain creation should work regardless of which physical GPU/minor the pod receives.
Environment
nvidia-container-toolkit version: [v1.19.1]
NVIDIA Driver Version: [580.82.07]
Host OS: [Ubuntu 24.04]
Kernel Version: [6.8.0-generic]
CPU Architecture: [x86_64]
GPU Model(s): [GeForce-RTX-5070-Ti]
Describe the bug
On a 2-GPU host using the CDI/JIT-CDI path, two pods are created with one GPU allocated to each pod. Vulkan graphics works in the pod assigned one GPU, but fails in the pod assigned the other GPU.
From checking the Toolkit source, CDI does inject graphics files and per-GPU device nodes, including EGL/GLVND/Vulkan configs and matching /dev/dri/* nodes. However, the CDI/JIT-CDI path does not appear to create the legacy NVIDIA application profile:
/etc/nvidia/nvidia-application-profiles-rc.d/10-container.conf
That legacy file sets EGLVisibleDGPUDevices for the allocated GPU minor. Without it, NVIDIA graphics userspace appears to still make some presentation/WSI decisions from a host-global view. This can make the GPU that matches the default/global graphics view work, while the other allocated GPU fails.
A downstream patch that restores this per-container application profile for the allocated GPU minor fixes the issue.
To Reproduce
Detailed steps to reproduce the issue.
Observed result:
Expected behavior
Each pod allocated one full GPU through CDI/JIT-CDI should get a coherent one-GPU graphics view. Vulkan presentation and swapchain creation should work regardless of which physical GPU/minor the pod receives.
Environment
nvidia-container-toolkit version: [v1.19.1]
NVIDIA Driver Version: [580.82.07]
Host OS: [Ubuntu 24.04]
Kernel Version: [6.8.0-generic]
CPU Architecture: [x86_64]
GPU Model(s): [GeForce-RTX-5070-Ti]