flightlessmango / MangoHud

A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more. Discord: https://discordapp.com/invite/Gj5YmBb
MIT License
6.11k stars 263 forks source link

Not working with Steam Vulkan games #1359

Closed err0r2k closed 2 weeks ago

err0r2k commented 2 weeks ago

Describe the bug In Steam MANGOHUD=1 %command% is working for all Proton games. In Vulkan games, Mangohud will not show up. When I try mangohud %command% the Proton and Vulkan games will not start.

mangohud vkcube and MANGOHUD=1 vkcube is working. Output: sed: can't read in /etc/upstream-release: It's a directory Selected GPU 0: NVIDIA GeForce RTX 2080, type: 2

I installed mangohud with the Github release. ./mangohud-setup.sh install

List relevant hardware/software information Linux Mint 21.3

flightlessmango commented 2 weeks ago

Can you get a steam log with PROTON_LOG=1 MANGOHUD_LOG_LEVEL=debug ?

err0r2k commented 2 weeks ago

Can you get a steam log with PROTON_LOG=1 MANGOHUD_LOG_LEVEL=debug ?

PROTON_LOG=1 MANGOHUD_LOG_LEVEL=debug mangohud steam
steam.sh[16224]: Running Steam on linuxmint 21.3 64-bit
steam.sh[16224]: STEAM_RUNTIME is enabled automatically
setup.sh[16745]: Steam runtime environment up-to-date!
steam.sh[16224]: Steam client's requirements are satisfied
/home/user/.local/share/Steam/ubuntu12_32/steam: error while loading shared libraries: libxkbcommon.so.0: wrong ELF class: ELFCLASS64

Starting Steam and running a Vulkan game with MANGOHUD=1 gamemoderun %command%

PROTON_LOG=1 MANGOHUD_LOG_LEVEL=debug steam
steam.sh[16929]: Running Steam on linuxmint 21.3 64-bit
steam.sh[16929]: STEAM_RUNTIME is enabled automatically
setup.sh[17108]: Steam runtime environment up-to-date!
steam.sh[16929]: Steam client's requirements are satisfied
[2024-06-21 22:33:37] Startup - updater built Jun 20 2024 17:13:49
[2024-06-21 22:33:37] Startup - Steam Client launched with: '/home/user/.local/share/Steam/ubuntu12_32/steam' '-srt-logger-opened'
06/21 22:33:37 minidumps folder is set to /tmp/dumps
06/21 22:33:37 Init: Installing breakpad exception handler for appid(steam)/version(1718904662)/tid(17174)
[2024-06-21 22:33:37] Loading cached metrics from disk (/home/user/.local/share/Steam/package/steam_client_metrics.bin)
[2024-06-21 22:33:37] Using the following download hosts for Public, Realm steamglobal
[2024-06-21 22:33:37] 1. https://client-update.akamai.steamstatic.com, /, Realm 'steamglobal', weight was 1000, source = 'update_hosts_cached.vdf'
[2024-06-21 22:33:37] 2. https://cdn.cloudflare.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'update_hosts_cached.vdf'
[2024-06-21 22:33:37] 3. https://cdn.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'baked in'
[2024-06-21 22:33:37] Installation wird überprüft …
[2024-06-21 22:33:37] Verification complete
UpdateUI: skip show logo
Steam logging initialized: directory: /home/user/.local/share/Steam/logs

XRRGetOutputInfo Workaround: initialized with override: 0 real: 0xe547a370
XRRGetCrtcInfo Workaround: initialized with override: 0 real: 0xe5478cc0
/usr/share/themes/Mint-Y-Dark-Aqua/gtk-2.0/main.rc:1053: error: unexpected identifier 'direction', expected character '}'
CAppInfoCacheReadFromDiskThread took 144 milliseconds to initialize
Steam Runtime Launch Service: starting steam-runtime-launcher-service
Steam Runtime Launch Service: steam-runtime-launcher-service is running pid 17283
bus_name=com.steampowered.PressureVessel.LaunchAlongsideSteam
BRefreshApplicationsInLibrary 1: 195ms
BuildCompleteAppOverviewChange: 593 apps
RegisterForAppOverview 1: 34ms
RegisterForAppOverview 2: 35ms
chdir "/home/user/.local/share/Steam/steamapps/common/Flight Of Nova Demo"
ERROR: ld.so: object '/home/user/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/user/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/user/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
Adding process 18467 for gameID 1911100
Adding process 18468 for gameID 1911100
ERROR: ld.so: object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/user/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/user/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/user/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
gamemodeauto: 
Adding process 18479 for gameID 1911100
GameOverlay: started '/home/user/.local/share/Steam/ubuntu12_32/gameoverlayui' (pid 18537) for game process 18479
06/21 22:34:31 minidumps folder is set to /tmp/dumps
06/21 22:34:31 Init: Installing breakpad exception handler for appid(gameoverlayui)/version(20240620171414)/tid(18537)
06/21 22:34:31 Init: Installing breakpad exception handler for appid(gameoverlayui)/version(1.0)/tid(18537)
Uploaded AppInterfaceStats to Steam
Removing process 18479 for gameID 1911100
Removing process 18468 for gameID 1911100
Removing process 18467 for gameID 1911100

(process:18537): GLib-GObject-CRITICAL **: 22:35:17.907: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
reaping pid: 18537 -- gameoverlayui
[2024-06-21 22:35:33] Shutdown
flightlessmango commented 2 weeks ago

Don't start steam with any env or commands like mangohud. Set launch options of the game as such PROTON_LOG=1 MANGOHUD_LOG_LEVEL=debug mangohud %command% Then you should find in your home folder steam-appid.log after trying to run the game

err0r2k commented 2 weeks ago

I started Steam with a command/env because I couldn't find any log.

I tried to start some Proton/Vulkan games with PROTON_LOG=1 MANGOHUD_LOG_LEVEL=debug mangohud %command%and PROTON_LOG=1 MANGOHUD_LOG_LEVEL=debug MANGOHUD=1 %command% but there is no log created.

Search in /home and / steam-.log .log

Steam is not a flatpak package. I installed Steam with the deb-package from the website.

flightlessmango commented 2 weeks ago

Ah yeah it's a native game, it shouldn't produce a log. My mistake. From the previous log you provided it doesn't seem like mangohud is being loaded at all, which usually means that the mangohud script can't be found

err0r2k commented 2 weeks ago

Uninstalled 0.7.2 and installed 0.6.5-2 with sudo apt install mangohud.

mangohud vkcube and MANGOHUD=1 vkcube

skipping config: /usr/bin/MangoHud.conf [ not found ]
skipping config: /home/user/.config/MangoHud/vkcube.conf [ not found ]
parsing config: /home/user/.config/MangoHud/MangoHud.conf [ ok ]
Selected GPU 0: NVIDIA GeForce RTX 2080, type: 2
MANGOHUD: recreating font image
cat: /etc/upstream-release: It's a directory
MANGOHUD: XNVCtrl is using display :0
MANGOHUD: Uploading is disabled (permit_upload = 0)

Unfortunately the same results. What options do I have or what can I do?

flightlessmango commented 2 weeks ago

Why are you testing vkcube again when it already worked according to the first post? Or did it stop working or I'm confused?

err0r2k commented 2 weeks ago

Why are you testing vkcube again when it already worked according to the first post? Or did it stop working or I'm confused?

After installing the older version I tested vkcube and got another output. I thought, this information may help. No, it does not stop working.

flightlessmango commented 2 weeks ago

But did anything change with the native game?

err0r2k commented 2 weeks ago

No, mangohud will still not show up when I starting a native/vulkan game with MANGOHUD=1 %command%. And with mangohud %command%, none of the games will start.

flightlessmango commented 2 weeks ago

what game are you reproducing this with?

err0r2k commented 2 weeks ago

Native/Vulkan Games in Steam (MANGOHUD=1 %command%): Beat Cop Flight Of Nova Demo Papers, Please Apotheon This War of Mine The Stanley Parable The Talos Principle -> working!

Native Games without Game Launcher: X-Plane 12 Demo -> works with mangohud ./X-Plane-x86_64

flightlessmango commented 2 weeks ago

Pretty sure all the games you say aren't working are opengl. MANGOHUD=1 only works with vulkan

flightlessmango commented 2 weeks ago

Also switch back to 0.7.2, no point in testing with 0.6.5

Leopard1907 commented 2 weeks ago

Indeed, only Talos Principle is Vulkan.

Rest is OpenGL.

Which they would need mangohud %command% or mangohud --dlsym %command%

Do note those also works for Vulkan too, so unless there is a good reason you don't even need to launch games with MANGOHUD=1.

err0r2k commented 2 weeks ago

Thank you! My mistake. I should check the game before open an issue. I'm back to 0.7.2.

Last question: Any idea why mangohud %command% isn't working in Steam?

Lassebq commented 2 weeks ago

You can export MANGOHUD_DLSYM=1 globally and then --dlsym can be omitted for opengl games.

Any idea why mangohud %command% isn't working in Steam?

Again, mangohud alone is equal to MANGOHUD=1 which would only work for vulkan. Unless you do the above.

flightlessmango commented 2 weeks ago

if mangohud is preventing any game from starting, it's because mangohud isn't in the path, it can't be found so it just crashes. My guess is there's something wrong with your setup

Lassebq commented 2 weeks ago

And with mangohud %command%, none of the games will start

That does sound like mangohud isn't in your PATH.

err0r2k commented 2 weeks ago

Well guys, this is new to me, but I did some research with the PATH. I temporarily put mangohud to PATH. It is still not working.

which mangohud
/usr/bin/mangohud
export PATH="/usr/bin/mangohud:$PATH"
echo $PATH
/usr/bin/mangohud:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

You can export MANGOHUD_DLSYM=1 globally and then --dlsym can be omitted for opengl games.

Can you please explain how to do this?

flightlessmango commented 2 weeks ago

Sorry you shouldn't need to edit path yourself, /usr/bin is always in path unless you have changed it. That it's not in path is the symptom, the cause is usually that steam is running inside a containerized environment like flatpak or snap etc

err0r2k commented 2 weeks ago

Sorry you shouldn't need to edit path yourself, /usr/bin is always in path unless you have changed it. That it's not in path is the symptom, the cause is usually that steam is running inside a containerized environment like flatpak or snap etc

Thanks for the warning. That´s curios. I installed Steam with the *.deb file from the Steam website. This should be a system installation. Anyway, the issue is answered. Thanks again for your help!