Change:
Mangohud no longer appears on gnome/wayland when opening a game. "rev": "", (works) "rev": "", (doesn't) Steps to reproduce the behavior: a game on gnome/wayland doesn't appear even when enabled (worked in previous revision of nixpkgs above) ... Mangohud shows system stats Please run and paste the result.
I have the same problem too. I'm using Hyprland btw.
Oh weird. I'll try looking into this. The only thing that really sticks out to me in the diff is possibly ? - but it seems unlikely. I'll do a git bisect to try to narrow it down better.
If it helps you narrow down, here's my repo with the exact commit where mangohud stopped working. If I revert back to previous commit mangohud starts working again:
I bisected it, it's cc
mangohud uses its own internal copy of vulkan-headers: So it's probably the loader? If it is though, it might be tricky to bisect...
So, what are we going to do? Especially w.r.t. 23.05 being around the door. I don't think we should ship a broken mangohud in 23.05. Honestly, I think should have probably not made it to master before branch-off. (Eventhough it was technically merged a few dasy before breaking changes were restricted.)
I'll try to reproduce locally and see if I can bisect vulkan-loader.
cc because of
We could also try updating the headers externally; Mangohud's are really quite old. They use this weird meson wrap thingy rather than letting the distro provide it and it too is very out of date. Also, this is the error we're getting: (This is on 64-bit-only Mangohud.)
It breaks when built with newer headers.
Oh sorry, forgot to get back to this! Maybe we need to switch back to using the system headers?
I'm actually pretty sure it's which we probably don't want to revert, but we may need to look into layer ordering?
oh no - yeah i think you're right, i think the duplicate behaviour was specifically to support multi-arch layers (from what I remember).
If it's just an issue of duplicate layers, perhaps we could add 32 and 64 suffixes to the layer names. obs-vkcapture does that too.
I gave up o pursuing this, as seen in It works, but for this case here, it's probably better to bring attention upstream. Cc
Having only the 64-bit mangohud json in the implicit layer dir works! Going to try giving the 32-bit layer a different name now.
This is also going to affect vkbasalt too then - I haven't tried yet though - I'll take a look at fixing that too!
Speaking of, any reason you gave up on that? I personally really liked the good idea.
Different suffixes work! PR incoming.
It needed a proper rebase+bump to v1.3.250, and I couldn't figure out how to really take a good benefit from it.
Hm, I'll definitely try to pick it up after branch-off then.
Peculiarly, obs-vkcapture seem to do this for some time already: from gamescope might need this fix too.

Discussion:
, glfw , xorg , gamescopeSupport ? true # build mangoapp and mangohudctl <ins> , lowerBitnessSupport ? stdenv.hostPlatform.is64bit # Support 32 bit on 64bit </ins> , nix-update-script }:

substituteInPlace bin/mangohud.in  --subst-var-by libraryPath ${lib.makeSearchPath "lib/mangohud" ([ (placeholder "out") <del> ] ++ lib.optionals (stdenv.hostPlatform.system == "x86_64-linux") [ </del> <ins> ] ++ lib.optionals lowerBitnessSupport [ </ins> mangohud32 ])}  --subst-var-by dataDir ${placeholder "out"}/share

# Support 32bit Vulkan applications by linking in 32bit Vulkan layers # This is needed for the same reason the 32bit preload workaround is needed. <del> postInstall = lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") '' </del> <ins> postInstall = lib.optionalString lowerBitnessSupport '' </ins> ln -s ${mangohud32}/share/vulkan/implicit_layer.d/MangoHud.x86.json  "$out/share/vulkan/implicit_layer.d"

''} ''; <del> postFixup = '' </del> <ins> postFixup = let archMap = { "x86_64-linux" = "x86_64"; "i686-linux" = "x86"; }; layerPlatform = archMap."${stdenv.hostPlatform.system}" or null; # We need to give the different layers separate names or else the loader # might try the 32-bit one first, fail and not attempt to load the 64-bit # layer under the same name. in lib.optionalString (layerPlatform != null) '' substituteInPlace $out/share/vulkan/implicit_layer.d/MangoHud.${layerPlatform}.json  --replace "VK_LAYER_MANGOHUD_overlay" "VK_LAYER_MANGOHUD_overlay_${toString stdenv.hostPlatform.parsed.cpu.bits}" '' + '' </ins> # Add OpenGL driver path to RUNPATH to support NVIDIA cards addOpenGLRunpath "$out/lib/mangohud/libMangoHud.so" <del> ${lib.optionalString gamescopeSupport '' addOpenGLRunpath "$out/bin/mangoapp" ''} ${lib.optionalString finalAttrs.doCheck '' # libcmocka.so is only used for tests rm "$out/lib/libcmocka.so" ''} </del> <ins> '' + lib.optionalString gamescopeSupport '' addOpenGLRunpath "$out/bin/mangoapp" '' + lib.optionalString finalAttrs.doCheck '' # libcmocka.so is only used for tests rm "$out/lib/libcmocka.so" </ins> ''; passthru.updateScript = nix-update-script { };