ValveSoftware / steam-runtime

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

Steam runtimes break if allowing a specific folder via flatpak override but not its parent #649

Open MateusRodCosta opened 4 months ago

MateusRodCosta commented 4 months ago

Your system information

On my system, Fedora Silverblue, the basic system configuration is that three subvols are created at the very root of the btrfs filesystem: root (mounted as /), var (mounted as /var) and home (mounted as /home).

As an extra, I decided to create a few subvols inside my home folder, I moved the existing Games folder into a ~/Games subvol and created a ~\Games\SteamGames subvol intended to be used as a steam library (one of the goals was to allow Dragon's Dogma to run without crashing, as it has issues with long file paths).

Since I run flatpak I added a filesystem override of ~/Games/SteamGames to be able to create the library and download the games. While running into some issues with creating the library, I managed to install several games. Then I noticed one weird behavior: some games would completely refuse to launch (which I initially blamed on Nvidia due to an unrelated warning) but later found out it were only Proton games failing and native Linux games were working fine.

After experimenting with the library, and accidentally nuking it, I figured out that by also giving at least ~/Games:ro access the Proton games are able to run with no issues.

Interestingly I noticed that the contents of the steam runtime system diagnostics is different whether I run with ~/Games:ro or not:

steam-runtime-system-info-with-Games-ro.txt

steam-runtime-system-info-without-Games-ro.txt

Steps for reproducing this issue:

This might or might not be related to the fact that is a subvolume (~/Games/SteamGames) inside another subvolume (~/Games) inside my home folder (/var/home/mateusrc, where there's a home subvolume mounted at /home and /var/home is a symlink to /home.

  1. Create ~/Games (might need to be a btrfs subvol)
  2. Create ~/Games/SteamGames (might need to be a btrfs subvol)
  3. Allow Steam flatpak access to ~/Games/SteamGames via Flatseal
  4. Using the Steam client, turn ~/Games/SteamGames into a Steam library
  5. At this point games should possibly be breaking.
MateusRodCosta commented 4 months ago

@smcv Let's continue https://github.com/ValveSoftware/steam-for-linux/issues/10487 here.

I also did notice this very interesting behavior:

If I have given ~/Games read-only access:

Captura de tela de 2024-02-28 22-25-18

If not:

Captura de tela de 2024-02-28 22-30-12

It's like Steam gets completely lost on finding where those compatibility tools are installed.

It also looks like it thinks they aren't installed:

Captura de tela de 2024-02-28 22-31-26

And this is from when I try to run Hades:

/bin/sh\0-c\0PROTON_LOG=1 /var/home/mateusrc/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=1145360 -- /var/home/mateusrc/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/var/home/mateusrc/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/steamapps/common/SteamLinuxRuntime_sniper'/_v2-entry-point --verb=waitforexitandrun -- '/var/home/mateusrc/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/steamapps/common/Proton 8.0'/proton waitforexitandrun  '/var/home/mateusrc/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/steamapps/common/Hades/x64Vk/Hades.exe' /c=..\\ /steampowered /DirectLoadShell=true /DebugMessages=false /DebugKeysEnabled=false /ShowFPS=false /PerfDashWarnings=false /VerboseScriptLogging=false /UnsafeDebugKeysEnabled=false /LiveCreateTextures=false /UseNativeGaInput=true /UseNativeGaInputNoControllers=false\0
chdir "/var/home/mateusrc/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/steamapps/common/Hades/x64Vk/"
ERROR: ld.so: object '/var/home/mateusrc/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/var/home/mateusrc/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/var/home/mateusrc/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/var/home/mateusrc/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/var/home/mateusrc/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
WARNING: discarding _NET_WM_PID 3 as invalid for X11 window - use specialized XCB_X11_TO_PID function!
WARNING: discarding _NET_WM_PID 3 as invalid for X11 window - use specialized XCB_X11_TO_PID function!
Uploaded AppInterfaceStats to Steam

Seems like something broke the runtimes and that's why it doesn't work?

For comparison if I run Irmão Grande e Brasileiro 2 (a Linux native Godot game):

/bin/sh\0-c\0/var/home/mateusrc/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=1569520 -- /var/home/mateusrc/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/var/home/mateusrc/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/steamapps/common/igeb2/igeb2.x86_64'\0
chdir "/var/home/mateusrc/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/steamapps/common/igeb2"
ERROR: ld.so: object '/var/home/mateusrc/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/var/home/mateusrc/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/var/home/mateusrc/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/var/home/mateusrc/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/var/home/mateusrc/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
WARNING: discarding _NET_WM_PID 3 as invalid for X11 window - use specialized XCB_X11_TO_PID function!
WARNING: discarding _NET_WM_PID 3 as invalid for X11 window - use specialized XCB_X11_TO_PID function!
Godot Engine v4.1.1.stable.official.bd6af8e0e - https://godotengine.org
glx: failed to create dri3 screen
failed to load driver: nouveau
OpenGL API 4.6 (Core Profile) Mesa 23.3.4 (git-27405fd573) - Compatibility - Using Device: Intel - Mesa Intel(R) UHD Graphics 630 (CFL GT2)

GameOverlay: started '/var/home/mateusrc/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayui' (pid 1252) for game process 1195
tid(1252) burning pthread_key_t == 0 so we never use it
02/28 22:34:13 Init: Installing breakpad exception handler for appid(gameoverlayui)/version(20240226154118)/tid(1252)
02/28 22:34:13 Init: Installing breakpad exception handler for appid(gameoverlayui)/version(1.0)/tid(1252)
File not found: user://game.sav
File not found: user://progress.sav
[S_API] SteamAPI_Init(): Loaded '/var/home/mateusrc/.var/app/com.valvesoftware.Steam/.local/share/Steam/linux64/steamclient.so' OK.
Setting breakpad minidump AppID = 1569520
SteamInternal_SetMinidumpSteamID:  Caching Steam ID:  76561198067341561 [API loaded no]
Steam: { "status": 1, "verbal": "Steamworks active." }
No legacy.
Game 1569520 created interface STEAMUSERSTATS_INTERFACE_VERSION012 / 
Game 1569520 created interface SteamUser023 / 
Game 1569520 created interface SteamUser023 / User
Game 1569520 created interface SteamUtils010 / 
Game 1569520 method call count for IClientUserStats::StoreStats : 1
Game 1569520 method call count for IClientUtils::RecordSteamInterfaceCreation : 5
Game 1569520 method call count for IClientUtils::GetAppID : 7
Game 1569520 method call count for IClientUser::GetGameBadgeLevel : 2
Game 1569520 method call count for IClientUser::GetSteamID : 1
Uploaded AppInterfaceStats to Steam