MangoHud
MangoHud copied to clipboard
GPU % load is always 0 (nintendo switch, nvidia jetson)
building and installing the latest manughud from source https://github.com/flightlessmango/MangoHud/commit/ddbb4f5be1dba235ebfd770f622c5fe8be46987e the GPU usage percentage now shows up. when I last built in February there was no percentage.
However, the percentage is always at 0. This device does not use nvctrl (it is also disabled at buildtime for mangohud).
The gpu usage for this GPU can be obtained at /sys/devices/gpu.0/load
which has a value of example 150 meaning 15.0% load
I suggest referring to system-monitoring-center for how to obtain these statistics for more devices in a semi-uniform way
https://github.com/hakandundar34coding/system-monitoring-center/blob/e0c6246d38af487a378adf486eed61485eea7566/src/Gpu.py#L432-L711
Doesn't look like system-monitoring-center uses that path either, but just wraps nvidia-smi instead. If nvidia-smi works then mangohud should also work as they both use the nvml library. Do you have nvml enabled in your mangohud build?
Nvml and Nvidia smi don't exist on the Jetsons. I helped write system monitoring center so can guarantee it does use the /load path for this system. Read my linked code again and scroll to the bottom because you missed it. It is the last case
@theofficialgman hi german, salvador here. you had it easier then. on my sbc, load also shows both freq and load. I used this config to show it.
### Display custom text
custom_text=Mali-G610
### Display output of Bash command in next column
exec=awk '{split($1,a,"@"); printf "GPU usage: %d%%, frequency: %.2f MHz\n", a[1], a[2]/1000000}' /sys/class/devfreq/fb000000.gpu/load
it's a decent workaround
@neofeo I personally just forked mangohud a long time ago since making this issue and implemented it and lots of other tegra specific clocks/loading myself. Ram bandwidth, clocks, gpu load, gpu frequency, VIC/NVDEC/NVENC frequencies, cpu temp https://github.com/flightlessmango/MangoHud/compare/master...theofficialgman:MangoHud:master-l4t