Repository navigation
Description
Environment
- aarch64 host (Arch Linux based, 16K-page kernel), Steam ARM64 client, native Linux x86_64 games through the FEX compatibility tool and SteamLinuxRuntime_sniper (pressure-vessel-arm64 0.20261007.0).
- The x86 graphics provider is a FEX rootfs with x86 Mesa (
STEAM_COMPAT_GRAPHICS_PROVIDER=/usr/share/guestos/fex-mesa/graphics_provider.json); the host has the aarch64 build of the same Mesa Vulkan driver.
What happens
Both Mesa builds use the same libdir layout, so the host's /usr/share/vulkan/icd.d/asahi_icd.aarch64.json and the provider's asahi_icd.x86_64.json are byte-identical ("library_path" : "/usr/lib/libvulkan_asahi.so"). pressure-vessel captures the aarch64 library into overrides/lib/aarch64-linux-gnu/vulkan/, but then drops its manifest:
I: Ignoring "/usr/share/vulkan/icd.d/asahi_icd.aarch64.json" in "/" because it has the same content as "/usr/share/vulkan/icd.d/asahi_icd.x86_64.json" in "/usr/share/guestos/fex-mesa"
...
D: overrides/lib/aarch64-linux-gnu/vulkan/libvulkan_asahi.so points to container-side path /run/host/usr/lib/libvulkan_asahi.so
...
VK_DRIVER_FILES=/usr/lib/pressure-vessel/overrides/share/vulkan/icd.d/asahi_icd.x86_64.json:/usr/lib/pressure-vessel/overrides/share/vulkan/icd.d/asahi_icd.i686.json
So the container has no aarch64 Vulkan driver, and an aarch64 Vulkan loader inside it (FEX's Vulkan thunks forward the game's x86 Vulkan calls to one) finds none. The only way around it today is overriding VK_DRIVER_FILES inside the container.
Cause
pv_manifest_deduplicator_add_if_unique() deduplicates by content across providers. The comment in setup_each_json_manifest() expects that for SONAME manifests such as nvidia_icd.json, and expects Mesa's per-architecture manifests to differ by their absolute paths (Debian multiarch). With an Arch-style /usr/lib for every architecture they don't: a library_path containing a slash is resolved inside the provider it came from, so identical text in two providers names two different libraries.
Proposed fix
Keep a same-content manifest from another provider when its library_path contains a slash; only a SONAME (or the same provider) means the same driver. One commit, Signed-off-by for the DCO:
https://github.com/jgoyvaerts/steam-runtime-tools/commits/pv-dedupe-per-provider-paths
Tested
- Backported onto 0.20261007.0 and used in place of the shipped
pressure-vessel-wrap: the container'sVK_DRIVER_FILESlists the x86_64, i686 and aarch64 manifests. x86vulkaninfostill uses the x86 driver (the x86 loader skips the aarch64 entry with a loader message), and with FEX's Vulkan thunks the aarch64 loader finds the host driver without any override. Several native Linux games (Counter-Strike 2, Dota 2, Team Fortress 2) ran through it. - On current main (e6f7ced) with the commit: the pressure-vessel unit tests graphics-provider, utils, bwrap, adverb-preload and adverb-sdl pass. test-wrap-setup fails at
/payload-command/everything(/usr/bin/envvs/bin/sh) identically with and without the commit, so I take that to be my environment. - I did not add an automated test: I didn't find a harness that builds ICD details from two mock providers. Happy to add one if you point me at the preferred place.
Activity