Environment
- Host: Fedora 44, NVIDIA GeForce RTX 5080, driver 595.71.05, distrobox 1.8.2.4
- Container image:
ghcr.io/ublue-os/steambox (Arch-based)
- Created with
distrobox create --nvidia
When this happens
- Host with split lib dirs: Fedora / RHEL / openSUSE (
/usr/lib = 32-bit, /usr/lib64 = 64-bit)
- Container with merged lib layout: Arch / Alpine (
/usr/lib = 64-bit, /usr/lib32 = 32-bit, and /usr/lib64 is a symlink to /usr/lib)
When this does NOT happen
- Host and container are the same distro family (e.g. Fedora host + Fedora container)
- Container is Debian/Ubuntu based (uses
x86_64-linux-gnu / i386-linux-gnu layout)
- Not using
--nvidia flag
Symptoms
- 32-bit Vulkan apps fail to enumerate GPUs (
VK_ERROR_INITIALIZATION_FAILED -3)
- Affects launchers that use CEF/Chromium - specifically Ubisoft Connect (The Crew Motorfest) - the window never appears
- Happens with any Proton version (Experimental, 11.0, Hotfix, GE-Proton)
- 64-bit Vulkan works fine; OpenGL works fine
Root cause
The --nvidia script does a blanket find /run/host/usr/lib* -iname "*nvidia*" and bind-mounts everything found. Since the host and container disagree on what goes in /usr/lib/:
- Host Fedora puts 32-bit
libGLX_nvidia.so.0 in /usr/lib/
- Container Arch expects 64-bit libs in
/usr/lib/ (merged-lib layout)
- The bind mount places the 64-bit
libGLX_nvidia.so.0 (from host /usr/lib64/) into the container /usr/lib/, overwriting where the 32-bit one should be
- The 32-bit library ends up orphaned in
/usr/lib32/
- The 32-bit ICD JSON (
/usr/share/vulkan/icd.d/nvidia_icd.i686.json) has "library_path": "/usr/lib/libGLX_nvidia.so.0", expects 32-bit -> finds ELFCLASS64 -> fails
Workaround
nvidia-smi --query-gpu=driver_version --format=csv,noheader
ls /usr/lib32/libGLX_nvidia.so.*
Then create a corrected copy of the ICD JSON:
mkdir -p ~/.local/share/vulkan/icd.d
cat > ~/.local/share/vulkan/icd.d/nvidia_icd.i686.json << 'EOF'
{
"file_format_version" : "1.0.1",
"ICD": {
"library_path": "/usr/lib32/libGLX_nvidia.so.0",
"api_version" : "1.4.329"
}
}
'EOF'
The api_version should match the original at /usr/share/vulkan/icd.d/nvidia_icd.i686.json. No restart needed.
Related issues
Environment
ghcr.io/ublue-os/steambox(Arch-based)distrobox create --nvidiaWhen this happens
/usr/lib= 32-bit,/usr/lib64= 64-bit)/usr/lib= 64-bit,/usr/lib32= 32-bit, and/usr/lib64is a symlink to/usr/lib)When this does NOT happen
x86_64-linux-gnu/i386-linux-gnulayout)--nvidiaflagSymptoms
VK_ERROR_INITIALIZATION_FAILED -3)Root cause
The
--nvidiascript does a blanketfind /run/host/usr/lib* -iname "*nvidia*"and bind-mounts everything found. Since the host and container disagree on what goes in/usr/lib/:libGLX_nvidia.so.0in/usr/lib//usr/lib/(merged-lib layout)libGLX_nvidia.so.0(from host/usr/lib64/) into the container/usr/lib/, overwriting where the 32-bit one should be/usr/lib32//usr/share/vulkan/icd.d/nvidia_icd.i686.json) has"library_path": "/usr/lib/libGLX_nvidia.so.0", expects 32-bit -> finds ELFCLASS64 -> failsWorkaround
nvidia-smi --query-gpu=driver_version --format=csv,noheader ls /usr/lib32/libGLX_nvidia.so.*Then create a corrected copy of the ICD JSON:
The
api_versionshould match the original at/usr/share/vulkan/icd.d/nvidia_icd.i686.json. No restart needed.Related issues