clbr / radeontop Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
I've installed radeontop 1.0 deb package from launchpad.net. When I ran it reports
amdgpu DRM driver is used, but amdgpu VRAM size reporting is not enabled
amdgpu DRM driver is used, but amdgpu VRAM usage reporting is not enabled
Failed to get VRAM usage, kernel likely too old
Collecting data, please wait....
After that it shows all zeros.
I've checked all dependencies and they're ok.
libc6/xenial-updates,xenial-security,now 2.23-0ubuntu10 amd64 [installed]
libc6-dbg/xenial-updates,xenial-security,now 2.23-0ubuntu10 amd64 [installed]
libc6-dev/xenial-updates,xenial-security,now 2.23-0ubuntu10 amd64 [installed]
libc6-dev-i386/xenial-updates,xenial-security,now 2.23-0ubuntu10 amd64 [installed,automatic]
libc6-dev-x32/xenial-updates,xenial-security,now 2.23-0ubuntu10 amd64 [installed,automatic]
libc6-i386/xenial-updates,xenial-security,now 2.23-0ubuntu10 amd64 [installed,automatic]
libc6-x32/xenial-updates,xenial-security,now 2.23-0ubuntu10 amd64 [installed,automatic]
libdrm2/now 2.4.76-1ubuntu16.04.1 amd64 [installed,upgradable to: 2.4.83-116.04.1]
libncurses5/xenial,now 6.0+20160213-1ubuntu1 amd64 [installed]
libncurses5-dev/xenial,now 6.0+20160213-1ubuntu1 amd64 [installed]
libpciaccess0/xenial,now 0.13.4-1 amd64 [installed]
libtinfo5/xenial,now 6.0+20160213-1ubuntu1 amd64 [installed]
libxcb-dri2-0/xenial,now 1.11.1-1ubuntu1 amd64 [installed]
libxcb1/xenial,now 1.11.1-1ubuntu1 amd64 [installed]
libxcb1-dev/xenial,now 1.11.1-1ubuntu1 amd64 [installed,automatic]
My configuration is described in #54
Does VRAM reporting on works on rx480?
I just did build radeontop from git.
notice: i am usin ROCm driver
$ sudo ./radeontop
amdgpu DRM driver is used, but amdgpu VRAM size reporting is not enabled
amdgpu DRM driver is used, but amdgpu VRAM usage reporting is not enabled
Failed to get VRAM usage, kernel likely too old
Collecting data, please wait....
radeontop v1.0-4-gba7beb7, running on POLARIS10, 120 samples/sec
$ uname -a
Linux 4.9.0-kfd-compute-rocm-rel-1.5-99 #1 SMP Wed May 31 09:59:28 CDT 2017 x86_64 x86_64 x86_64 GNU/Linux
If is enabled AMD Overdrive (amdgpu.ppfeaturemask=0xffffbfff), freezes the system.
How to solve it? Thx
0x9649 is PCI_CHIP_SUMO2_9649 not PCI_CHIP_SUMO_9649, see http://cgit.freedesktop.org/xorg/driver/xf86-video-ati/commit/?id=04ef035c9315b4a6fbf1b14720be87cee4099a9f
Installed a VEGA Frontier Edition today. Randeontop seems to have stopped working.
Failed to open DRM node, no VRAM support.
Unknown Radeon card. <= R500 won't work, new cards might.
Any information I can provide to ease adding support?
Could you please push currently accumulated commits as new release? :)
Line 19 in 39ce0ba
this is a Bug that was requested by some 1 in Launchpad
Which is related to "radeontop" Terminal command
Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1329593
When I use radeontop with my HD 7770 (GNC 1.0) it can detect the VRAM usage. When I do it on my R9 380X it tells me "Kernel too old for vram" and doesn't.
I am running Ubuntu 16.04 on Kernel 4.7 for both scenarios.
Anything you can do about it?
Is there a technical reason why the r300-500 series aren't supported? Is the documentation for the appropriate registers just not available? I ask because I have an embedded system with an r500 and I wish to measure GPU usage, but I'm having a tough time finding anybody that has implemented this.
Hi
Please take a look to at screenshots for comparison:
https://imgur.com/bTrRcj6
https://imgur.com/KXMGhuB
According to https://github.com/clbr/radeontop/blob/master/radeontop.asc#options the option of -b
should be used from the output of lspci.
Unfortunately the input of -b
needs to be decimal, while the output of lspci is hexadecimal:
Line 124 in 099045e
The atoi()
could be replaced by a strtoul()
, but this will break existing scripts of course.
Should the logic of -b
be changed to support hexadecimal arguments or should another parameter be added (e.g. -B
) which allows hexadecimal inputs?
When running radeontop with radeontop -l 1 -d -
to print statistics, it takes about 2 seconds before it returns something.
Running this for all GPUs serially, it takes 2s * #GPUs
, which is a very long time for gather performance information.
Is there any way to speed this up?
$ time radeontop -d - -l 1
Dumping to -, line limit 1.
1529693401.317127: gpu 0.00%, ee 0.00%, vgt 0.00%, ta 0.00%, sx 0.00%, sh 0.00%, spi 0.00%, sc 0.00%, pa 0.00%, db 0.00%, cb 0.00%, vram 0.04% 2.06mb, gtt 0.04% 2.56mb
real 0m2.052s
user 0m0.000s
sys 0m0.010s
radeontop outputs "Failed to open DRM node, no VRAM support."
then continues to run, but does not display my VRAM usage.
My card is a Club3D R9 270X. It's a very uncommon brand, so someone in the #radeon irc suggested that it may be that my PCI ID is not in the supported devices list. I've attached part of the output of lspci -vv
. If any more information is needed, I'll be happy to provide it.
Thank you.
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Curacao XT / Trinidad XT [Radeon R7 370 / R9 270X/370X] (prog-if 00 [VGA controller])
Subsystem: Hightech Information System Ltd. Device 2336
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 49
NUMA node: 0
Region 0: Memory at c0000000 (64-bit, prefetchable) [size=256M]
Region 2: Memory at fea00000 (64-bit, non-prefetchable) [size=256K]
Region 4: I/O ports at e000 [size=256]
Expansion ROM at 000c0000 [disabled] [size=128K]
Capabilities: [48] Vendor Specific Information: Len=08 <?>
Capabilities: [50] Power Management version 3
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1+,D2+,D3hot+,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [58] Express (v2) Legacy Endpoint, MSI 00
DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <4us, L1 unlimited
ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd- ExtTag+ PhantFunc- AuxPwr- NoSnoop+
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr- TransPend-
LnkCap: Port #0, Speed 8GT/s, Width x16, ASPM L0s L1, Exit Latency L0s <64ns, L1 <1us
ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 5GT/s, Width x16, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Not Supported, TimeoutDis-, LTR-, OBFF Not Supported
AtomicOpsCap: 32bit- 64bit- 128bitCAS-
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
AtomicOpsCtl: ReqEn-
LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis-
Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
Address: 00000000fee00000 Data: 0000
Capabilities: [100 v1] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
Capabilities: [150 v2] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
Capabilities: [200 v1] #15
Capabilities: [270 v1] #19
Capabilities: [2b0 v1] Address Translation Service (ATS)
ATSCap: Invalidate Queue Depth: 00
ATSCtl: Enable+, Smallest Translation Unit: 00
Capabilities: [2c0 v1] Page Request Interface (PRI)
PRICtl: Enable- Reset-
PRISta: RF- UPRGI- Stopped+
Page Request Capacity: 00000020, Page Request Allocation: 00000000
Capabilities: [2d0 v1] Process Address Space ID (PASID)
PASIDCap: Exec+ Priv+, Max PASID Width: 10
PASIDCtl: Enable- Exec- Priv-
Kernel driver in use: radeon
Kernel modules: radeon, amdgpu
EDIT: Updated lspci output
Please add support for Polaris 12 devices
lspci -nn
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Polaris12 [1002:699f] (rev c7)
System: Manjaro Linux, Ryzen 5 3500U with integrated Vega 8
When I start radeontop
without any GPU utilization, it will show wrong values (e. g. 90+% utilization) and then freeze my whole system after a few seconds if I don't press q
quick enough to close radeontop
. I only manage to shut my system down with a hard reset if this happens. This is an example image of what radeontop
displays before it freezes my system:
However, my system does not seem to freeze if I actually have GPU utilization. For example if I open mpv
and let it play a video in the backgroud, radeontop
works as expected:
I have tested and can reproduce this on kernel 5.2.4 and 5.3-RC2.
Kernel 5.1 works without problems.
BTW, those images where taken when testing the PR with clock frequency support, but I also tested git master and the latest release with the same result.
Hello,
I'm using radeontop on a laptop system with a Intel Haswell and a Radeon R9 M265X (through PRIME). So when just using the Intel, the kernel driver keeps the Radeon switched off. Then radeontop doesn't even start ("Can't find Radeon cards"). When the Radeon is used, then radeontop works perfectly.
However, when I then quit the application using the Radeon, the kernel driver switches the GPU off again after some time. Then radeontop just prints 100% for every stats entry.
I don't know what's the most logical way to proceed here. Let radeontop exit once the GPU disappears? Stop data collection and display as long as the GPU is offline and proceed with it once it comes online again?
Greets,
Tobias
Hello clbr,
Would you clarify which licenses use the following files:
File without license header:
radeontop-2047d134262b4e9e3514718edc01c27b0ed86352/familycheck.sh
radeontop-2047d134262b4e9e3514718edc01c27b0ed86352/getamdgpuids.sh
radeontop-2047d134262b4e9e3514718edc01c27b0ed86352/getver.sh
radeontop-2047d134262b4e9e3514718edc01c27b0ed86352/include/r600_pci_ids.h
Fedora is currently reviewing radeontop for packaging and the generator provide the above result. See this review process
Hi,
I'm working on adding support for GPU loads for a Gnome Shell extension (paradoxxxzero/gnome-shell-system-monitor-applet#386).
Since I don't own a Radeon GPU, I can't test the tool. I was wondering if you could provide me with a way of getting the information needed in a succinct CLI way. I need: the GPU load, the vRAM used, and total vRAM.
Dummy example command:
radeontop | grep load
radeontop | grep vRAM
Thanks a lot for your time!
Fran
Hi,
I've written an ebuild for gentoo with the help from hasufell and patched your Makefile a bit. Maybe you want adopt some of the changes.
Hi
I have SUMO iGPU and TURKS dGPU.
radeontop version is 0.9.
With "radeontop -b 0" there is info about VRAM usage, but with "radeontop -b 1" - not VRAM info at all. Strange thing that I thought it works before year ago or so (at least as I remember).
Hello,
I use a radeon 5870m with catalyst 15.201 on Ubuntu 12.04LTS(3.13.0-67-generic), but radeontop report only "0.00%" values for each entry.
i noticed several things :
any advice on what's going wrong or how to debug ?
thanks in advance,
regards,
Hi,
I have a problem with my new Radeon. VRAM size can't be detected although I added new ID to the headers. My lspci entry is:
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Tonga PRO [Radeon R9 285] [1002:6939]
I don't know nothing about DRM hacking, but I see that drmCommandWriteRead commands returns nothing. It starts in method getvram(). I had to change path /dev/dri/card0 to /dev/ati/card0 because I don't have dri directory no more. My DRI is working in other apps.
$ make
./getver.sh
Package pciaccess was not found in the pkg-config search path.
Perhaps you should add the directory containing `pciaccess.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pciaccess' found
cc -Os -Wall -Wextra -pthread -Iinclude -ffunction-sections -fdata-sections -I/usr/include/libdrm -DENABLE_XCB=1 -D_GNU_SOURCE -DENABLE_NLS=1 -s -c -o detect.o detect.c
In file included from detect.c:17:0:
include/radeontop.h:20:0: warning: "_GNU_SOURCE" redefined
#define _GNU_SOURCE
^
:0:0: note: this is the location of the previous definition
detect.c:18:23: fatal error: pciaccess.h: No such file or directory
compilation terminated.
: recipe for target 'detect.o' failed
make: *** [detect.o] Error 1
can deb files for this be made?
First of all, CPU usage is an important information (even if it is not strictly related to GPU). This way you can know what is bottlenecking, CPU or GPU. So it would look like this:
radeontop , running on RV710, 120 samples/sec
CPU utilization 8,12% │
Graphics pipe 11,67% │
─────────────────────────────────────────┼──
Event Engine 6,67% │
Secondly, there are two lines related to VRAM reporting, which consume most precious vertical space. It looks like this at this moment:
VRAM 52,12% │
VRAM 267M │
I'd merge it to look like this:
VRAM (267M) 52,12% │
Please add the following to dump.c
#include <locale.h>
It is needed for this:
setlocale(LC_NUMERIC, "C");
Currently a make install
call recompiles everything. But a recompile should only happen if a dependency changed.
Running radeontop with root privileges forcing AMD/ATI card to be used with:
sudo DRI_PRIME=1 radeontop
I get a "Can't find Radeon cards" error message.
lspci
shows
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Wimbledon XT [Radeon HD 7970M] (rev ff)
uname -r
shows
4.9.0-7-amd64
uname -a
shows
Linux ............ 4.9.0-7-amd64 #1 SMP Debian 4.9.110-3+deb9u1 (2018-08-03) x86_64 GNU/Linux
Any other needed info will be provided if needed!
I tried the version that is in debian and it doesn't support getting info from my RX 480. After compiling master from here, it worked fine. I contacted the debian maintainer and he said:
Could you ask upstream to tag a new stable version? Debian usually does not
ship git snapshots for packages (with some exceptions).
It would be nice if you could do this before the fifth of february since debian testing will go into full freeze then and getting this in the new stable would be very nice.
Thanks!
Following the appstream guideline needed for Software Center found on major distribution like Ubuntu and Fedora, here is
radeontop.metainfo.xml.txt. Remove the txt extension and verify if the information are correct.
Is it possible to get the gpu temperature in radeontop?
lspci shows
01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Mars [Radeon HD 8670A/8670M/8750M](rev ff)
In /dev/dri/ are 2 cards
[root@HackBox ~]# ls /dev/dri/
card0 card1 controlD64 controlD65
But radeontop says:
[root@HackBox ~]# radeontop
Can't find Radeon cards
Tried playing with the parameters, didn't read the code (yet).
Using Arch Linux x86_64
With "Gnome with Xorg" login, everything is fine and working.
But If I chose "Gnome" which uses Wayland,
[death@Ryzen ~]$ sudo radeontop
[sudo] password for death:
Failed to open DRM node, no VRAM support.
Collecting data, please wait....
[death@Ryzen ~]$
Would it be possible to add the bus id on the dump output? For example, something like:
1529693401.34: bus 0a, gpu 0.00%, ee 0.00%, vgt 0.00%, ta 0.00%, sx 0.00%, sh 0.00%, spi 0.00%, sc 0.00%, pa 0.00%, db 0.00%, cb 0.00%, vram 0.04% 2.06mb, gtt 0.04% 2.56mb
How could this be implemented? Would you extend struct bits_t
, so data and bus_id are closely related, so you have a chance for future multi-gpu support?
Thank you for this program, this become the solution for amdoverdrive-data in radeon opensource ;)
Hi,
whether I start radeontop with a narrow or wide terminal, it scales nicely to the terminal width. However, if I resize terminal after starting, radeontop will not resize itself. Also, title bar gets cut off if one shrinks the terminal and enlarges it again.
I have RX480. I've started from clean Ubuntu 16.04 and installed some software packages for GPU computations from this manual
Then I've installed Radeontop 0.9-1build1 by "apt install". Radeontop writes
Kernel too old for VRAM reporting.
Unknown Radeon card. <= R500 won't work, new cards might.
Collecting data, please wait....
then shows all zeros.
aticonfig --list-adapters
* 0. 00:01.0 AMD Radeon(TM) R7 Graphics
1. 01:00.0 AMD Radeon (TM) R9 Fury Series
2. 02:00.0 AMD Radeon (TM) R9 Fury Series
* - Default adapter
radeontop -b 1
scandir: No such file or directory
Failed to open DRM node, no VRAM support.
Unknown Radeon card. <= R500 won't work, new cards might.
Collecting data, please wait....
I just get the message "unknown Radeon card".
is it technically possible for this program to monitor my rx 560s?
Screenshots in the README.md would be a good addition imo
I lost ~2-3 days of my main machine last weekend due to radeontop (0.8-1) holding on to '/dev/dri/card0' - this was a disaster that I originally attributed to a libdrm bug. This is the worst X issue I have ever faced, I literally had no idea how to fight it, and got me very angry (this is the kind of crap that resulted in me reinstalling Windows in the days of old).
radeontop is ran via 'radeontop -d -' in a script that processes its output and dumps to file, running permanently and started off at runlevel 2 via an init.d script. I haven't seen this issue before (and I have ran this setup for months), so I assume the latest update caused it. radeontop is no longer being ran because of this, but I don't mind reenabling to help with tracking the bug down.
please add support for it, thanks a lot.
As per #51 , a community contributor (@franglais125) was adding support for GPU monitoring directly in gnome system monitor (awesome!) - nVidia support was added, but AMD not yet;
radeontop was proven capable to query + parse the necessary information there, however, the problem is that it required root privs.
A comment from @clbr in #51 (comment), indicates:
Root rights are not required if your kernel is new enough, libdrm is new enough, and your user has access to the DRM node. If you tried to run radeontop without a Radeon card, it would fail to find one in DRM, and assume it needed the root path - even if your system otherwise was set up for non-root access.
More details? I'm on latest Ubuntu 18.04 just recently, and still radeontop isn't ready for non-root usage.
$ radeontop
Cannot access GPU registers, are you root?
(if we run as root of course it works)
$ uname -a
Linux fermmy 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ dpkg --list | grep libdrm | awk '{print $1,$2, $3}'
ii libdrm-amdgpu1:amd64 2.4.91-2
ii libdrm-amdgpu1:i386 2.4.91-2
ii libdrm-common 2.4.91-2
ii libdrm-dev:amd64 2.4.91-2
ii libdrm-intel1:amd64 2.4.91-2
ii libdrm-intel1:i386 2.4.91-2
rc libdrm-nouveau1a:amd64 2.4.52-1~precise2
rc libdrm-nouveau1a:i386 2.4.52-1~precise2
ii libdrm-nouveau2:amd64 2.4.91-2
ii libdrm-nouveau2:i386 2.4.91-2
ii libdrm-radeon1:amd64 2.4.91-2
ii libdrm-radeon1:i386 2.4.91-2
ii libdrm2:amd64 2.4.91-2
ii libdrm2:i386 2.4.91-2
How to access "DRM node"?
Hello clbr,
Makefile uses the wrong lib on this line
$(LIBDIR) should be used instead when it comes to install on x86
-64 architecture.
I tried the latest git master version on Ubuntu 14.04 (kernel 3.16, libdrm 2.4.60, fglrx-core 15.200) and I'm getting no data (all zeroes).
Is there a way to find out if this is a kernel/libdrm limitation, or a bug in radeontop?
Hi, is it outside the scope of this project to harvest UVD/VCE utilization statistics? Does r600+ hardware expose this kind of information? I've been looking around and have not found a utility that shows this kind of information.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.