-
Notifications
You must be signed in to change notification settings - Fork 86
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
Native Linux Metro Exodus enters infinite loop when changing in game resolution #674
Comments
Just to check, you mean game ID 412020, right?
If this part of the steps-to-reproduce is accurate, then you are specifically not running Metro Exodus in the container runtime, which is what we refer to when we say "Steam Linux Runtime" or "SLR". Instead, when you reproduce this bug, you are running it in the older
... and running it in SLR actually avoids this bug. (I am 90% sure that this is because SLR is less dependent on the
There is no "newer versions of SLR" available to this particular game. There are only two environments that are valid to run a typical native Linux Steam game like 412020, with the potential to maybe add a third environment eventually:
(1.) is the default for nearly all native Linux games on desktop, and is what you use in your steps-to-reproduce. (2.) is the default for some games on Steam Deck (e.g. Floating Point is a convenient example that is free-to-play), but according to https://steamdb.info/app/412020/info/ the default for Metro Exodus on Deck is to ignore the existence of a native Linux build, and instead run the Windows build via the default/stable branch of Proton. I assume this was done because QA testers encountered bugs when using the native Linux build. (2). is also what you used in your workaround. Not directly applicable to Metro Exodus, but for background information: A minority of native Linux games, some Valve (e.g. Counter-Strike 2) and some third-party (e.g. Retroarch), require a newer branch of SLR (specifically, "Steam Linux Runtime 3.0 (sniper)"), and run in that environment without any Steam Runtime 1.0 'scout' compatibility libraries. However, this is only done if the game developer has specifically told Valve "I am targeting sniper for this game", which the developers of Metro Exodus have not done. The affected games cannot be played in the old Games that run under sniper in this way either have an entry in https://steamdb.info/app/891390/info/ forcing the game to use |
You can tell when you are using this runtime because the game process's
In this case the game process's
If this is the case, then the game's Looking at what I found out in #411, I think this is happening "by mistake" because the scout SLR environment does provide its own SDL2, but that SDL2 is installed with its canonical upstream
If this is the case, then the game's I believe this is affecting you because your host system ships the development symlink In distributions that do separate runtime and development libraries, like Debian and Fedora, I expect that this bug would not occur for users who only have the runtime library The system requirements listed on Steam for this game say that it needs "Ubuntu 20" (presumably meaning 20.04), so probably the game's developer/porter/publisher QA team only tested it on Ubuntu 20.04 systems that did not have a system-wide copy of Based on my investigation of #411 back in 2021, setting the game's launch options to
as per #411 (comment) would probably work around this on systems that have SDL2 development libraries. In #411 (comment) I suggested several ways that the Metro Exodus developers could have avoided #411, and those same suggestions would likely avoid #674. My understanding of Valve's policy is that the contents of the game depot are under the game developer's control and will not generally be modified by Valve, so it is up to the game developer (and not Valve) if they want to fix this. |
If someone wants to bisect this and try to find out which SDL2 commit triggers the infinite loop (this issue) and/or which SDL2 commit made the game slower (#411), the easiest way to do it would be:
See https://github.com/libsdl-org/SDL/blob/SDL2/docs/README-dynapi.md for more details of the SDL2 library feature that we're using here. Another possible route to figuring this out would be to contact the Metro Exodus developer, Linux porter or publisher to find out what version of SDL2 they bundled with the game, and what changes (if any) they made to it. cc @slouken |
Tracked as steamrt/tasks#456 internally, but not necessarily actually actionable for the Steam Runtime - this seems like it might be more of a game-specific issue. |
Your system information
steamapps/common/SteamLinuxRuntime/VERSIONS.txt
?#Name Version Runtime Runtime_Version Comment
depot 0.20240415.0 # Overall version number
LD_LIBRARY_PATH - scout - # see ~/.steam/root/ubuntu12_32/steam-runtime/version.txt
scripts 0.20240415.0 # from steam-runtime-tools
steamapps/common/SteamLinuxRuntime_soldier/VERSIONS.txt
?#Name Version Runtime Runtime_Version Comment
depot 0.20240415.84602 # Overall version number
pressure-vessel 0.20240415.0 scout # pressure-vessel-bin.tar.gz
scripts 0.20240415.0 # from steam-runtime-tools
soldier 0.20240415.84602 soldier 0.20240415.84602 # soldier_platform_0.20240415.84602/
steamapps/common/SteamLinuxRuntime_sniper/VERSIONS.txt
?#Name Version Runtime Runtime_Version Comment
depot 0.20240415.84603 # Overall version number
pressure-vessel 0.20240415.0 scout # pressure-vessel-bin.tar.gz
scripts 0.20240415.0 # from steam-runtime-tools
sniper 0.20240415.84603 sniper 0.20240415.84603 # sniper_platform_0.20240415.84603/
Please describe your issue in as much detail as possible:
When running the native Linux build of Metro Exodus in SLR the game will always enter an infinite loop when the in game resolution is changed. I have been able to reproduce this with the NVIDIA proprietary driver, as well as RADV. I have included steps to reproduce this below.
It appears that the game locks up because it enters an infinite loop where it repeatedly calls vkGetPhysicalDeviceSurfaceCapabilitiesKHR. From looking at the assembly code in gdb the game is polling for the current surface extent to be updated to something other than the previous display resolution, but this never occurs.
The only way I have found to avoid this problem is by forcing the game to run in in the scout SLR. I did this by entering the games compatibility settings in Steam, checking the "Force the use of a specific Steam Play compatibility tool", and then selecting "Steam Linux Runtime 1.0 (scout)". I suspect this works around the issue because the scout SLR seems to allow the game to load the build of SDL2 that it distributes as part of the game. When running with newer versions of SLR the game ends up loading the system copy of SDL2.
I think there are two plausible explanations for why using the game build of SDL2 resolves this issue.
1.) The SDL2 build shipped with the SLR contains a bug that is causing the X11 surface extent to never be updated.
2.) The game is reliant on undefined behavior from SDL, and something internal to SDL changed resulting in this issue.
Regardless it would probably be worthwhile to bisect SDL to determine the exact point where this issue started to occur.
Steps for reproducing this issue:
The text was updated successfully, but these errors were encountered: