[Error] 32-bit Vulkan fails with --nvidia when host uses split lib dirs (Fedora) and container uses merged lib (Arch)
- Linguagem predominante
- Go
- Estrelas
- 13k
- Forks
- 541
- Merge médio
- 20h 47min
- PRs com merge (30d)
- 4
Descrição
**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**
```bash
nvidia-smi --query-gpu=driver_version --format=csv,noheader
ls /usr/lib32/libGLX_nvidia.so.*
```
Then create a corrected copy of the ICD JSON:
```bash
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**
- #2085 - Same root cause affecting 64-bit tools (nvidia-smi) on Arch containers with --nvidia
- #1843 - Previous Vulkan ICD issue, fixed by PR #1688 (ICD naming convention update)
- PR #2014 - Attempted fix for merged-lib library resolution (still open)
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.