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

MangoHud and vkBasalt stopped working without apparent reason #1280

Closed
minisori opened this issue Mar 26, 2024 · 19 comments · Fixed by #1281
Closed

MangoHud and vkBasalt stopped working without apparent reason #1280

minisori opened this issue Mar 26, 2024 · 19 comments · Fixed by #1281

Comments

@minisori
Copy link

minisori commented Mar 26, 2024

Game information
Any game.

Distribution name and version where applicable

Distributor ID:	Debian
Description:	Debian GNU/Linux 12 (bookworm)
Release:	12
Codename:	bookworm

Flatpak info

Flatpak 1.14.4
default
host

flatpak info com.valvesoftware.Steam

Valve Corporation - Juega a los juegos populares y los últimos lanzamientos

          ID: com.valvesoftware.Steam
  Referencia: app/com.valvesoftware.Steam/x86_64/stable
Arquitectura: x86_64
        Rama: stable
     Versión: 1.0.0.79
    Licencia: LicenseRef-proprietary
      Origen: flathub
   Colección: org.flathub.Stable
 Instalación: system
   Instalada: 45,5 MB
     Runtime: org.freedesktop.Platform/x86_64/23.08
         Sdk: org.freedesktop.Sdk/x86_64/23.08

      Commit: 98f034b154eed70b957bedcba0a5ce3785e70999b4aef85e1f6dd66f2eb15ff7
       Padre: 31e5dfccc4e4b287b5c07776bfe9b9168805f45443710b90a27b81aa3ac2093b
      Asunto: Update hwdata (a380271d)
       Fecha: 2024-03-05 13:07:50 +0000

flatpak info --show-permissions com.valvesoftware.Steam
permisions.txt

Problem description
Since last night MangoHud and vkBasalt stopped working without apparent reason. Looks like the libraries are not being preloaded when the game is launched, no matter if the game is native or using proton.
I use MANGOHUD=1 as env variable and I also tried with mangohud %command%, the game launches but there is no MangoHud nor vkBasalt.

Does this issue reproduce with native Steam
I don't have native steam due to old mesa libraries in debian.

@zastrixarundell
Copy link

zastrixarundell commented Mar 26, 2024

+ on fedora kinoite 39, doesn't work for Elder Scrolls Online and Doom Eternal (haven't tested other games)

@Mershl
Copy link

Mershl commented Mar 26, 2024

Fedora Silverblue (Gnome) 39 and 40 is also affected. It still works in OpenGL games.

@valeth
Copy link

valeth commented Mar 26, 2024

Noticed the same problem on NixOS.
Like others have already mentioned only games using Vulkan seem to be affected.
Tested OpenGL with Factorio and Noita, and both work just fine with mangohud --dlsym prefixed.

@toupeira
Copy link

Same on Debian sid, using:

  • com.valvesoftware.Steam 1.0.0.79
  • org.freedesktop.Platform.VulkanLayer.MangoHud 0.7.1
  • flatpak 1.14.5-1+b3

MangoHud doesn't work for Vulkan games, but does work for OpenGL games with mangohud --dlsym.

@C0Nd3Mnd
Copy link

Can confirm, stopped working under Fedora 39 (KDE, Wayland), tested kernel 6.7.10 and 6.8.1. OpenGL games work.

@zastrixarundell
Copy link

zastrixarundell commented Mar 27, 2024

Anybody tried with the native version? Is this only happening on the flatpak version?

@C0Nd3Mnd
Copy link

Anybody tried with that native version? Is this only happening on the flatpak version?

It's working fine for me with the rpm package from rpmfusion-nonfree.

@dominikzogg
Copy link

Same issue here. I meant its cause i already updated to fedora 40 (still beta) but it seems not the case, reading this issue.

@Sporif
Copy link

Sporif commented Mar 29, 2024

It seems Vulkan extensions are not being exposed in the Steam Pressure-Vessel subcontainer.

Here is a temporary workaround for MangoHud 64-bit (can be extended to other layers):

flatpak run --command=/usr/bin/bash com.valvesoftware.Steam
cp /usr/lib/extensions/vulkan/share/vulkan/implicit_layer.d/MangoHud.x86_64.json ~/data/vulkan/implicit_layer.d/
cp /usr/lib/extensions/vulkan/MangoHud/lib/x86_64-linux-gnu/libMangoHud.so ~/data/vulkan/
sed -i "s#/usr/lib/extensions/vulkan/MangoHud/lib/x86_64-linux-gnu#$HOME/.var/app/com.valvesoftware.Steam/data/vulkan#" data/vulkan/implicit_layer.d/MangoHud.x86_64.json

@C0Nd3Mnd
Copy link

I can confirm that @Sporif workaround works for me.

@maboroshinokiseki
Copy link

maboroshinokiseki commented Mar 29, 2024

For @Sporif 's workaround, some games work, but some don't, and I can't figure out why 😅

Edit: Just found out what's going on, those games are 32 bit

Here are the commands in case anyone needs it

flatpak run --command=/usr/bin/bash com.valvesoftware.Steam
cp /usr/lib/extensions/vulkan/share/vulkan/implicit_layer.d/MangoHud.x86.json ~/data/vulkan/implicit_layer.d/
cp /usr/lib/extensions/vulkan/MangoHud/lib/i386-linux-gnu/libMangoHud.so ~/data/vulkan/i386/
sed -i "s#/usr/lib/extensions/vulkan/MangoHud/lib/i386-linux-gnu#$HOME/.var/app/com.valvesoftware.Steam/data/vulkan/i386#" data/vulkan/implicit_layer.d/MangoHud.x86.json

jntesteves added a commit to jntesteves/com.valvesoftware.Steam that referenced this issue Mar 29, 2024
This is a hack until the underlying issue is fixed in the steam-runtime. Pressure-vessel mounts Flatpak extensions on a different path within the container, and that breaks Vulkan Layers due to that path not being in Vulkan-Loader's search paths, documented on: https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderLayerInterface.md#linux-layer-discovery

This directory doesn't exist outside a pressure-vessel container, which is only used by games and not by all of them. But still, adding it to XDG_DATA_DIRS in finish-args shouldn't cause any adverse effect, as these search paths are not required to be all valid.

fixes flathub#1280
@jntesteves
Copy link
Contributor

jntesteves commented Mar 29, 2024

I've sent PR #1281 with a workaround for this issue. Should hopefully be on the next version.

I'd recommend against applying Sporif's workaround if you don't know what you're doing. You will have to remove those files later, or they will break your setup in a future update. You can set an environment variable to solve this issue much more easily, but most people should just wait for an update.

@C0Nd3Mnd
Copy link

Can confirm this PR also works for me. You can simply set the value of XDG_DATA_DIRS to what's in the PR if you don't want to install a test build and/or wait for this to appear in a release.

@minisori
Copy link
Author

I confirm MangoHud and vkBasalt work with the test build.

bbhtt pushed a commit that referenced this issue Mar 30, 2024
This is a hack until the underlying issue is fixed in the steam-runtime. Pressure-vessel mounts Flatpak extensions on a different path within the container, and that breaks Vulkan Layers due to that path not being in Vulkan-Loader's search paths, documented on: https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderLayerInterface.md#linux-layer-discovery

This directory doesn't exist outside a pressure-vessel container, which is only used by games and not by all of them. But still, adding it to XDG_DATA_DIRS in finish-args shouldn't cause any adverse effect, as these search paths are not required to be all valid.

fixes #1280
@JamesMcMahon
Copy link

JamesMcMahon commented Mar 30, 2024

I've sent PR #1281 with a workaround for this issue. Should hopefully be on the next version.

I'd recommend against applying Sporif's workaround if you don't know what you're doing. You will have to remove those files later, or they will break your setup in a future update. You can set an environment variable to solve this issue much more easily, but most people should just wait for an update.

I am not sure that PR fixes 32 bit apps, or at least one of the games I have that I can confirm to be 32 bit doesn't get fixed by adding :/usr/lib/pressure-vessel/overrides/share to XDG_DATA_DIRS.

Can anyone else confirm one way or another? @maboroshinokiseki

@maboroshinokiseki
Copy link

I've sent PR #1281 with a workaround for this issue. Should hopefully be on the next version.
I'd recommend against applying Sporif's workaround if you don't know what you're doing. You will have to remove those files later, or they will break your setup in a future update. You can set an environment variable to solve this issue much more easily, but most people should just wait for an update.

I am not sure that PR fixes 32 bit apps, or at least one of the games I have that I can confirm to be 32 bit doesn't get fixed by adding :/usr/lib/pressure-vessel/overrides/share to XDG_DATA_DIRS.

Can anyone else confirm one way or another? @maboroshinokiseki

I just tested 2 32 bit games, The Witcher 2 and Oblivion, and they are working correctly.

@C0Nd3Mnd
Copy link

@JamesMcMahon Is the game that's not working a Linux-native OpenGL game by any chance?

@JamesMcMahon
Copy link

JamesMcMahon commented Mar 30, 2024

I just tested 2 32 bit games, The Witcher 2 and Oblivion, and they are working correctly.

Awesome! Chalk this up to a false alarm then. Thank you for verifying. I can also verify on my side that Oblivion works fine so must be an issue with the game I was testing.

@JamesMcMahon Is the game that's not working a Linux-native OpenGL game by any chance?

Game in question is Zortch. It's not Linux native but it could be OpenGL, not sure how to confirm that.

@C0Nd3Mnd
Copy link

C0Nd3Mnd commented Mar 30, 2024

Game in question is Zortch. It's not Linux native but it could be OpenGL, not sure how to confirm that.

That explains it then. MangoHud can tell you if a game uses OpenGL or Vulkan (or DXVK), but in order to run an OpenGL game with MangoHud you have to set launch options to mangohud --dlsym %command% in Steam. I just checked out the demo of Zortch and can confirm it's running via OpenGL and MangoHud works when launched like I explained.

bbhtt pushed a commit that referenced this issue Apr 3, 2024
This is a hack until the underlying issue is fixed in the steam-runtime. Pressure-vessel mounts Flatpak extensions on a different path within the container, and that breaks Vulkan Layers due to that path not being in Vulkan-Loader's search paths, documented on: https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderLayerInterface.md#linux-layer-discovery

This directory doesn't exist outside a pressure-vessel container, which is only used by games and not by all of them. But still, adding it to XDG_DATA_DIRS in finish-args shouldn't cause any adverse effect, as these search paths are not required to be all valid.

fixes #1280
bbhtt pushed a commit that referenced this issue Apr 3, 2024
This is a hack until the underlying issue is fixed in the steam-runtime. Pressure-vessel mounts Flatpak extensions on a different path within the container, and that breaks Vulkan Layers due to that path not being in Vulkan-Loader's search paths, documented on: https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderLayerInterface.md#linux-layer-discovery

This directory doesn't exist outside a pressure-vessel container, which is only used by games and not by all of them. But still, adding it to XDG_DATA_DIRS in finish-args shouldn't cause any adverse effect, as these search paths are not required to be all valid.

fixes #1280
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 a pull request may close this issue.