ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.25k stars 175 forks source link

If "Enable Steam Play for supported titles" is off, then SLR 3 games like Dota 2 are run in the wrong environment #9852

Open smcv opened 1 year ago

smcv commented 1 year ago

Your system information

Please describe your issue in as much detail as possible:

As background, there are broadly three categories of Steam game on Linux:

  1. Older native Linux games that (are assumed to) have been compiled for the Steam Runtime 1 'scout' environment, like Half-Life
  2. Newer native Linux games that are flagged as requiring a Steam Linux Runtime 3 'sniper' container, like Dota 2
  3. Windows-only games with no native Linux version, like Left 4 Dead

Games like Half-Life can be launched with or without using a Steam Play compatibility tool: you can either install the native Linux version and use the scout LD_LIBRARY_PATH environment (default on desktop), or install the native Linux version and use the "Steam Linux Runtime" Steam Linux Runtime 1.0 (scout) compatibility tool (default on Steam Deck for some games), or install the Windows version and use a Proton compatibility tool (default on Steam Deck for some games).

Games like Dota 2 require a compatibility tool, and there is no supported way to run them without one. You can either install the native Linux version and use the Steam Linux Runtime 3.0 (sniper) compatibility tool, or install the Windows version and use a Proton compatibility tool.

Games like Left 4 Dead require Proton. There is no native Linux version, so you have to install the Windows version and use a Proton compatibility tool: there is no other option.

The bug is: if the option "Enable Steam Play for supported titles" is disabled (unchecked), then games in the same category as Dota 2 are launched without using a compatibility tool, in the old 'scout' LD_LIBRARY_PATH environment. This will often make them crash or otherwise work incorrectly.

This contrasts with Windows-only games, like Left 4 Dead, which are handled better. If the "Enable Steam Play for supported titles" option is disabled, Steam will not allow me to launch Left 4 Dead, even if it is installed: I see a greyed-out INSTALL button and the message AVAILABLE FOR [Windows logo] [Apple logo].

Steps for reproducing this issue:

  1. Run Steam in a way that will let you see its output (perhaps in a terminal or the systemd Journal)
  2. Install Dota 2
  3. Open the Steam Settings window:
    • if you are using desktop mode: Steam menu -> Settings
    • if you are using Big Picture mode: guide button on gamepad (Steam/Xbox/Playstation logo) and choose Settings from the menu
  4. Select the Compatibility tab
  5. Switch off "Enable Steam Play for supported titles"
  6. Navigate to the Library and try to launch Dota 2

Expected result

Steam should do one of these (I don't know which one would be better):

If it does launch Dota 2, the command that is logged in Steam's output should look something like this

/bin/sh\0-c\0
.../reaper SteamLaunch AppId=570 --
.../steam-launch-wrapper --
.../SteamLinuxRuntime_sniper/_v2-entry-point --verb=waitforexitandrun --
.../dota 2 beta/game/dota.sh ...\0

(In reality it's all one line and contains long paths/options, I've split it into shorter lines and omitted some parts for clarity.)

Actual result

Dota 2 is launched in the older LD_LIBRARY_PATH 'scout' environment, as used for games like Half-Life, with a command that looks something like this:

/bin/sh\0-c\0
.../reaper SteamLaunch AppId=570 --
.../steam-launch-wrapper --
.../dota 2 beta/game/dota.sh ...\0

This is no longer a supported way to run Dota 2 (since July 2023) and on many systems the result will be that it crashes, either immediately or later.

Workaround

  1. Open the Steam Settings window:
    • if you are using desktop mode: Steam menu -> Settings
    • if you are using Big Picture mode: guide button on gamepad (Steam/Xbox/Playstation logo) and choose Settings from the menu
  2. Select the Compatibility tab
  3. Switch on "Enable Steam Play for supported titles"

Related issues

9835 has similar symptoms but a different root cause.

9844 is also related.

smcv commented 2 weeks ago

not have a "Enable Steam Play for supported titles" option at all, and always behave as though it was enabled

This was implemented in a recent beta:

Steam Client Beta - October 25th

Remove the UI toggle to disable Steam Play globally, correctly reflecting that Steam Play is always enabled on Linux. Steam Play was always partially active even when set to off in the UI as it is a requirement for Steam client operation.

I confirm that the UI toggle is no longer present in beta 1730243536 (2024-10-30).

I'll leave this issue open until this change makes it into a stable release, but then I think it can be closed.