ValveSoftware / steam-runtime

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

/compatdata/<gameID> symlinks stopped working #517

Closed BETLOG closed 1 year ago

BETLOG commented 2 years ago

Your system information

Jul 19 2022, at 20:51:26 (It'd be much nicer if we could select/copy this text instead of needing to transcribe it from steam > about)

Kubuntu 20.04 beta: yes updated: yes

Symlinks within .../.steam/steamapps/compatdata/ no longer function. Steam says game is starting, but doesn't, and after a few second the Start button reverts to display 'start' again.

I sometimes find myself needing to juggle/protect proton versions, and the easiest way to do this is to have multiple proton folders and symlink the active one to the games expected ID number. As of today this stopped working.

2022-07-21--16-47-09_betlogbeast_mediausersteamdatasteamsteamappscompatdataDolphin

kisak-valve commented 2 years ago

Hello @BETLOG, in general, issues with running games with Proton should be tracked in the Proton issue tracker, but I suspect this is related to #516, so I've transferred this issue report to the steam-runtime issue tracker.

In Steam, can you try going to Steam Linux Runtime - Soldier in the library view -> Properties -> Betas and select the previous_release beta, then retest with a couple games using Proton 5.13 or newer.

smcv commented 2 years ago

I don't think we changed anything that would affect symlink interpretation in recent releases, but there was a significant amount of refactoring in order to be compatible with user-space CPU emulation, so it's entirely possible that something that was in an unstable equilibrium got knocked over.

smcv commented 2 years ago

To point me in the right direction: have you used symbolic links to rearrange places like your home directory, your Steam installation, ~/.steam, or anywhere else Steam-related?

BETLOG commented 2 years ago

@kisak-valve noted, thanks.

@smcv

# NVME_1TB-1            1TB
UUID=99c54a97-6aaa-4aed-86a2-6fa6686674c9               /media/user/steamdata                       ext4    rw,suid,dev,user,exec,auto,nofail,async     0   1
/media/user/steamdata/.steam                            /home/user/.steam                           none    bind,nofail                                 0   0
/media/user/steamdata/.factorio                         /home/user/.factorio                        none    bind,nofail                                 0   0
mount|grep -i steam
/dev/nvme0n1p1 on /media/user/steamdata type ext4 (rw,nosuid,nodev,relatime,user)
/dev/nvme0n1p1 on /home/user/.steam type ext4 (rw,nosuid,nodev,relatime)

The only changes I have made are exclusively as shown in the screenshot. AFAIR i have never altered any other dir structure. ie: Using Dolphin, drag and select 'link here', of one of the longname folders shown, to the game ID-only (24960) symlink. Normally I do this through the /media mount (not the /home bind), and only within /media/user/steamdata/.steam/steam/steamapps/compatdata/ The drive is a 1TB NVMe M.2

Essentially I make a safe copy of the compatdata/gameID folder at useful points where I intend to change the proton version. Or as was the case recently: BFBC2 (24960) crashed while I was playing it and would not restart, not even after reboot. So I safe-renamed the compatdata/24960 folder before trying the latest standard/steam proton version from scratch, this made the game work again, so i safe-renamed that folder too and attempted to symlink the prior 24960 folder to see if the corruption was in that, or in the game folder itself (...steamapps/common/...) but then discovered that symlinking the compatdata folders now failed. I have been doing this infrequently for an extended period (years), so I was surprised.

[ edit 2022-07-22--13-25-46 ] Log I just made of the game failing to start while symlinked, using the proton version I had been using for for several months prior.

setsid $(which steam) steam://rungameid/24960 &> /dev/null &;; 2022-07-22--13-15-18_error_compatdata24960Symlinked.log https://gist.github.com/BETLOG/4ffdd84208f73364ba90f3e517f202e9

smcv commented 2 years ago

The update that triggered this regression has been rolled back while we investigate. The situation is now:

smcv commented 2 years ago

Using Dolphin, drag and select 'link here', of one of the longname folders shown, to the game ID-only (24960) symlink

Does this GUI operation result in a relative symlink (24960 -> 24960_whatever in ls -l), or an absolute symlink (24960 -> /media/user/.../compatdata/24960_whatever in ls -l)?

smcv commented 2 years ago

I think I have a solution for this, which will go through more testing and review next week has now been released (see comment below).

[instructions to install an unofficial test-build removed: no longer necessary, see comment below instead]

It would be useful if you could share a debug log recorded with this test version, especially if it doesn't work. If you set the game's Launch Options in Steam to

STEAM_LINUX_RUNTIME_LOG=1 STEAM_LINUX_RUNTIME_VERBOSE=1 %command%

and then run the game, you should get a detailed log in SteamLinuxRuntime_soldier/var/slr-latest.log. This will give me more details than the ones available in your previous log, which only show the final error and not the route we took to get there.

Does this GUI operation result in a relative symlink or an absolute symlink?

I tried using an absolute symlink for compatdata and a relative symlink for the shader cache (which is handled in a very similar way), and both of those seem to work as intended with my proposed change, so I hope it will work either way.

smcv commented 2 years ago

The fix for this should be in the next beta. If you stay on the client_beta branch, you should get upgraded to it automatically.

This has gone out in the client_beta branch as SteamLinuxRuntime_soldier build ID 9200891. Specifically, what you want to see in VERSIONS.txt is pressure-vessel 0.20220726.0 or later.

To test the beta, in Steam's library view, please search for "Steam Linux Runtime - Soldier", then right click on it -> Properties -> Betas -> select client_beta from the drop-down list.

If you have already tried an unofficial build of pressure-vessel, after upgrading please verify integrity on "Steam Linux Runtime - soldier" to clear out any remnants of the unofficial build.

I believe the situation as of today is:

so @kisak-valve can close this issue as soon as the beta has been confirmed to fix the issue (unusually, we do not have to wait for it to be promoted to the default branch).

smcv commented 2 years ago

(unusually, we do not have to wait for it to be promoted to the default branch).

The fixed version has now been promoted to the default branch. Please could you confirm whether the pattern of using symlinks in the compatdata directory works as you expected now?

kisak-valve commented 1 year ago

Closing due to timeout waiting for feedback.