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 not loading with MANGOHUD=1 environment variable #372906

Closed
rafalb8 opened this issue Jan 11, 2025 · 2 comments
Closed

MangoHud not loading with MANGOHUD=1 environment variable #372906

rafalb8 opened this issue Jan 11, 2025 · 2 comments
Labels
0.kind: bug Something is broken

Comments

@rafalb8
Copy link

rafalb8 commented Jan 11, 2025

Describe the bug

Starting programs with MANGOHUD=1 env variable doesn't load Mangohud.

Steps To Reproduce

Run this command:

MANGOHUD=1 vkgears

Expected behavior

MangoHud loaded and displayed on screen.

Additional context

Can be fixed temporarily by using LD_PRELOAD env variable.

LD_PRELOAD="/nix/store/gxcgm91cipxp5a3sxn0inqq3ylfb0dsc-mangohud-0.7.2/lib/mangohud/libMangoHud.so" MANGOHUD=1 vkgears

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 6.12.8, NixOS, 24.11 (Vicuna), 24.11.20250106.3f0a8ac`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.24.11`
 - channels(root): `""`
 - nixpkgs: `/nix/store/fz4h8yz3qr83p6cfhisgj02knjqg6nxs-source`

Notify maintainers

@kira-bruneau @zeratax


Note for maintainers: Please tag this issue in your PR.


Add a 👍 reaction to issues you find important.

@rafalb8 rafalb8 added the 0.kind: bug Something is broken label Jan 11, 2025
@kira-bruneau
Copy link
Contributor

kira-bruneau commented Jan 16, 2025

Thanks for the report @rafalb8! I tried on my system and it looks like there's a glibc ABI conflict with spdlog.

I'm running the stable version of NixOS 24.11 and it's not uncommon to run into glibc incompatibilities mixing graphical packages from different nixpkgs versions (See #95808). Based on the metadata you posted, it seems like you are too?

If you try this, do you get a similar output?

> LD_DEBUG=libs MANGOHUD=1 vkgears 2>&1 | grep error
    937673:	/nix/store/jzgr19jv2rvsl18269xqixchhh9fp04s-libdecor-0.2.2/lib/libdecor-0.so.0: error: symbol lookup error: undefined symbol: png_free (fatal)
    937673:	vkgears: error: symbol lookup error: undefined symbol: gtk_progress_get_type (fatal)
    937673:	/nix/store/4gk773fqcsv4fh2rfkhs9bgfih86fdq8-gcc-13.3.0-lib/lib/libstdc++.so.6: error: version lookup error: version `CXXABI_1.3.15' not found (required by /nix/store/izliy5ycacnyh940mvsjd48m448wp6cb-spdlog-1.14.1/lib/libspdlog.so.1.14) (fatal)
    937673:	/nix/store/j5y84h45sgs8ri200agp2ffxnkydha9w-mesa-24.2.8-drivers/lib/libVkLayer_MESA_device_select.so: error: symbol lookup error: undefined symbol: vkGetDeviceProcAddr (fatal)

I don't run into this problem if I use mangohud from the stable channel.

@rafalb8
Copy link
Author

rafalb8 commented Jan 17, 2025

@kira-bruneau Yes, I'm using mangohud from unstable channel and rest of the system is on stable.

LD_DEBUG=libs MANGOHUD=1 vkgears 2>&1 | grep error
      7231:	/nix/store/crg433v9r6cb68a9d08i7whm3hh3vf62-nvidia-x11-565.77-6.12.8/lib/libnvidia-glcore.so.565.77: error: symbol lookup error: undefined symbol: __malloc_hook (fatal)
      7231:	/nix/store/crg433v9r6cb68a9d08i7whm3hh3vf62-nvidia-x11-565.77-6.12.8/lib/libnvidia-glcore.so.565.77: error: symbol lookup error: undefined symbol: __realloc_hook (fatal)
      7231:	/nix/store/crg433v9r6cb68a9d08i7whm3hh3vf62-nvidia-x11-565.77-6.12.8/lib/libnvidia-glcore.so.565.77: error: symbol lookup error: undefined symbol: __free_hook (fatal)
      7231:	/nix/store/crg433v9r6cb68a9d08i7whm3hh3vf62-nvidia-x11-565.77-6.12.8/lib/libnvidia-glcore.so.565.77: error: symbol lookup error: undefined symbol: __memalign_hook (fatal)
      7231:	/nix/store/crg433v9r6cb68a9d08i7whm3hh3vf62-nvidia-x11-565.77-6.12.8/lib/libnvidia-glcore.so.565.77: error: symbol lookup error: undefined symbol: ErrorF (fatal)
      7231:	/nix/store/ybjcla5bhj8g1y84998pn4a2drfxybkv-gcc-13.3.0-lib/lib/libstdc++.so.6: error: version lookup error: version `CXXABI_1.3.15' not found (required by /nix/store/izliy5ycacnyh940mvsjd48m448wp6cb-spdlog-1.14.1/lib/libspdlog.so.1.14) (fatal)
      7231:	/nix/store/crg433v9r6cb68a9d08i7whm3hh3vf62-nvidia-x11-565.77-6.12.8/lib/libnvidia-glcore.so.565.77: error: symbol lookup error: undefined symbol: dbus_get (fatal)
      7231:	/nix/store/141m63y55hh07jcry2lk5w2x5x5bg0b0-mesa-24.2.6-drivers/lib/libVkLayer_MESA_device_select.so: error: symbol lookup error: undefined symbol: vkGetDeviceProcAddr (fatal)

I also tried it on stable and it works properly.
Thanks.

@rafalb8 rafalb8 closed this as completed Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

2 participants