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.53k stars 288 forks source link

[Regression] 0.7.0-rc1 prevents any Vulkan game to start #1119

Closed leinardi closed 7 months ago

leinardi commented 1 year ago

Describe the bug After upgrading from 0.6.9-1 to 0.7.0-rc1 many Steam games do not start anymore. The steam UI show the game as running but no window is shown and there are several errors related to MangoHud in console:

Steam Runtime Launch Service: steam-runtime-launcher-service is running pid 19476
bus_name=com.steampowered.PressureVessel.LaunchAlongsideSteam
ERROR: ld.so: object '/usr/local/$LIB/mangohud/libMangoHud_opengl.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
[2023-09-12 16:14:31.081] [MANGOHUD] [info] [blacklist.cpp:68] process 'vulkandriverquery' is blacklisted in MangoHud
BRefreshApplicationsInLibrary 1: 49ms
BuildCompleteAppOverviewChange: 1499 apps
RegisterForAppOverview 1: 53ms
RegisterForAppOverview 2: 54ms
ERROR: ld.so: object '/usr/local/$LIB/mangohud/libMangoHud_opengl.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/tmp/pressure-vessel-libs-YOBMB2/${PLATFORM}/libMangoHud_opengl.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
/bin/sh\0-c\0/media/Steam/ubuntu12_32/reaper SteamLaunch AppId=1716740 -- /media/Steam/ubuntu12_32/steam-launch-wrapper -- '/media/Steam/steamapps/common/SteamLinuxRuntime_sniper'/_v2-entry-point --verb=waitforexitandrun -- '/media/Steam/steamapps/common/Proton - Experimental'/proton waitforexitandrun  '/media/Steam/steamapps/common/Starfield/Starfield.exe'\0
chdir "/media/Steam/steamapps/common/Starfield"
ERROR: ld.so: object '/media/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/usr/local/$LIB/mangohud/libMangoHud_opengl.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/media/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/media/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/media/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/media/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.

List relevant hardware/software information

To Reproduce Steps to reproduce the behavior:

  1. Build and install MangoHud 0.7.0-rc1
  2. Start Starfield on Steam
  3. Steam shows the game as running but nothing is shown

Expected behavior The game starts and MangoHud is visible

Additional context Downgrading to 0.6.9-1 fixes the issue. MangoHud.conf

EDIT These are the steam console logs of the working 0.6.9-1:

steam.sh[7136]: Running Steam on ubuntu 23.04 64-bit
steam.sh[7136]: STEAM_RUNTIME is enabled automatically
setup.sh[7207]: Steam runtime environment up-to-date!
steam.sh[7136]: Steam client's requirements are satisfied
ERROR: ld.so: object '/usr/local/$LIB/mangohud/libMangoHud.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
[2023-09-12 16:28:06] Startup - updater built Sep 11 2023 20:48:54
[2023-09-12 16:28:06] Startup - Steam Client launched with: '/media/Steam/ubuntu12_32/steam' '-nominidumps' '-nobreakpad' '--console'
[2023-09-12 16:28:06] Opted in to client beta 'publicbeta' via beta file
You are in the 'publicbeta' client beta.
09/12 16:28:06 Init: Installing breakpad exception handler for appid(steam)/version(1694466342)/tid(7317)
[2023-09-12 16:28:06] Loading cached metrics from disk (/media/Steam/package/steam_client_metrics.bin)
[2023-09-12 16:28:06] Using the following download hosts for Public, Realm steamglobal
[2023-09-12 16:28:06] 1. https://client-update.akamai.steamstatic.com, /, Realm 'steamglobal', weight was 1000, source = 'update_hosts_cached.vdf'
[2023-09-12 16:28:06] 2. https://cdn.cloudflare.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'update_hosts_cached.vdf'
[2023-09-12 16:28:06] 3. https://cdn.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'baked in'
[2023-09-12 16:28:06] Verifying installation...
[2023-09-12 16:28:07] Verification complete

Steam logging initialized: directory: /media/Steam/logs

XRRGetOutputInfo Workaround: initialized with override: 0 real: 0xe84b99c0
XRRGetCrtcInfo Workaround: initialized with override: 0 real: 0xe84b81f0
/usr/share/themes/Yaru/gtk-2.0/main.rc:775: error: unexpected identifier 'direction', expected character '}'
/usr/share/themes/Yaru/gtk-2.0/hacks.rc:28: error: invalid string constant "normal_entry", expected valid string constant
steamwebhelper.sh[7346]: Runtime for steamwebhelper: defaulting to /media/Steam/ubuntu12_64/steam-runtime-heavy
steamwebhelper.sh[7346]: glibc >= 2.34, partially disabling sandbox until CEF supports clone3()
CAppInfoCacheReadFromDiskThread took 281 milliseconds to initialize
Steam Runtime Launch Service: starting steam-runtime-launcher-service
Steam Runtime Launch Service: steam-runtime-launcher-service is running pid 7500
bus_name=com.steampowered.PressureVessel.LaunchAlongsideSteam
ERROR: ld.so: object '/usr/local/$LIB/mangohud/libMangoHud.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
[2023-09-12 16:28:09.458] [MANGOHUD] [info] [blacklist.cpp:59] process 'vulkandriverquery' is blacklisted in MangoHud
[2023-09-12 16:28:09.459] [MANGOHUD] [info] [blacklist.cpp:59] process 'vulkandriverquery' is blacklisted in MangoHud
[2023-09-12 16:28:09.483] [MANGOHUD] [info] [config.cpp:123] parsing config: '/home/leinardi/.config/MangoHud/MangoHud.conf'
[2023-09-12 16:28:09.483] [MANGOHUD] [error] [overlay_params.cpp:741] Unknown option 'text_outline'
[2023-09-12 16:28:09.483] [MANGOHUD] [error] [overlay_params.cpp:741] Unknown option 'engine_short_names'
[2023-09-12 16:28:09.483] [MANGOHUD] [error] [overlay_params.cpp:741] Unknown option 'gpu_junction_temp'
[2023-09-12 16:28:09.483] [MANGOHUD] [error] [overlay_params.cpp:741] Unknown option 'gpu_mem_temp'
[2023-09-12 16:28:09.483] [MANGOHUD] [error] [overlay_params.cpp:741] Unknown option 'gpu_fan'
[2023-09-12 16:28:09.483] [MANGOHUD] [error] [overlay_params.cpp:741] Unknown option 'gpu_voltage (only works on AMD GPUs)'
ERROR: ld.so: object '/usr/local/$LIB/mangohud/libMangoHud.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
BRefreshApplicationsInLibrary 1: 1ms
BuildCompleteAppOverviewChange: 1499 apps
RegisterForAppOverview 1: 64ms
RegisterForAppOverview 2: 65ms
ERROR: ld.so: object '/usr/local/$LIB/mangohud/libMangoHud.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
fsync: up and running.
[...]
/bin/sh\0-c\0/media/Steam/ubuntu12_32/reaper SteamLaunch AppId=1716740 -- /media/Steam/ubuntu12_32/steam-launch-wrapper -- '/media/Steam/steamapps/common/SteamLinuxRuntime_sniper'/_v2-entry-point --verb=waitforexitandrun -- '/media/Steam/steamapps/common/Proton - Experimental'/proton waitforexitandrun  '/media/Steam/steamapps/common/Starfield/Starfield.exe'\0
chdir "/media/Steam/steamapps/common/Starfield"
ERROR: ld.so: object '/media/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/usr/local/$LIB/mangohud/libMangoHud.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/media/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/media/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/media/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/media/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
fsync: up and running.
wine: RLIMIT_NICE is <= 20, unable to use setpriority safely
[2023-09-12 16:28:59.235] [MANGOHUD] [info] [config.cpp:118] skipping config: '/home/leinardi/.config/MangoHud/wine-explorer.conf' [ not found ]
[2023-09-12 16:28:59.235] [MANGOHUD] [info] [config.cpp:118] skipping config: '/media/Steam/steamapps/common/Proton - Experimental/files/bin/MangoHud.conf' [ not found ]
[2023-09-12 16:28:59.235] [MANGOHUD] [info] [config.cpp:118] skipping config: '/home/leinardi/.config/MangoHud/wine64-preloader.conf' [ not found ]
[2023-09-12 16:28:59.235] [MANGOHUD] [info] [config.cpp:123] parsing config: '/home/leinardi/.config/MangoHud/MangoHud.conf'
[2023-09-12 16:28:59.235] [MANGOHUD] [error] [overlay_params.cpp:741] Unknown option 'text_outline'
[2023-09-12 16:28:59.235] [MANGOHUD] [error] [overlay_params.cpp:741] Unknown option 'engine_short_names'
[2023-09-12 16:28:59.235] [MANGOHUD] [error] [overlay_params.cpp:741] Unknown option 'gpu_junction_temp'
[2023-09-12 16:28:59.235] [MANGOHUD] [error] [overlay_params.cpp:741] Unknown option 'gpu_mem_temp'
[2023-09-12 16:28:59.235] [MANGOHUD] [error] [overlay_params.cpp:741] Unknown option 'gpu_fan'
[2023-09-12 16:28:59.235] [MANGOHUD] [error] [overlay_params.cpp:741] Unknown option 'gpu_voltage (only works on AMD GPUs)'

EDIT 2
As workaround, install MangoHud via the build.sh script:

./build.sh build install
flightlessmango commented 1 year ago

I'm wondering why it's looking in /usr/local, how did you install? Does the mangohud folder and library exist in /usr/local/lib?

leinardi commented 1 year ago

I installed it as it's stated in the README:

meson build
ninja -C build install

I've installed the same way 0.6.9-1 and 0.7.0-rc1.

This is the output of whereis mangohud:

$ whereis mangohud 
mangohud: /usr/local/lib/x86_64-linux-gnu/mangohud /usr/local/bin/mangohud

If it is useful, I could try to use git bisect to find the exact commit that caused the regression. I'm also available to do some remote debugging if needed.

flightlessmango commented 1 year ago

Yeah I think a bisect would be very useful Can you also show output of tree /usr/local/lib/x86_64-linux-gnu/mangohud

leinardi commented 1 year ago

Can you also show output of tree /usr/local/lib/x86_64-linux-gnu/mangohud

Sure, here you go:

$ tree /usr/local/lib/x86_64-linux-gnu/mangohud
/usr/local/lib/x86_64-linux-gnu/mangohud
├── libMangoHud_dlsym.so
└── libMangoHud.so

1 directory, 2 files

I'll post the result of the git bisect asap.

flightlessmango commented 1 year ago

That's probably from 0.6.9, can you show tree with rc1?

leinardi commented 1 year ago

Bisect done (first bad commit 5754ca13ee2cdf19a76b4fc79dd914a58d6371f5):

$ git bisect good
5754ca13ee2cdf19a76b4fc79dd914a58d6371f5 is the first bad commit
commit 5754ca13ee2cdf19a76b4fc79dd914a58d6371f5
Author: FlightlessMango <flightlessmangoyt@gmail.com>
Date:   Sat May 20 08:27:13 2023 +0200

    vulkan manifest: set cpu_family in layer name

 src/mangohud.json.in | 2 +-
 src/meson.build      | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

That's probably from 0.6.9, can you show tree with rc1?

$ tree /usr/local/lib/x86_64-linux-gnu/mangohud
/usr/local/lib/x86_64-linux-gnu/mangohud
├── libMangoHud_dlsym.so
├── libMangoHud_opengl.so
└── libMangoHud.so

1 directory, 3 files
flightlessmango commented 1 year ago

Okay that's interesting What version is vulkan-loader?

leinardi commented 1 year ago

It's the version 1.3.239.0-1: https://packages.ubuntu.com/lunar/libvulkan1

leinardi commented 1 year ago

Btw, I found a way to reproduce the issue without involving Steam:

$ mangohud vkcube
[2023-09-13 17:49:21.592] [MANGOHUD] [error] [overlay_params.cpp:815] Unknown option 'gpu_voltage (only works on AMD GPUs)'
flightlessmango commented 1 year ago

Unable to repro with a fresh 23.04 in a docker container, work like normal

leinardi commented 1 year ago

I have a 7900 XTX and unfortunately stock ubuntu doesn't support it, so you have to use LLVM 15+, Mesa 22.3+ and updated linux-firmware.

Is there any other test that I can do? Like I said, I'm also available to do a remote debug session via TeamViewer or some other desktop sharing tool.

jansol commented 1 year ago

FWIW vkcube and mpv --vo=gpu-next --gpu-context=waylandvk work fine with mangohud 0.7.0-rc1 for me on NixOS using that same GPU. My vulkan-loader is at version 1.3.261.

Regarding ubuntu: I have had a ton of compatibility problems with the vulkan-sdk ppa. Most of the relevant things are in mainline ubuntu repos for a long time already so I'd generally recommend just installing the components you need manually from there. And kisak or oibaf ppa for mesa.

leinardi commented 1 year ago

Regarding ubuntu: I have had a ton of compatibility problems with the vulkan-sdk ppa. Most of the relevant things are in mainline ubuntu repos for a long time already so I'd generally recommend just installing the components you need manually from there. And kisak or oibaf ppa for mesa.

Yep, that's exactly what I'm doing (I'm using kisak ppa and installed the linux-firmware manually.

In less than a month Ubuntu 23.10 will be released, hopefully that will fix the issue but, in case it doesn't, I hope this regression will be investigated more.

flightlessmango commented 1 year ago

@leinardi can you repro with glxgears? Can you paste the output of VK_LOADER_DEBUG=all mangohud vkcube as well?

leinardi commented 1 year ago

can you repro with glxgears?

glxgears works fine: Schermata del 2023-09-15 19-53-20

Can you paste the output of VK_LOADER_DEBUG=all mangohud vkcube as well?

sure, here you go: debug.txt

flightlessmango commented 1 year ago

/usr/share/vulkan/implicit_layer.d/MangoHud.json Should not be exist, probably not causing issues but it's not helping

leinardi commented 1 year ago

Not sure, probably a leftover of a previous version? I'm using this software since long time.

Anyway, I moved it away but it still doesn't work: debug.txt

Please let me know if I can help with some other test.

flightlessmango commented 1 year ago

@leinardi can you DM me on discord?

leinardi commented 1 year ago

@flightlessmango I tried but we are not friends yet, I sent a request: image

flightlessmango commented 1 year ago

@leinardi I've added you

Deus-nsf commented 1 year ago

Had the same issue, lost 2 hours trying to figure out what was the problem, removing the mango hud call fixed it (Deus Ex would not start)

flightlessmango commented 1 year ago

@Deus-nsf was this with mangohud rc1? What are your specs and OS?

Deus-nsf commented 1 year ago

I must admit, I didn't double check the version exactly, but I keep all my packages up to date, and it was working fine before, and removing the mango hud call immediatly fixed the issue.

I have a Ryzen 5800X 3D, a GTX 1080 Ti with Proprietary Drivers, 32 GB of RAM, all that running on a Debian 12 distro. Before that MangoHUD worked beautifully, no issues whatsoever :) Hope that helps!

leinardi commented 1 year ago

@Deus-nsf Debian 12 (bookworm) is using an older version of MangoHud: https://packages.debian.org/bookworm/mipsel/mangohud

WORKAROUND
After a remote debug session with @flightlessmango we found out that the issue happens only if you manually run meson build && ninja -C build install: if you install it via ./build.sh build install it works fine :+1:

As requested, I'll leave the issue open for now.

clemens98 commented 7 months ago

Well at least I know how the find out if Mango hud is working or not

If the game is starting mangohud is not working If the game is not opening then mangohud works

flightlessmango commented 7 months ago

I believe this issue has been resolved since a while back.

clemens98 commented 7 months ago

https://github.com/flightlessmango/MangoHud/issues/1119#issuecomment-2037822440 That's something that should be done in the Church