When I execute eglinfo from the mesa-utils package, I get failures:
$ eglinfo
...
GBM platform:
amdgpu_device_initialize: amdgpu_query_info(ACCEL_WORKING) failed (-13)
amdgpu: amdgpu_device_initialize failed.
amdgpu_device_initialize: amdgpu_query_info(ACCEL_WORKING) failed (-13)
amdgpu: amdgpu_device_initialize failed.
...
I have traced the amdgpu_query_info()
to libdrm in the file amdgpu/amdgpu_gpu_info.c
The drmCommandWrite()
fails with errno 13: Permission Denied.
Initially I thought this was trivial to fix, as I noticed that the devices in /dev/dri/*
had group ownership video
and render
.
But after making the user part of these groups, and rebooting, the error is still present.
Why does drmCommandWrite()
fail with denied permissions? I have no such issue when running the integrated graphics and the iris driver.
$ inxi -G
Graphics:
Device-1: AMD Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
driver: amdgpu v: kernel
Display: wayland server: X.org v: 1.21.1.4 with: Xwayland v: 22.1.3
compositor: gnome-shell v: 43.1 driver: X: loaded: modesetting
unloaded: fbdev,vesa gpu: amdgpu resolution: 1920x1080~60Hz
OpenGL: renderer: AMD Radeon RX 580 Series (polaris10 LLVM 15.0.2 DRM
3.49 6.1.6-060106-generic) v: 4.6 Mesa 22.2.1
OS: Ubuntu 22.10
update
The permission denied error goes away when running as root.
A relevant comment on a gitlab issue explains that the display server should have authenticated access to /dev/dri/card0
first.