nvtop
nvtop copied to clipboard
[Meta] Support for Intel, Nouveau and radeon GPUs
I am opening this up because of this thread of discussion on the intel-sgx mailing list.
It seems that the GPU utilization for AMD and Intel will be available in future kernels, at least for the processes spawned by the user itself.
Marking this as a possible improvement once the support lands into the mainline kernel.
Might be a better idea to just call it ' gputop ' instead then...
Ooooo!
@Syllo any update on this?
Kernel support for AMDGPU is mainline since 5.14 (https://github.com/torvalds/linux/commit/874442541133f78c78b6880b8cc495bab5c61704), which was released August 29 2021, so if you have 5.14+ (most likely 5.15 LTS) you can try out my PR above.
i915 changes are still not mainline. Though Intel people are gonna use this gputop name if we don't grab it first :wink:
I will keep this issue around as a meta-issue to centralize the information on other vendors / driver support.
I'm on a 5.17.4 kernel with a RX 6700 XT AMD GPU and the output that I get is:
No GPU to monitor.
This is on Ubuntu 22.04 with nvtop_1.2.2-1_amd64.deb
. I built from source(123908faff9c8ff4f8cba5ec7d4ba365c42610fc) and I get the same output. Any thing I should run to get output on what's missing on this kernel to get output?
@thomas-zimmerman I created #144 for your issue
The Intel sysfs change has been proposed for Linux 5.19: https://lore.kernel.org/dri-devel/Ymkfy8FjsG2JrodK@tursulin-mobl2/
@Syllo Would there be any interest in adding support for Intel GPUs via level zero Sysman interface (https://spec.oneapi.io/level-zero/latest/sysman/PROG.html)?
@servesh Thanks for the link. I was not aware that oneAPI provided such library. This seems like a good opportunity to simplify the accelerator discovery and query. I'll see if I can make this work.
@Syllo Sure, Iet me know once you have something that I can test and take a look. Happy to contribute to the code base as well.
@Syllo Is it possible to show RX/TX on AMD GPUs? I'm on Linux 5.19.
@HTOgit The support for the pcie_bw file is in place. However this file is empty on the system I am testing (RX 6800XT, Kernel 5.19.6).
The only explanation that I see is that the support has not been implemented in the driver:
- The function that populates the
pcie_bw
file is amdgpu_get_pcie_bw - The Navi implementation seems to be in soc21.c but the function
get_pcie_usage
that is required byamdgpu_get_pcie_bw
is not registered in soc21_asic_funcs contrary to soc20_asic_funcs and vega20_asic_funcs.
I created a feature request for this here
Are there any plans on adding apple silicon support?
@HTOgit The support for the pcie_bw file is in place. However this file is empty on the system I am testing (RX 6800XT, Kernel 5.19.6).
The only explanation that I see is that the support has not been implemented in the driver:
* The function that populates the `pcie_bw` file is [amdgpu_get_pcie_bw](https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/amd/pm/amdgpu_pm.c#L1558) * The Navi implementation seems to be in [soc21.c](https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/amd/amdgpu/soc21.c) but the function `get_pcie_usage` that is required by `amdgpu_get_pcie_bw` is not registered in [soc21_asic_funcs](https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/amd/amdgpu/soc21.c#L512) contrary to [soc20_asic_funcs](https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/amd/amdgpu/soc15.c#L883) and [vega20_asic_funcs](https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/amd/amdgpu/soc15.c#L905).
I created a feature request for this here
Sorry for not following up on the issue.
Are there any news to the topic? AMD announced to expose PCIe information to user space with Linux6.3 (https://www.phoronix.com/news/Linux-6.3-AMDGPU-New-uAPI). Would this help?
https://www.phoronix.com/news/Raspberry-Pi-GPU-Stats-Report
Would be nice to have V3D supported as well.
On kernel 6.7.4, when I run text-generation-webui
, the "TYPE" field only shows "Graphic" and the GPU usage is always 0%:
The same program on an Nvidia GPU shows up correctly as "Compute" and I can see the GPU usage fine.