ValveSoftware / steam-runtime

A runtime environment for Steam applications
Other
1.18k stars 86 forks source link

[Question] pressure-vessel-wrap: Is it possible to expose /usr/share/steam/compatibilitytools.d? #590

Closed htfy96 closed 1 year ago

htfy96 commented 1 year ago

Your system information

Please describe your issue in as much detail as possible:

On Arch Linux, proton-ge-custom is installed to /usr/share/steam/compatibilitytools.d/proton-ge-custom. However, pressure-vessel-wrap refuses to bind it under the wrapper when running Windows games through proton. Here's the log output:

pressure-vessel-wrap[63678]: I: Hiding "/home/lz/.local/share/vulkan/implicit_layer.d" from the container so that "/usr/lib/pressure-vessel/overrides/share/vulkan/implicit_layer.d" will be used instead
pressure-vessel-wrap[63678]: I: Bind-mounting STEAM_COMPAT_CLIENT_INSTALL_PATH="/home/lz/.local/share/Steam" from the current env as STEAM_COMPAT_CLIENT_INSTALL_PATH="/home/lz/.local/share/Steam" in the host
pressure-vessel-wrap[63678]: I: Bind-mounting STEAM_COMPAT_DATA_PATH="/mnt/F81651D21651928C/SteamLibrary/steamapps/compatdata/813780" from the current env as STEAM_COMPAT_DATA_PATH="/mnt/F81651D21651928C/SteamLibrary/steamapps/compatdata/813780" in the host
pressure-vessel-wrap[63678]: I: Bind-mounting STEAM_COMPAT_INSTALL_PATH="/mnt/F81651D21651928C/SteamLibrary/steamapps/common/AoE2DE" from the current env as STEAM_COMPAT_INSTALL_PATH="/mnt/F81651D21651928C/SteamLibrary/steamapps/common/AoE2DE" in the host
pressure-vessel-wrap[63678]: I: Bind-mounting STEAM_COMPAT_LIBRARY_PATHS="...:/mnt/F81651D21651928C/SteamLibrary/steamapps:..." from the current env as STEAM_COMPAT_LIBRARY_PATHS="...:/mnt/F81651D21651928C/SteamLibrary/steamapps:..." in the host
pressure-vessel-wrap[63678]: I: Bind-mounting STEAM_COMPAT_MOUNTS="...:/home/lz/.local/share/Steam/steamapps/common/Steamworks Shared:..." from the current env as STEAM_COMPAT_MOUNTS="...:/home/lz/.local/share/Steam/steamapps/common/Steamworks Shared:..." in the host
pressure-vessel-wrap[63678]: I: Bind-mounting STEAM_COMPAT_MOUNTS="...:/mnt/F81651D21651928C/SteamLibrary/steamapps/common/SteamLinuxRuntime_sniper:..." from the current env as STEAM_COMPAT_MOUNTS="...:/mnt/F81651D21651928C/SteamLibrary/steamapps/common/SteamLinuxRuntime_sniper:..." in the host
pressure-vessel-wrap[63678]: I: Bind-mounting STEAM_COMPAT_SHADER_PATH="/mnt/F81651D21651928C/SteamLibrary/steamapps/shadercache/813780" from the current env as STEAM_COMPAT_SHADER_PATH="/mnt/F81651D21651928C/SteamLibrary/steamapps/shadercache/813780" in the host
pressure-vessel-wrap[63678]: W: Binding directories that are located under "/usr/" is not supported!
pressure-vessel-wrap[63678]: I: Bind-mounting STEAM_COMPAT_TOOL_PATHS="...:/usr/share/steam/compatibilitytools.d/proton-ge-custom:..." from the current env as STEAM_COMPAT_TOOL_PATHS="...:/usr/share/steam/compatibilitytools.d/proton-ge-custom:..." in the host
pressure-vessel-wrap[63678]: I: Bind-mounting STEAM_COMPAT_TOOL_PATHS="...:/mnt/F81651D21651928C/SteamLibrary/steamapps/common/SteamLinuxRuntime_sniper:..." from the current env as STEAM_COMPAT_TOOL_PATHS="...:/mnt/F81651D21651928C/SteamLibrary/steamapps/common/SteamLinuxRuntime_sniper:..." in the host

As a consequence, the game crashes upon start:

======================
Proton: 1684185920 GE-Proton8-3
SteamGameId: 813780
Command: ['/mnt/F81651D21651928C/SteamLibrary/steamapps/common/AoE2DE/AoE2DE_s.exe']
Options: {'noopwr', 'forcelgadd'}
depot: 0.20230405.47175
pressure-vessel: 0.20230405.0 scout
scripts: 0.20230405.0
sniper: 0.20230405.47175 sniper 0.20230405.47175
Kernel: Linux 6.3.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 11 May 2023 16:40:42 +0000 x86_64
Language: LC_ALL None, LC_MESSAGES None, LC_CTYPE None
======================
wine: could not load ntdll.so: /usr/share/steam/compatibilitytools.d/proton-ge-custom/files/lib//wine/ntdll.so: cannot open shared object file: No such file or directory
(END)

Is it possible to fix at least /usr/share/steam/compatibilitytools.d bindings to allow system-wide proton installation?

kisak-valve commented 1 year ago

Hello @htfy96, for an arbitrary folder location, you should be able to workaround this issue with something like STEAM_COMPAT_MOUNTS=/path/to/unexpected/folder %command% in the game's launch options, but because this is in /usr, #288 is relevant.

In general, I would expect software in the AUR to be rebuilt on demand for your Arch install, and not use pressure vessel. This sounds like an issue to be mentioned to the package maintainer of the AUR submission.

smcv commented 1 year ago

Is it possible to expose /usr/share/steam/compatibilitytools.d?

Not directly. /usr is reserved for the container runtime (the purpose of the container runtime is that it replaces /usr with something predictable), and OS directories don't/can't appear there.

However, the official runtimes do have a symbolic link /usr/share/steam/compatibilitytools.d -> /run/host/usr/share/steam/compatibilitytools.d, and the container runtime provides your /usr as the container's /run/host/usr, so I'm surprised that /usr/share/steam/compatibilitytools.d/proton-ge-custom/files/lib//wine/ntdll.so wasn't found. Please can you collect a full log with STEAM_LINUX_RUNTIME_VERBOSE=1 STEAM_LINUX_RUNTIME_LOG=1? (I see you already know how to collect logs.)

STEAM_COMPAT_MOUNTS=/path/to/unexpected/folder

This is unnecessary for anything listed in STEAM_COMPAT_TOOL_PATHS, because we special-case those paths to be imported into the container (where possible) anyway.

Arch Linux's Steam-native-runtime distribution

Arch's "native runtime" is specifically not supported by Valve, because it bypasses the LD_LIBRARY_PATH-based Steam Runtime, providing an ABI that is not fully compatible with the only runtime environment that Valve supports.

(However, this usually doesn't affect the newer container runtimes, if I understand correctly.)

In general, I would expect software in the AUR to be rebuilt on demand for your Arch install

Yes, it seems really weird to me to have software that exists in Arch, but expects to run on a non-Arch library stack.

If Arch/AUR wants to ship an unofficial build of Proton, then they should be able to compile it for the Arch library stack, set appropriate dependencies, and not use the Steam Linux Runtime 'soldier' or 'sniper' container. That's a luxury that official Proton does not have, because official Proton has to be runnable on Arch, Debian, Fedora and so on, and therefore can't rely on having access to libraries from any particular host OS, except by using the container runtime mechanism to bring its own.

htfy96 commented 1 year ago

Thanks for the information. Yeah I understand that the weird steam-native-runtime + custom proton-ge installation is beyond the scope of official support. It's sort of weird to me why pressure-vessel-wrap was used here.

On my current setup, /usr/share/steam/compatibilitytools.d is a regular directory provided by proton-ge package, and ntdll.so actually exists in /usr/share/steam/compatibilitytools.d/proton-ge-custom/files/lib/wine/i386-unix/ntdll.so, so I doubt if there's some kind of incompatibility somewhere.

Anyway, I have switched back to the official soldiered runtime and everything works now.