Closed fermulator closed 3 years ago
The DRM node is /dev/dri/card0 on systems with just one GPU. Otherwise the number might be something else.
I don't have the required kernel/libdrm versions at hand, but Ubuntu 18.04 is certainly new enough. I believe the issue for you is that your card is new; only the "radeon" cards currently support non-root querying, your RX card is an "amdgpu" card. That support is in a pull request with some issues, nobody is working on it, and I have no such cards either.
Hello, I'm using Fedora 29, my graphic card is a Sapphire Radeon RX Vega 64
unam -a
Linux yellowtrain 5.0.4-200.fc29.x86_64 #1 SMP Mon Mar 25 02:27:33 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
sudo dnf list --installed *drm*
libdrm.x86_64 2.4.97-1.fc29
ls -la /dev/dri
total 0
drwxr-xr-x. 3 root root 100 Mar 30 02:02 .
drwxr-xr-x. 21 root root 4840 Mar 30 23:13 ..
drwxr-xr-x. 2 root root 80 Mar 30 02:02 by-path
crw-rw----+ 1 root video 226, 0 Apr 2 20:39 card0
crw-rw-rw-. 1 root render 226, 128 Mar 30 02:02 renderD128
lspci -vnn
45:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 XL/XT [Radeon RX Vega 56/64] [1002:687f] (rev c1) (prog-if 00 [VGA controller])
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] RX Vega64 [1002:0b36]
Flags: bus master, fast devsel, latency 0, IRQ 99, NUMA node 1
Memory at 80000000 (64-bit, prefetchable) [size=256M]
Memory at 90000000 (64-bit, prefetchable) [size=2M]
I/O ports at 3000 [size=256]
Memory at 9f200000 (32-bit, non-prefetchable) [size=512K]
Expansion ROM at 000c0000 [disabled] [size=128K]
Capabilities: <access denied>
Kernel driver in use: amdgpu
Kernel modules: amdgpu
45:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 HDMI Audio [Radeon Vega 56/64] [1002:aaf8]
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 HDMI Audio [Radeon Vega 56/64] [1002:aaf8]
Flags: bus master, fast devsel, latency 0, IRQ 155, NUMA node 1
Memory at 9f2a0000 (32-bit, non-prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
I also get the same message when running the command without sudo
$ radeontop
Cannot access GPU registers, are you root?
How can I run the command without sudo? Do I need to configure selinux to allow radeontop to read /dev/drm and /dev/mem? Something like this? or This?
Your card is also an amdgpu card, and that situation hasn't changed unfortunately. I suppose giving your user read access to /dev/mem would work, but that'd be horribly insecure.
Thanks for answering. Running with sudo gives this
Failed to open DRM node, no VRAM support.
Collecting data, please wait....
before it launches something that looks like an ncurses GUI https://streamable.com/xp92n So at least it works with sudo albeit with some worrying messages.
Non-root access for amdgpu might work in current git, please try.
With the amdgpu-pro stack, non-root seems to be working (built v1.2-8-g09d8c0b)
amdgpu 19.0.1-1 non-root access does not seems to work, im part of the group video and crw-rw----+ 1 root video 226, 0 Sep 23 00:09 card0
For my RX Vega 64s, non-root access does indeed work using amdgpu 19.0.1-1 under Ubuntu 18.04.
$ groups
docker adm tty uucp dialout cdrom sudo dip video plugdev lpadmin sambashare
I upgraded my kernel using ukuu, though:
$ uname -a
Linux bengt-desktop 5.2.14-050214-generic #201909101030 SMP Tue Sep 10 10:33:06 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
The README currently states:
Requires access to /dev/dri/cardN files or /dev/mem (root privileges).
Should we add a link from the README to this issue for more details to users to whom running as root is an inacceptable limitation?
No, this issue will be closed in the future. Non-root support for amdgpu is now in git.
I confirm the support of non-root access using the 20191001 git snapshot.
Hello, I'm using Fedora 29, my graphic card is a Sapphire Radeon RX Vega 64
unam -a Linux yellowtrain 5.0.4-200.fc29.x86_64 #1 SMP Mon Mar 25 02:27:33 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux sudo dnf list --installed *drm* libdrm.x86_64 2.4.97-1.fc29 ls -la /dev/dri total 0 drwxr-xr-x. 3 root root 100 Mar 30 02:02 . drwxr-xr-x. 21 root root 4840 Mar 30 23:13 .. drwxr-xr-x. 2 root root 80 Mar 30 02:02 by-path crw-rw----+ 1 root video 226, 0 Apr 2 20:39 card0 crw-rw-rw-. 1 root render 226, 128 Mar 30 02:02 renderD128 lspci -vnn 45:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 XL/XT [Radeon RX Vega 56/64] [1002:687f] (rev c1) (prog-if 00 [VGA controller]) Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] RX Vega64 [1002:0b36] Flags: bus master, fast devsel, latency 0, IRQ 99, NUMA node 1 Memory at 80000000 (64-bit, prefetchable) [size=256M] Memory at 90000000 (64-bit, prefetchable) [size=2M] I/O ports at 3000 [size=256] Memory at 9f200000 (32-bit, non-prefetchable) [size=512K] Expansion ROM at 000c0000 [disabled] [size=128K] Capabilities: <access denied> Kernel driver in use: amdgpu Kernel modules: amdgpu 45:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 HDMI Audio [Radeon Vega 56/64] [1002:aaf8] Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 HDMI Audio [Radeon Vega 56/64] [1002:aaf8] Flags: bus master, fast devsel, latency 0, IRQ 155, NUMA node 1 Memory at 9f2a0000 (32-bit, non-prefetchable) [size=16K] Capabilities: <access denied> Kernel driver in use: snd_hda_intel Kernel modules: snd_hda_intel
I also get the same message when running the command without sudo
$ radeontop Cannot access GPU registers, are you root?
How can I run the command without sudo? Do I need to configure selinux to allow radeontop to read /dev/drm and /dev/mem? Something like this? or This?
Hi, I just tried building the current git master branch of radeontop on Ubuntu 20.04 to get it to run without root access, and it is now working fine for my GPU (AMD Radeon RX5700 XT) without needing to run sudo
. Thanks for adding support for this.
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 https://github.com/clbr/radeontop/issues/51#issuecomment-322983286, indicates:
More details? I'm on latest Ubuntu 18.04 just recently, and still radeontop isn't ready for non-root usage.
(if we run as root of course it works)
How to access "DRM node"?