[Possible bug, help with debugging required] MangoHud not showing any GPU information when amdgpu is compiled into the Kernel.
When compiling amdgpu into the Kernel (the Kernel being 6.10.2-cachyos-6.10.2-r1-gentoo-dist running on Gentoo), MangoHud does not show any GPU information (the GPU field is missing and VRAM is reported as 0 GiB). When compiling amdgpu as a module MangoHud works as expected.
Other tools like amdgpu_top and nvtop have no trouble getting information about the GPU.
Screenshot of MangoHud and console output:
--- Specs --- OS: Gentoo ~amd64 Kernel: 6.10.2-cachyos-6.10.2-r1-gentoo-dist (Custom) Mesa: 24.1.4 DE: KDE 6.1.3 Wayland GPU: RX 6700XT CPU: R7 5800X3D
Here is my Kernel config if needed: https://gist.github.com/CNR0706/325c4bab823e99699e66d0f51e176178
Provide mangohud log please
MANGOHUD_LOG_LEVEL=debug mangohud glxgears
That's neat. I wish I had known about that earlier.
Here's the log:
~
❯ MANGOHUD_LOG_LEVEL=debug mangohud glxgears
[2024-07-29 11:47:20.322] [MANGOHUD] [debug] [config.cpp:117] skipping config: '/usr/bin/MangoHud.conf' [ not found ]
[2024-07-29 11:47:20.322] [MANGOHUD] [debug] [config.cpp:117] skipping config: '/home/cnr07/.config/MangoHud/x86_64-pc-linux-gnu-glxgears.conf' [ not found ]
[2024-07-29 11:47:20.322] [MANGOHUD] [debug] [config.cpp:117] skipping config: '/etc/MangoHud.conf' [ not found ]
[2024-07-29 11:47:20.322] [MANGOHUD] [debug] [config.cpp:122] parsing config: '/home/cnr07/.config/MangoHud/MangoHud.conf'
[2024-07-29 11:47:20.322] [MANGOHUD] [debug] [config.cpp:117] skipping config: '/usr/bin/MangoHud.conf' [ not found ]
[2024-07-29 11:47:20.322] [MANGOHUD] [debug] [config.cpp:117] skipping config: '/home/cnr07/.config/MangoHud/x86_64-pc-linux-gnu-glxgears.conf' [ not found ]
[2024-07-29 11:47:20.322] [MANGOHUD] [debug] [config.cpp:117] skipping config: '/etc/MangoHud.conf' [ not found ]
[2024-07-29 11:47:20.322] [MANGOHUD] [debug] [config.cpp:122] parsing config: '/home/cnr07/.config/MangoHud/MangoHud.conf'
[2024-07-29 11:47:20.322] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'fps_limit' = '560,68,140,280,0,163,330,660'
[2024-07-29 11:47:20.322] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'fps_limit_method' = 'late'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'gpu_temp' = '1'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'gpu_power' = '1'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'gpu_text' = '6700XT'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'cpu_stats' = '1'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'cpu_temp' = '1'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'cpu_power' = '1'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'cpu_text' = '5800X3D'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'vram' = '1'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'ram' = '1'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'swap' = '1'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'engine_version' = '1'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'vulkan_driver' = '1'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'exec_name' = '1'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'arch' = '1'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'show_fps_limit' = '1'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'font_scale' = '0.66'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'text_outline' = 'false'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'position' = 'top-left'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'round_corners' = '7.5'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'width' = '280'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'table_columns' = '4'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'cellpadding_y' = '-0.100'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'toggle_hud' = 'Shift_L+F3'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'toggle_hud_position' = 'Shift_L+F4'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'toggle_fps_limit' = 'Shift_L+F1'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'toggle_logging' = 'Shift_L+F2'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'reload_cfg' = 'Shift_L+F5'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [overlay_params.cpp:976] Param: 'winesync' = '1'
[2024-07-29 11:47:20.323] [MANGOHUD] [debug] [logging.cpp:237] Logger constructed!
[2024-07-29 11:47:20.329] [MANGOHUD] [debug] [overlay.cpp:1067] Ram:32758572
[2024-07-29 11:47:20.329] [MANGOHUD] [debug] [overlay.cpp:1068] Cpu:AMD Ryzen 7 5800X3D 8-Core Processor
[2024-07-29 11:47:20.329] [MANGOHUD] [debug] [overlay.cpp:1069] Kernel:6.10.2-cachyos-6.10.2-r1-gentoo-dist
[2024-07-29 11:47:20.329] [MANGOHUD] [debug] [overlay.cpp:1070] Os:Gentoo Linux
[2024-07-29 11:47:20.329] [MANGOHUD] [debug] [overlay.cpp:1071] Driver:
[2024-07-29 11:47:20.329] [MANGOHUD] [debug] [overlay.cpp:1072] CPU Scheduler:performance
[2024-07-29 11:47:20.329] [MANGOHUD] [debug] [cpu.cpp:507] hwmon: sensor name: zenergy
[2024-07-29 11:47:20.329] [MANGOHUD] [debug] [cpu.cpp:507] hwmon: sensor name: amdgpu
[2024-07-29 11:47:20.329] [MANGOHUD] [debug] [cpu.cpp:507] hwmon: sensor name: nvme
[2024-07-29 11:47:20.329] [MANGOHUD] [debug] [cpu.cpp:507] hwmon: sensor name: hidpp_battery_0
[2024-07-29 11:47:20.329] [MANGOHUD] [debug] [cpu.cpp:507] hwmon: sensor name: k10temp
[2024-07-29 11:47:20.329] [MANGOHUD] [debug] [cpu.cpp:539] hwmon: using input: /sys/class/hwmon/hwmon3/temp1_input
[2024-07-29 11:47:20.329] [MANGOHUD] [debug] [cpu.cpp:632] hwmon: sensor name: zenergy
[2024-07-29 11:47:20.329] [MANGOHUD] [debug] [cpu.cpp:601] hwmon: using input: /sys/class/hwmon/hwmon4/energy9_input
[2024-07-29 11:47:20.330] [MANGOHUD] [debug] [gl_hud.cpp:132] vendor: AMD, deviceName: AMD Radeon RX 6700 XT (radeonsi, navi22, ACO, DRM 3.57, 6.10.2-cachyos-6.10.2-r1-gentoo-dist)
[2024-07-29 11:47:20.330] [MANGOHUD] [debug] [gl_hud.cpp:154] GL device id: 73DF
[2024-07-29 11:47:20.330] [MANGOHUD] [debug] [overlay.cpp:874] drm path check: /sys/class/drm/card1
[2024-07-29 11:47:20.330] [MANGOHUD] [debug] [amdgpu.cpp:28] Failed to read the metrics header of '/sys/class/drm/card1/device/gpu_metrics'
[2024-07-29 11:47:20.330] [MANGOHUD] [debug] [overlay.cpp:974] Uploading is disabled (permit_upload = 0)
[2024-07-29 11:47:20.330] [MANGOHUD] [debug] [gl_hud.cpp:157] gpu: AMD Radeon RX 6700 XT
[2024-07-29 11:47:20.330] [MANGOHUD] [info] [gl_renderer.cpp:422] GL version: 4.6
[2024-07-29 11:47:20.347] [MANGOHUD] [debug] [inject_glx.cpp:115] GL ref count: 1
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
[2024-07-29 11:47:20.348] [MANGOHUD] [debug] [gl_renderer.cpp:296] glsl_version: 410
351 frames in 5.0 seconds = 70.101 FPS
350 frames in 5.0 seconds = 69.872 FPS
350 frames in 5.0 seconds = 69.898 FPS
350 frames in 5.0 seconds = 69.913 FPS
^C
I believe I already found the issue. Even though my system only has one physical GPU (RX 6700XT at /sys/class/drm/card0) MangoHud tries to look for it's sysfs interface in /sys/class/drm/card1. This directory does exist, but there is nothing of value in it. All the required interfaces to query GPU information are in /sys/class/drm/card0.
This sometimes happens when you have a dgpu and an igpu.
Workarounds are to disable to igpu or setting the specific device with pci_dev in mangohud config
Specifying the device via pci_dev did fix it. Thanks for suggesting that!
I'm still very confused why MangoHud tried to get data about my GPU from the wrong path in the first place though. And I'm even more confused about the fact that card1 even exists in /sys. Like I said, I only have one physical GPU.
Could this Kernel option be related to the issue? It's the only thing I could think of that could possibly cause this.
It's possible this has been fixed in latest git as this section has been reworked
Hey, sorry for the super late response, but it's fixed now. I'm running MangoHud 0.7.2 on Gentoo ~amd64