sonic2kk / steamtinkerlaunch

Linux wrapper tool for use with the Steam client for custom launch options and 3rd party programs
GNU General Public License v3.0
2.05k stars 70 forks source link

Disabling Gamescope Gamescope not found #1137

Closed FrodoDE closed 1 week ago

FrodoDE commented 1 week ago

System Information

Issue Description

Installed gamescope via Flatpak and wanted to use it with Steamtinkerlaunch. When I start a game there is a Message Warning - disabling 'USEGAMESCOPE' because 'gamescope' was not found

Logs

steamtinkerlaunch.log

sonic2kk commented 1 week ago

I'm not sure if GameScope Flatpak works with SteamTinkerLaunch. Do other Flatpak tools work?

The Flatpak sees very little testing compared to the official Steam Client. I don't use Flatpak Steam so I'm not sure if it's expected to work.

sonic2kk commented 1 week ago

The GameScope dependency check is as straightforward as running command -v gamescope. If you run this inside the Steam Flatpak environment, can it find GameScope?

GameScope is not listed as an add-on for Steam Flatpak on Flathub. Are you sure you got one that is used as an Add-On? There is a GameScope Flatpak as a VulkanLayer but it is not an Add-On for the Steam Client, so I am not sure if it is available by default for the Steam Client. There used to be a Steam Client Add-On for GameScope, but it is archived now (and it looks like historically it had issues with any Proton version that used the Steam Linux Runtime, which Flatpak'd Proton add-ons did not).

Does replacing steamtinkerlaunch %command with gamescope -- %command% in your launch options work? If not, this is not a SteamTinkerLaunch bug, and there may be extra work required to get the Steam Flatpak environment to be able to see GameScope.

sonic2kk commented 1 week ago

Okay, it seems like this is all to do with the Steam Linux Runtime. You can try disabling the Steam Linux Runtime from SteamTinkerLaunch to see if it fixes the issue, but this may cause crashes as you are disabling the container that the game is intended to run inside of. If War Thunder passes a Steam Linux Runtime you will need to ignore the Steam Linux Runtime coming from the game as well.

This may work with some games and not others, and system updates may break your game! Games are intended to run inside of the Steam Linux Runtime. When not using the Steam Linux Runtime, games are running against the libraries on your system, which may not be fully compatible with your game, resulting in either failures to start up (if they are too old/too new) or crashes (they may be compatible enough to start up but may cause crashes later in gameplay).

The root cause of this whole issue is that you cannot use GameScope inside of games/tools using the Steam Linux Runtime. See these issues:

If running gamescope -- %command% works for you with War Thunder, it means the game is not using the Steam Linux Runtime, so without SteamTinkerLaunch the game is not using the Steam Linux Runtime. Disabling it from STL means you'll be running the game similarly to how you would run it from Steam without STL.

If War Thunder requires Steam Linux Runtime 3.0, you'll have to manually set it in Steam's config.vdf so that it's forced as the game's native compatibility tool (it won't use the Windows version of the game because Steam Linux Runtime 1.0 and 3.0 work for native titles, similar to something like Steam-Play-None or Luxtorpeda). When running with SLR 3.0 as the compatibility tool and using SteamTinkerLaunch, STL will use the SLR coming from the game's launch command and so will use SLR 3.0.


So this is a known issue with Flatpak GameScope that is being tracked, and is almost entirely out of their hands as per https://github.com/flathub/org.freedesktop.Platform.VulkanLayer.gamescope/issues/6. Disabling the Steam Linux Runtime from SteamTinkerLaunch (and disabling the Steam Linux Runtime coming from the game itself) may resolve this problem, but could introduce others.

I am going to close this as this is not a SteamTinkerLaunch bug, but I will note this on the GameScope wiki. Please feel free to comment if disabling the Steam Linux Runtime resolved this issue for you, as once I finally get around to making a good Steam Linux Runtime wiki page, I can include this caveat on there as well.

sonic2kk commented 1 week ago

Looking at the log again, it seems the native Steam Linux Runtime 1.0 with AppID 1070560 is not installed, so disabling the Steam Linux Runtime may not do anything. There is also no Steam Linux Runtime coming from the game.

So 7. Jul 11:57:46 CEST 2024 INFO - setSLRReap - SLRPROTONVER is not defined, this is fine as regular game launches don't pass this
So 7. Jul 11:57:46 CEST 2024 INFO - setSLRReap - Falling back to RUNPROTON which is ''
So 7. Jul 11:57:46 CEST 2024 INFO - setSLRReap - No SLR provided from command line, attempting to fetch required SLR from current compatibility tool's 'toolmanifest.vdf'
So 7. Jul 11:57:46 CEST 2024 INFO - setSLRReap - Now executing Pressure Vessel Funtime 2nd Edition Ver. 2.31
So 7. Jul 11:57:46 CEST 2024 INFO - setSLRReap - Looks like we have a native Linux game here - Checking for plain SLR (AppID '1070560')
So 7. Jul 11:57:46 CEST 2024 INFO - getGameDir - Could not find App Manifest with entered argument '1070560' - Assuming it is a game title and trying to find its AppID from title
So 7. Jul 11:57:46 CEST 2024 INFO - getGameDir - called 'getIDFromTitle' for argument '1070560', it returned 'Could not find AppID for name '1070560'.'
So 7. Jul 11:57:46 CEST 2024 INFO - getGameDir - Extracted AppID from 'getIDFromTitle' result is 'Could not find AppID for name 1070560.' - Searching for App Manifest with this AppID
So 7. Jul 11:57:46 CEST 2024 ERROR - getGameDir - Could not find game directory for '1070560' - Maybe it is not installed
So 7. Jul 11:57:46 CEST 2024 WARN - setSLRReap - Could not find Steam Linux Runtime with AppID '1070560' for native Linux game - This will need to be installed manually!
So 7. Jul 11:57:46 CEST 2024 WARN - setSLRReap - Could not get path to Steam Linux Runtime - This will need to be installed manually!
So 7. Jul 11:57:46 CEST 2024 WARN - setSLRReap - Ignoring USESLR option since valid Steam Linux Runtime could not be found
So 7. Jul 11:57:46 CEST 2024 WARN - setSLRReap - No native linux Steam Linux Runtime found, game will not use Steam Linux Runtime
So 7. Jul 11:57:46 CEST 2024 INFO - setSLRReap - ## reaper command is enabled via USEREAP=1 - prepending to the current launch command
So 7. Jul 11:57:46 CEST 2024 INFO - setSLRReap - Adding SLR '/home/dschatzle/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=236390 --' to the launch command

The final outgoing start command also does not include the Steam Linux Runtime.

So 7. Jul 11:57:46 CEST 2024 INFO - launchSteamGame - Final outgoing start command: '/home/dschatzle/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=236390 -- /home/dschatzle/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- /home/dschatzle/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/War Thunder/launcher'

This means sadly there may be no workaround. It does seem overall like you can't use the Flatpak GameScope with Flatpak Steam based on the above linked issues. There could be other sandboxing-related issues preventing this from working.