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

Regression in pressure-vessel 0.20230206.0: Vulkan layers with $LIB or $PLATFORM not loaded by 32-bit games #564

Closed
smcv opened this issue Feb 20, 2023 · 24 comments

Comments

@smcv
Copy link
Contributor

smcv commented Feb 20, 2023

Your system information

  • Steam Runtime Version: any SteamLinuxRuntime_soldier or _sniper with pressure-vessel 0.20230206.0 or 0.20230216.0
  • Distribution (e.g. Ubuntu 18.04): any, reproduced on Debian 12 prerelease here
  • Link to your full system information: not provided here, this issue has already been diagnosed by Steam Runtime developers
  • Have you checked for system updates?: yes
  • What compatibility tool are you using?: SteamLinuxRuntime_soldier, currently at client_beta branch, depot 0.20230216.41811

Please describe your issue in as much detail as possible:

A regression in pressure-vessel version 0.20230206.0 results in some Vulkan layers not being loaded, in particular the versions of MangoHUD packaged by at least Debian and AUR.

This affects Windows games run on Linux via Proton 5.13 or later, native Linux games run via the Steam Linux Runtime compatibility tool, and a small number of native Linux games (including Retroarch and a non-default branch of Battle for Wesnoth) that run via the Steam Linux Runtime - sniper compatibility tool.

The affected Vulkan layers are anything where a single JSON manifest is used to load both the x86_64 and i386 versions via the special tokens $LIB and $PLATFORM in the library_path, for example Debian's mangohud and mangohud:i386 packages:

$ cat /usr/share/vulkan/implicit_layer.d/MangoHud.json
{
...
      "library_path": "/usr/$LIB/mangohud/libMangoHud.so",
...

Vulkan layers where the library path in the JSON manifest is just the basename of the library, like VK_LAYER_MESA_device_select as packaged on Debian, are unaffected.

Vulkan layers that have separate JSON manifests for x86_64 and i386, like the VK_LAYER_VALVE_steam_overlay_32 and VK_LAYER_VALVE_steam_overlay_64 that are set up in ~/.local/share/vulkan/implicit_layer.d/steamoverlay_*.json by Steam, are unaffected.

Steps for reproducing this issue:

  1. For example, a Debian 12 prerelease system
  2. Install mangohud:amd64 and mangohud:i386 (both are needed to reproduce this bug)
  3. Run Steam with MANGOHUD=1 in the environment
  4. Run a 32-bit Vulkan or DXVK game configured to use Steam Linux Runtime or Proton; I used Portal 2 and ran it with launch options %command% -vulkan to force use of DXVK
  5. Run a 64-bit Vulkan or DXVK game configured to use Steam Linux Runtime or Proton; I used Counter-Strike: Global Offensive, and similarly ran it with -vulkan

As a helpful debugging step, optionally run the games with PRESSURE_VESSEL_SHELL=instead, or use launch options steam-runtime-launch-options -- %command% and request a shell instead of the game. If this is done, you will get an xterm where you can type "$@" (or maybe "$@" -vulkan) to run the game.

Expected result

Both Portal 2 and CS:GO display the MangoHud overlay with GPU load, CPU load and framerate. MangoHud says they are using DXVK.

Actual result

One of the architectures works as expected, but the other behaves as though MangoHud had not been enabled. In my tests it was 64-bit (CS:GO) that worked as expected, and 32-bit (Portal 2) that didn't.

In the debugging shell, find /usr/lib/pressure-vessel/overrides/share shows that one copy of the MangoHud.json manifest was generated in /usr/lib/pressure-vessel/overrides/share/vulkan/implicit_layer.d/ where it will be picked up successfully, but the other was generated in /usr/lib/pressure-vessel/overrides/share/5-i386-linux-gnu/ and so will not actually be used.

@RyuzakiKK
Copy link
Contributor

One of the architectures works as expected, the other does not. In my tests it was 64-bit (CS:GO) that worked as expected, and 32-bit (Portal 2) that didn't.

Just one additional note here. Based on the order used by pressure-vessel to generate the necessary Vulkan layer manifests inside the container, this issue should affect only 32-bit games.

@smcv smcv changed the title Regression in pressure-vessel 0.20230206.0: Vulkan layers with $LIB or $PLATFORM not loaded Regression in pressure-vessel 0.20230206.0: Vulkan layers with $LIB or $PLATFORM not loaded by 32-bit games Feb 20, 2023
@smcv
Copy link
Contributor Author

smcv commented Feb 20, 2023

Just one additional note here. Based on the order used by pressure-vessel to generate the necessary Vulkan layer manifests inside the container, this issue should affect only 32-bit games.

Yes, it makes sense that the failure should consistently be that way round.

@smcv
Copy link
Contributor Author

smcv commented Feb 20, 2023

This is fixed in pressure-vessel 0.20230220.0, which should be included in the next soldier and sniper betas.

Early adopters can try replacing SteamLinuxRuntime_soldier/pressure-vessel/ or SteamLinuxRuntime_sniper/pressure-vessel with the result of unpacking https://repo.steampowered.com/pressure-vessel/snapshots/0.20230220.0/pressure-vessel-bin.tar.gz to get this change sooner.

@smcv
Copy link
Contributor Author

smcv commented Feb 20, 2023

@cyberconan: I think #565 is the same issue as this. Please switch back from the previous_release to either the default or client_beta branch, then try the updated pressure-vessel build linked above: hopefully that will solve it.

@priand1
Copy link

priand1 commented Feb 21, 2023

This is fixed in pressure-vessel 0.20230220.0, which should be included in the next soldier and sniper betas.

Early adopters can try replacing SteamLinuxRuntime_soldier/pressure-vessel/ or SteamLinuxRuntime_sniper/pressure-vessel with the result of unpacking https://repo.steampowered.com/pressure-vessel/snapshots/0.20230220.0/pressure-vessel-bin.tar.gz to get this change sooner.

I think I am also affected by this regression.

My System-Information

I tried unpacking the pressure-vessel-bin.tar.gz into SteamLinuxRuntime_soldier/pressure-vessel/ but it does not work for me, resulting in a working mangohud with 32-bit games.
The symptoms on my system are similar/identical to those that you found:

Mangohud does not work for certain 32bit games with steam proton/steam linux runtime soldier.

Mangohud is working as 64bit version with

  • vkcube (64bit), started from cli
  • all 64bit windows games when started by steam/proton
  • with 64bit linux native games (Deus Ex - Mankind Divided) that use opengl, started by steam

and also is working as 32bit version with

  • vkcube32 (32bit), started from cli
  • native linux 32bit games that use opengl (Borderlands 2, Borderlands the Pre-Sequel), started by steam
  • 32bit windows games started with the system wine installation NOT started by steam

Mangohud is NOT working as 32bit version with

  • all 32bit windows games when started by steam/proton/steam-linux-runtime soldier

As a bonus bug the steam-overlay is also not working with ALL 32bit games, no matter if they are native or run via proton. I think this could be related to this regression.

Just tell me what else info you need and I'll provide it.

@dubigrasu
Copy link

dubigrasu commented Feb 21, 2023

I tried unpacking the pressure-vessel-bin.tar.gz into SteamLinuxRuntime_soldier/pressure-vessel/ but it does not work for me

If I read this correctly, you extracted/placed the folder "pressure-vessel-bin" into "SteamLinuxRuntime_soldier/pressure-vessel", which will not work.
You need to replace the SteamLinuxRuntime_soldier/pressure-vessel/ folder, with the similar one you find in the archive.

@priand1
Copy link

priand1 commented Feb 21, 2023

I tried unpacking the pressure-vessel-bin.tar.gz into SteamLinuxRuntime_soldier/pressure-vessel/ but it does not work for me

If I read this correctly, you extracted/placed the folder "pressure-vessel-bin" into "SteamLinuxRuntime_soldier/pressure-vessel", which will not work. You need to replace the SteamLinuxRuntime_soldier/pressure-vessel/ folder, with the similar one you find in the archive.

Sorry for expressing myself not clearly: I did replace the pressure-vessel folder with the one from the tar.gz

@smcv
Copy link
Contributor Author

smcv commented Feb 21, 2023

@priand1:

As a bonus bug the steam-overlay is also not working with ALL 32bit games, no matter if they are native or run via proton. I think this could be related to this regression.

This regression shouldn't have affected the Steam overlay because some technical details are different, so there is probably something else going on for you. I tried Portal 2 (32-bit) in the container runtime with a version of pressure-vessel that is affected by this regression, and the Steam overlay is still working correctly for me.

Please report a separate issue with full details. In addition to the System Information like you already provided, please run Steam with environment variables STEAM_LINUX_RUNTIME_LOG=1 and STEAM_LINUX_RUNTIME_VERBOSE=1, which should produce a log file in SteamLinuxRuntime_soldier/var/slr-latest.log when you try to launch an affected game.

If you're testing the updated pressure-vessel version 0.20230220.0, please be clear about whether each log file and each System Information dump was collected with the unmodified version from Steam, or with the updated version.

If you happen to have Portal 2, it's a good example of a 32-bit game that can be made to use Vulkan (which is otherwise rare, Vulkan games are mostly 64-bit). It uses OpenGL by default, but if you set its launch options to %command% -vulkan it will use Vulkan instead.

Floating Point is a good example of a simple 32-bit native Linux OpenGL game that is free, small in size, and known to work well. Team Fortress 2 and Life Is Strange are other free 32-bit GL games that I often use for testing.

I tried unpacking the pressure-vessel-bin.tar.gz into SteamLinuxRuntime_soldier/pressure-vessel/ but it does not work for me

It sounds as though you maybe already checked this, but to clarify: the expected directory layout is that you should have files like SteamLinuxRuntime_soldier/pressure-vessel/bin/pressure-vessel-wrap, and you should not have a SteamLinuxRuntime_soldier/pressure-vessel/pressure-vessel directory.

@smcv
Copy link
Contributor Author

smcv commented Feb 21, 2023

Forcing Floating Point to run under Proton (Steam should re-download it as a Windows version) is a good way to get a small, free 32-bit Windows game that is known to work well. Again, I tried this with one of the pressure-vessel versions that is known to have this regression, and the Steam Overlay is still working there for me, so whatever is going wrong for @priand1 must be something different.

@smcv
Copy link
Contributor Author

smcv commented Feb 21, 2023

@dubigrasu, does your thumbs up emoji on a previous comment indicate that you saw this regression, you upgraded to 0.20230220.0, and the regression went away?

@dubigrasu
Copy link

^ Yes, I had this regression:
https://gist.github.com/dubigrasu/0cd9202a2432e266c61efb2a6f4d9be4
which was fixed by using the above provided archive ( 0.20230220.0)

@priand1
Copy link

priand1 commented Feb 21, 2023

@smcv I'll do what you requested and use FLoating Point.
But before I do this, please look at my gists for 'find /usr/lib/pressure-vessel/overrides/share' within the vm for
pv-bin-20230216 and pv-bin-20230220 respectively.
Some of the file listings present in 20230216 are clearly missing for me in 20230220 (e.g. MangoHud.conf) but are present in @dubigrasu 's gist above.

pv-bin20230216

pv-bin20230220

@smcv
Copy link
Contributor Author

smcv commented Feb 21, 2023

@priand1 Please report your situation as a separate issue so that we don't get it mixed up with what's happening for people like @dubigrasu. Thanks!

[edit: The separate issue is #567.]

@priand1
Copy link

priand1 commented Feb 21, 2023

Alright, will do, thanks!

@priand1
Copy link

priand1 commented Feb 22, 2023

After No Steam overlay with any 32bit game #9225
has been worked around/resolved I can confirm that pv-20230220 fixed the regression for me also.

@smcv
Copy link
Contributor Author

smcv commented Feb 22, 2023

This is fixed in pressure-vessel 0.20230220.0, which should be included in the next soldier and sniper betas.

Today's soldier and sniper betas include this version. If you are affected by this, please use the beta instead of replacing pressure-vessel by hand. If the beta causes new regressions, please report them as a separate issue.

@Leopard1907
Copy link

Thanks, new soldier runtime beta fixed the issue for me, Mangohud works again on 32 bit titles.

@bertini97
Copy link

Fixed for me too (debian), big thanks!

@smcv
Copy link
Contributor Author

smcv commented Feb 23, 2023

I think this is at a point where we don't need new confirmations of what we think we already know. If you're about to comment "thanks, I saw this bug and the beta fixes it for me", please assume I already saw that, and my response is: you're welcome :-)

If you have new information that contradicts what we believe so far, please comment or open a new issue.

@cyberconan
Copy link

Thanks, beta fixes the issue for me.

@smcv
Copy link
Contributor Author

smcv commented Feb 28, 2023

The fixed version (pressure-vessel 0.20230220.0 or later) is now in the default branch of soldier, not just the beta.

@smcv smcv closed this as completed Feb 28, 2023
@luisalvarado
Copy link

Thank you SO MUCH @smcv the feedback that I would have (The only one since I even made a video about this tracking issue here https://www.youtube.com/watch?v=boR9FrvhHfc Around minute 8) is that only Left 4 Dead 2 was not showing mangohud on OpenGL. Only on vulkan when using -vulkan as a parameter would it show, but on OpenGL it would not. Do not know if this helps you at all, but thought I would throw it here as feedback.

@smcv
Copy link
Contributor Author

smcv commented Mar 2, 2023

@luisalvarado If the beta fixes this for you, then there is nothing more we need to do. If the beta doesn't fix this for you, please open a separate issue with full details.

@luisalvarado
Copy link

@smcv Thank you so much buddy. I tested and it did not work but I think this was the only game out of 30 that I tested that had that issue and can be fixed by going to vulkan. At least when going to vulkan it boosts the FPS, so all is good. Thank you for being a hero.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants