Mangohud doesn't work with vkcube-wayland ?
Describe the bug A clear and concise description of what the bug is.
List relevant hardware/software information
- Void-Linux
- MangoHud 0.7.2
- RX 7900XTX
To Reproduce Steps to reproduce the behavior:
- execute
mangohud vkcube-wayland
Cannot connect to wayland.
Exiting ...
Expected behavior [should work, it works on my laptop with same specs]
Screenshots N.A
Additional context works with vkcube classic (xwayland).
for some reasons when i rollback to 0.7.0 release it works...
Those are also relevant for testing purposes:
https://github.com/void-linux/void-packages/issues/50846#issuecomment-2171801496 https://github.com/void-linux/void-packages/issues/50846#issuecomment-2171872642
The above were on an RX580 GPU with mesa-vulkan-radeon-24.1.1_2 userspace driver package on a linux6.6 kernel version.
can't repro this. works fine on my system with sway
Works for me in Plasma 5.27.11. Could be your compositor specific issue.
Hey there, i finally found the issue: amdvlk was taking a higher priority over mesa RADV.
So i had 2 solutions:
Force RADV By default and force AMDVLK on a per-app basis (preferred method)
- edit
/etc/environment - add
VK_ICD_FILENAMES='/usr/share/vulkan/icd.d/radeon_icd.x86_64.json' - reboot
- If you need an app with AMDVLK, in my case, CP77 works better in path tracing with AMDVLK, then use
env VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/amd_icd64.jsonon each game.
Uninstall AMDVLK and only keep mesa radv.
- [See with your distro Package manager]
The issue got back, despite amdvlk being absent.
Although this time, it happens only when i launch mangohud as an executable (e.g : mangohud vkcube-wayland doesn't work), however when i run it as an env var, it works (e.g: env MANGOHUD=1 vkcube-wayland works).
Something is wrong somewhere...
Also i do note it does works both ways on xwayland apps (e.g: regular vkcube).
And it doesn't work as well on other wayland native apps (e.g: Minecraft with Vulkanmod, which adds native wayland support to the game).
I hope this will help!
EDIT: is there a way for me to enable more verbose inputs or enable logs to facilitate bug tracking?
If you want to check what's going on, run it with VK_LOADER_DEBUG=all.
If you want to check what's going on, run it with
VK_LOADER_DEBUG=all.
Hey, i had the occasion to try and i get this:
$ env VK_LOADER_DEBUG=all mangohud vkcube-wayland
INFO: Vulkan Loader Version 1.3.268
Cannot connect to wayland.
Exiting ...
Not sure, the only difference is that script is doing some LD_PRELOAD stuff which normal Vulkan loader isn't. You don't need it except for OpenGL, so look into that script, it has some DISABLE_LD_PRELOAD and etc.
Not sure, the only difference is that script is doing some LD_PRELOAD stuff which normal Vulkan loader isn't. You don't need it except for OpenGL, so look into that script, it has some
DISABLE_LD_PRELOADand etc.
yep can confirm, changing disable_preload=false to disable_preload=true makes it work.
EDIT: in my case, i just added java below cs2.sh. It now works. Hope that helps, adding vkcube-wayland works as well !
Hope that helps, adding vkcube-wayland works as well !
I'm wondering if preload is necessary at all...
maybe we can add a flag? similar to the --version?
diff --git a/bin/mangohud.in b/bin/mangohud.in
index 96468bd..d805d5a 100755
--- a/bin/mangohud.in
+++ b/bin/mangohud.in
@@ -32,6 +32,11 @@ command_line="$*"
# flag for disable_preload
disable_preload=false
+if [ "$1" = "--disable-preload" ]; then
+ disable_preload=true
+ shift
+fi
+
# Check if the script name or any of the executables in DISABLE_LD_PRELOAD are in the command line
for exe in $DISABLE_LD_PRELOAD; do
if echo "$command_line" | grep -q "$exe"; then
is this fixed in mangohud-git? I can't test it's been working fine on my machine since forever
I'm sorry, i'm unable to test the git build, especially since this issue happens on production install... 😕
It's a bug in the script, not in the library. Simply check if the script stopped doing the pointless LD preloading in Vulkan case. Or don't use the script in the first place, it's unnecessary in Vulkan case anyway and is only useful for OpenGL.
It's a bug in the script, not in the library. Simply check if the script stopped doing the pointless LD preloading in Vulkan case. Or don't use the script in the first place, it's unnecessary in Vulkan case anyway and is only useful for OpenGL.
when using the env var it doesn't seem to use the script, in that case: yes it does work. EDIT: it does work, even with the 0.7.2 release build. Also as mentioned here, i modified the script, adding the processes to the "disabled ld preloading list" also fixes the issue.
So in that case, the default for this LD preloading system should be disabled, and only enabled for OGL if it's only important for OGL...
I'm sorry, i'm unable to test the git build, especially since this issue happens on production install... 😕
that's ok, what I meant to say was that it works on 0.7.2 for me. -git overloads different functions so it might alleviate the problem
Assuming this has been resolved