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

GPU usage is always 0% #1482

Open
nghialm269 opened this issue Nov 16, 2024 · 19 comments
Open

GPU usage is always 0% #1482

nghialm269 opened this issue Nov 16, 2024 · 19 comments

Comments

@nghialm269
Copy link

nghialm269 commented Nov 16, 2024

Do not report issue for old MangoHud versions

Describe the bug
GPU usage is always 0%.

List relevant hardware/software information

  • Linux Distribution: Arch Linux
  • MangoHud version: Latest git (258491e)
  • GPU: NVIDIA GeForce RTX 4060

To Reproduce
Steps to reproduce the behavior:

MANGOHUD_LOG_LEVEL=debug mangohud vkcube

Expected behavior
GPU usage should show up correctly.

Screenshots
image

Additional context
Config:

################### File Generated by Goverlay ###################
legacy_layout=false


background_alpha=0.1
round_corners=0
background_alpha=0.1
background_color=000000

font_size=30
text_color=FFFFFF
position=top-left

hud_compact
pci_dev=0:01:00.0
table_columns=3
gpu_text=GPU
gpu_stats
gpu_core_clock
gpu_mem_clock
gpu_temp
gpu_power
gpu_color=2E9762
cpu_text=CPU
cpu_stats

cpu_mhz
cpu_temp
cpu_power
cpu_color=2E97CB
vram
vram_color=AD64C1
ram
ram_color=C26693
battery
battery_color=00FF00
fps
frame_timing
frametime_color=00FF00
fps_limit_method=late
toggle_fps_limit=Shift_L+F1

fps_limit=0
resolution
#offset=0







output_folder=/home/nghialm
log_duration=30
autostart_log=0
log_interval=100
toggle_logging=Shift_L+F2

Logs:

[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:778] Version: v0.7.2-87-g258491e
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [config.cpp:117] skipping config: '/usr/bin/MangoHud.conf' [ not found ]
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [config.cpp:117] skipping config: '/home/nghialm/.config/MangoHud/vkcube.conf' [ not found ]
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [config.cpp:117] skipping config: '/etc/MangoHud.conf' [ not found ]
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [config.cpp:122] parsing config: '/home/nghialm/.config/MangoHud/MangoHud.conf'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:1019] Failed to read presets file: '/home/nghialm/.config/MangoHud/presets.conf'.  Falling back to default presets
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [config.cpp:117] skipping config: '/usr/bin/MangoHud.conf' [ not found ]
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [config.cpp:117] skipping config: '/home/nghialm/.config/MangoHud/vkcube.conf' [ not found ]
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [config.cpp:117] skipping config: '/etc/MangoHud.conf' [ not found ]
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [config.cpp:122] parsing config: '/home/nghialm/.config/MangoHud/MangoHud.conf'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'legacy_layout' = 'false'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'background_alpha' = '0.1'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'round_corners' = '0'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'background_alpha' = '0.1'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'background_color' = '000000'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'font_size' = '30'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'text_color' = 'FFFFFF'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'position' = 'top-left'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'hud_compact' = '1'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'pci_dev' = '0:01:00.0'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'table_columns' = '3'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'gpu_text' = 'GPU'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'gpu_stats' = '1'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'gpu_core_clock' = '1'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'gpu_mem_clock' = '1'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'gpu_temp' = '1'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'gpu_power' = '1'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'gpu_color' = '2E9762'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'cpu_text' = 'CPU'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'cpu_stats' = '1'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'cpu_mhz' = '1'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'cpu_temp' = '1'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'cpu_power' = '1'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'cpu_color' = '2E97CB'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'vram' = '1'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'vram_color' = 'AD64C1'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'ram' = '1'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'ram_color' = 'C26693'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'battery' = '1'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'battery_color' = '00FF00'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'fps' = '1'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'frame_timing' = '1'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'frametime_color' = '00FF00'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'fps_limit_method' = 'late'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'toggle_fps_limit' = 'Shift_L+F1'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'fps_limit' = '0'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'resolution' = '1'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'output_folder' = '/home/nghialm'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'log_duration' = '30'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'autostart_log' = '0'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'log_interval' = '100'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [overlay_params.cpp:963] Param: 'toggle_logging' = 'Shift_L+F2'
[2024-11-16 19:08:56.887] [MANGOHUD] [debug] [logging.cpp:244] Logger constructed!
[2024-11-16 19:08:56.899] [MANGOHUD] [debug] [overlay.cpp:846] Ram:31977004
[2024-11-16 19:08:56.899] [MANGOHUD] [debug] [overlay.cpp:847] Cpu:AMD Ryzen 7 7800X3D 8-Core Processor
[2024-11-16 19:08:56.899] [MANGOHUD] [debug] [overlay.cpp:848] Kernel:6.11.7-arch1-1
[2024-11-16 19:08:56.899] [MANGOHUD] [debug] [overlay.cpp:849] Os:Arch Linux
[2024-11-16 19:08:56.899] [MANGOHUD] [debug] [overlay.cpp:850] Driver:
[2024-11-16 19:08:56.899] [MANGOHUD] [debug] [overlay.cpp:851] CPU Scheduler:powersave
[2024-11-16 19:08:56.900] [MANGOHUD] [debug] [cpu.cpp:515] hwmon: sensor name: spd5118
[2024-11-16 19:08:56.900] [MANGOHUD] [debug] [cpu.cpp:515] hwmon: sensor name: asus
[2024-11-16 19:08:56.900] [MANGOHUD] [debug] [cpu.cpp:515] hwmon: sensor name: k10temp
[2024-11-16 19:08:56.900] [MANGOHUD] [debug] [cpu.cpp:548] hwmon: using input: /sys/class/hwmon/hwmon2/temp1_input
[2024-11-16 19:08:56.900] [MANGOHUD] [debug] [cpu.cpp:641] hwmon: sensor name: spd5118
[2024-11-16 19:08:56.900] [MANGOHUD] [debug] [cpu.cpp:641] hwmon: sensor name: asus
[2024-11-16 19:08:56.900] [MANGOHUD] [debug] [cpu.cpp:641] hwmon: sensor name: k10temp
[2024-11-16 19:08:56.900] [MANGOHUD] [debug] [cpu.cpp:641] hwmon: sensor name: nvme
[2024-11-16 19:08:56.900] [MANGOHUD] [debug] [cpu.cpp:641] hwmon: sensor name: zenergy
[2024-11-16 19:08:56.900] [MANGOHUD] [debug] [cpu.cpp:610] hwmon: using input: /sys/class/hwmon/hwmon7/energy9_input
[2024-11-16 19:08:57.005] [MANGOHUD] [debug] [vulkan.cpp:1860] gpu: NVIDIA GeForce RTX 4060
[2024-11-16 19:08:57.005] [MANGOHUD] [debug] [vulkan.cpp:1546] Present mode: FIFO
[2024-11-16 19:08:57.051] [MANGOHUD] [debug] [vulkan.cpp:720] Recreating font image
[2024-11-16 19:08:57.068] [MANGOHUD] [debug] [vulkan.cpp:739] Default font tex size: 2048x2048px
[2024-11-16 19:08:57.083] [MANGOHUD] [debug] [vulkan.cpp:720] Recreating font image
[2024-11-16 19:08:57.101] [MANGOHUD] [debug] [vulkan.cpp:739] Default font tex size: 2048x2048px
[2024-11-16 19:08:57.115] [MANGOHUD] [debug] [vulkan.cpp:720] Recreating font image
[2024-11-16 19:08:57.132] [MANGOHUD] [debug] [vulkan.cpp:739] Default font tex size: 2048x2048px
[2024-11-16 19:08:57.135] [MANGOHUD] [error] [battery.cpp:29] No battery found
[2024-11-16 19:08:57.136] [MANGOHUD] [debug] [gpu.cpp:69] GPU Found: node_name: renderD128, vendor_id: 1002 device_id: 164e pci_dev: 0000:0c:00.0
[2024-11-16 19:08:57.147] [MANGOHUD] [debug] [nvidia.cpp:58] XNVCtrl didn't find the correct display
[2024-11-16 19:08:57.147] [MANGOHUD] [debug] [gpu.cpp:69] GPU Found: node_name: renderD129, vendor_id: 10de device_id: 2882 pci_dev: 0000:01:00.0
[2024-11-16 19:08:57.150] [MANGOHUD] [debug] [gpu.cpp:156] Active GPU Found: node_name: renderD129, pci_dev: 0000:01:00.0
[2024-11-16 19:08:57.174] [MANGOHUD] [debug] [vulkan.cpp:720] Recreating font image
[2024-11-16 19:08:57.192] [MANGOHUD] [debug] [vulkan.cpp:739] Default font tex size: 2048x2048px
@flightlessmango
Copy link
Owner

I'm not certain 60fps in vkcube on a 4060 would cause more than 0% utilization

@nghialm269
Copy link
Author

it doesn't show up in game either. I only noticed just now but VRAM is always 0 as well.

image

@flightlessmango
Copy link
Owner

can you take a screenshot of nvidia-smi?

@nghialm269
Copy link
Author

Latest stable version in archlinux, GPU usage and VRAM shows up, but GPU power doesn't:
image

nvidia-smi:
image

@K4zoku
Copy link

K4zoku commented Nov 22, 2024

I'm not sure if this helps, but downgrading from mangohud-git to mangohud on Arch fixed the issue for me.

@mikkorantalainen
Copy link

If even nvidia-smi shows N/A instead of current power usage for your GPU, do you really think mangohud would still be able to display the wattage?

@nghialm269
Copy link
Author

If even nvidia-smi shows N/A instead of current power usage for your GPU, do you really think mangohud would still be able to display the wattage?

The git version seems to be able to display it though, but that's not the point anyway.
I added a screenshot of the stable version to show that it can pick up my GPU, I'm not using it because it doesn't work with gamescope.

@SavillionPrime
Copy link

@nghialm269 did you fix it?

@nghialm269
Copy link
Author

@nghialm269 did you fix it?

Unfortunately no. I switched to NixOS recently, MangoHud can show GPU info, but it doesn't work when running with gamescope (--mangoapp). Same as ArchLinux

@flightlessmango
Copy link
Owner

but it doesn't work when running with gamescope (--mangoapp)

You never mentioned this issue was isolated to gamescope

@nghialm269
Copy link
Author

but it doesn't work when running with gamescope (--mangoapp)

You never mentioned this issue was isolated to gamescope

For the stable version, it doesn't work with gamescope

For the git version in ArchLinux, things show up except for the GPU usage whether with or without gamescope. Haven't tried git version in nixos yet though.

This issue I only mentioned the git version, hence I don't mention gamescope

@17314642
Copy link
Contributor

17314642 commented Dec 4, 2024

@nghialm269 do you have two gpus on your pc? maybe an integrated one and rtx 4060?.

if yes, try adding gpu_list=0,1 into your config and see if it works.

@17314642
Copy link
Contributor

17314642 commented Dec 4, 2024

I am almost certain that the problem here is that mangohud shows statistics for your amd integrated gpu:

GPU Found: node_name: renderD128, vendor_id: 1002 device_id: 164e pci_dev: 0000:0c:00.0 // this is amd
GPU Found: node_name: renderD129, vendor_id: 10de device_id: 2882 pci_dev: 0000:01:00.0 // this is nvidia

gpu_list=0,1 will show statistics for both gpus

@nghialm269
Copy link
Author

@17314642 yep, when using gpu_list=0,1 both GPUs show up (0=amd and 1=nvidia).

EDIT: or not, because it also finds that nvidia is your active gpu
Active GPU Found: node_name: renderD129, pci_dev: 0000:01:00.0

So mangohud is detecting the active GPU correctly, but ends up showing the wrong one somehow

@17314642
Copy link
Contributor

17314642 commented Dec 6, 2024

Yeah... Thats because your game acesses both amd and nvidia, and mangohud detects amd first

I am trying to fix that currently. Hopefully this will be fixed by end of the month.

@17314642
Copy link
Contributor

Should be fixed in master branch

@shmerl
Copy link

shmerl commented Dec 19, 2024

Looks like hit that in Stalker 2, but weirdly it doesn't happen in Cyberpunk 2077. Not using gamescope, just Wine+vkd3d-proton.

@shmerl
Copy link

shmerl commented Dec 19, 2024

Is gpu_list a very new parameter?

MANGOHUD_CONFIG='gpu_list=0' MANGOHUD=1 vkgears
[2024-12-19 18:14:22.878] [MANGOHUD] [error] [overlay_params.cpp:695] Unknown option 'gpu_list'

@flightlessmango
Copy link
Owner

Is gpu_list a very new parameter?

Yes it's very new

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants