Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Steam Linux Runtime: Re-enable parsing Steam Linux Runtime from Compatibility Tool start command #1086

Merged
merged 2 commits into from Apr 19, 2024

Conversation

sonic2kk
Copy link
Owner

@sonic2kk sonic2kk commented Apr 18, 2024

Fixes #1084

Primarily (but not exclusively) allows native games that have a Steam Linux Runtime selected (either by the user, or by Valve as sometimes they force SLR 1.0 or 3.0 for games) to launch with the SLR selected.

Previously, the SLR would be ignored entirely if it came from the compatibility tool, but this causes incompatibilities with games that REQUIRE a specific SLR version (ex: CS2 requires SLR 3.0 and is selected by Valve, the user doesn't have a choice)

This change allows STL to read the SLR coming from the compat tool launch, so if a game is launched with a specified SLR version, we will use this instead of ignoring or building the start command ourselves.

TODO:

  • Test with native games forced from Steam to use SLR 1.0 and make sure 1.0 is being used correctly
  • Test with Proton games and inspect log to ensure the SLR it needs is used correctly (i.e. check that the path in this PR is not followed for Proton games) - In other words, make sure this PR doesn't cause any regressions
  • Test with native games that don't have any compat tool selected and check that the SLR 1.0 is appended properly and NOT from this new code path -- Again, makes sure this PR doesn't cause any regressions

…tibility Tool start command

Primarily (but not exclusively) allows native games that
have a Steam Linux Runtime selected (either by the user,
or by Valve as sometimes they force SLR 1.0 or 3.0 for
games) to launch with the SLR selected.

Previously, the SLR would be ignored entirely if it
came from the compatibility tool, but this causes
incompatibilities with games that REQUIRE a specific
SLR version (ex: CS2 requires SLR 3.0 and is selected
by Valve, the user doesn't have a choice)

This change allows STL to read the SLR coming from
the compat tool launch, so if a game is launched
with a specified SLR version, we will use this
instead of ignoring or building the start command
ourselves.
@sonic2kk
Copy link
Owner Author

sonic2kk commented Apr 18, 2024

Copied from #1084 (comment)

Tested and the following scenarios work:

  • CS2 works out of the box, with Valve Testing's enforce SLR 3.0 (verified in log that the new code path is followed)
  • CS2 crashes as expected with Steam Linux Runtime disabled from Steam (this verifies the SLR is disabled as expected), and works again if the SLR is enabled (verified in code that SLR is seen as disabled)
    • Start command was STL LAUNCH COMMAND: '/home/emma/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=730 -- /run/media/emma/2B/Games/steamapps/common/Counter-Strike Global Offensive/game/cs2.sh -steam'
  • Proton games work as expected and still follow the code path to pull the SLR from the compat tool toolmanifest.vdf (The so-called "Pressure Vessel Funtime 2nd Edition Ver. 2.31" code path is used)
    • Tested PowerWash Simulator and Sonic Adventure 2
  • Proton games are hit-and-miss with the SLR disabled, sometimes crashing on launch, as expected, so no change in behaviour
  • Native games with NO COMPATIBILITY TOOL ENFORCED (none from Valve and none by the user) will still use the native Linux SLR 1.0, so no change in functionality
  • Native games with the SLR disabled will correctly ignore it, so no change in functionality
    • This can be verified by checking the processes in system monitor: no additional srt-bwrap and pressure-vessel-adverb processes are spawned on game launch with the SLR disabled, but are spawned with the SLR enabled
  • Native games WITH SLR 1.0 FORCED FROM PROPERTIES -> COMPATIBILITY will use the SLR specified here using the new code path that pulls it from the launch command and not the toolmanifest.vdf (verified using log)
  • Native games WITH SLR 1.0 FORCED FROM PROPERTIES -> COMPATIBILITY but which have SLR disabled from SteamTinkerLaunch Game Menu will correctly ignore it
    • This can once again be verified from the processes running
    • The launch command still includes some reference to the Steam Linux Runtime, but as it is missing various arguments, it is likely harmless. We could probably grep and remove this, but I think we can just ignore it as it doesn't have any effect on whether the SLR is used or not. This also only happens in the case of a native game using SLR 1.0 with the SLR disabled from STL settings by the user.

This PR is ready to merge pending feedback from OP of original issue. In my testing this works as expected and fixes the issue, without causing regressions, and actually adds the benefit of STL being able to pick up the SLR for native games if enforced by the user, which can be handy! This means users that manually enable SLR 3.0 can use it too (STL cannot yet allow SLR 3.0 for native titles).

@sonic2kk
Copy link
Owner Author

In future, we should have a dropdown to select the Native Linux Steam Linux Runtime, and let the user decide to use 1.0 or 3.0. We should make it clear that this is for native titles only.

This value can override SLRAID, which should still default to 1070560 (AID for SLR 1.0 Scout) but we should have a dropdown to choose if it should be SLR 3.0 Sniper. Then the Pressure Vessel Funtime code can pick up and check for SLR 3.0. If the syntax is the same for the launch command for 1.0 and 3.0, then no code change should be needed, since Funtime will work with the ID for 3.0.

@sonic2kk
Copy link
Owner Author

Confirmed to fix the issue by OP, this needs a little bit of comment cleanup, version bump, and it's good to merge.

@sonic2kk sonic2kk merged commit 04ae6e9 into master Apr 19, 2024
1 check passed
@sonic2kk sonic2kk deleted the reenable-get-slr-from-compattool-launch-cmd branch April 21, 2024 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CS2 crashes saying is not launched with Steam for Linux
1 participant