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 289 forks source link

Cannot get AMD CPU power draw on hybrid graphics when using NVIDIA GPU. #1143

Open memchr opened 1 year ago

memchr commented 1 year ago

On a system with an AMD CPU and hybrid graphics with an NVIDIA GPU (i.e. integrated AMD graphics and NVIDIA GPU), if and only if the NVIDIA GPU is used, mangohud does not display AMD CPU power draw.

List relevant hardware/software information

Through debugging, mangohud has used get_cpu_power_amdgpu on this particular system.

To Reproduce

env VK_DRIVER_FILES=/usr/share/vulkan/icd.d/nvidia_icd.json MANGOHUD=1 MANGOHUD_CONFIG=full vkcube

Observe that CPU power remains at zero.

image

Expected behavior

env MANGOHUD=1 MANGOHUD_CONFIG=full vkcube

CPU power is reported correctly.

image

flightlessmango commented 1 year ago

This is because while you're using the iGPU we can access the gpu_metrics table which includes cpu power readings. The officially supported way to get power readings on ryzen requires that you install a kernel driver. From readme:

Note: The zenpower3 or zenergy kernel driver must be installed to show the power draw of Ryzen CPUs.

While this is the current case, I would like to support getting the power from gpu_metrics even while not using the iGPU. This issue should stay open until that is fixed