Unable to use Wayland due to "amdgpu_query_info(ACCEL_WORKING) failed"
Brief summary of the problem:
For a while I have been suffering an issue where I am unable to use any Wayland compositor (aside from GNOME) with most compositors resulting in the following:
- From TTY: Input stops working, screen goes black (eventually triggering DPMS)
- From Xorg: A blank window which does not update or draw
Digging into the issue I noticed that running a compositor as root
does not trigger this issue. Eventually I stumbled upon eglinfo
printing the following:
amdgpu_device_initialize: amdgpu_query_info(ACCEL_WORKING) failed (-13)
amdgpu: amdgpu_device_initialize failed.
Resulting in eglinfo
printing EGL 1.4 instead of EGL 1.5 for the GBM platform.
Running eglinfo
as root does not produce these lines.
My uneducated guess is that GBM tries to fallback to llvmpipe
or similar for GBM.
Hardware description:
- CPU:
AMD A10-7800 Radeon R7, 12 Compute Cores 4C+8G
- GPU:
00:01.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Kaveri [Radeon R7 Graphics] [1002:130f]
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Oland XT [Radeon HD 8670 / R5 340X OEM / R7 250/350/350X OEM] [1002:6610] (rev 83)
- System Memory:
8GB DDR3 (256MB provided to the APU)
- Display(s):
Single 1080p Monitor
- Type of Display Connection:
HDMI
System information:
- Distro name and Version:
Artix Linux (rolling)
- Kernel version:
Linux toastix 5.17.4-artix1-1 #1 SMP PREEMPT Thu, 21 Apr 2022 06:59:38 +0000 x86_64 GNU/Linux
- Custom kernel: N/A
- AMD official driver version: N/A
How to reproduce the issue:
eglinfo
:
- Run eglinfo as a normal user
- See the lines (below) in the GBM section
amdgpu_device_initialize: amdgpu_query_info(ACCEL_WORKING) failed (-13)
amdgpu: amdgpu_device_initialize failed.
weston
:
- Run weston as a normal user
- Be greeted with a non-functional window which needs to be
SIGKILL
-ed
Attached files:
An strace
of eglinfo
: (ran as a normal user)
An strace
of eglinfo
: (ran as a root)
The only thing that stands out within the strace
is the lines:
newfstatat(5, "", {st_mode=S_IFCHR|0660, st_rdev=makedev(0xe2, 0), ...}, AT_EMPTY_PATH) = 0
newfstatat(AT_FDCWD, "/sys/dev/char/226:0/device/drm", {st_mode=S_IFDIR|0755, st_size=0, ...}, 0) = 0
ioctl(5, DRM_IOCTL_GET_CLIENT, 0x7ffe1696c860) = 0
ioctl(5, DRM_IOCTL_VERSION, 0x5663570e9f40) = 0
ioctl(5, DRM_IOCTL_VERSION, 0x5663570e9f40) = 0
fcntl(5, F_DUPFD_CLOEXEC, 0) = 6
ioctl(6, DRM_IOCTL_AMDGPU_INFO or DRM_IOCTL_SIS_FB_FREE, 0x7ffe1696c7c0) = -1 EACCES (Permission denied)
write(2, "amdgpu_device_initialize: amdgpu"..., 72amdgpu_device_initialize: amdgpu_query_info(ACCEL_WORKING) failed (-13)
) = 72
close(6) = 0
write(2, "amdgpu: amdgpu_device_initialize"..., 41amdgpu: amdgpu_device_initialize failed.
) = 41
close(5) = 0
close(4) = 0
A screenshot of weston
when run as a normal user:
A screenshot of weston
when run as root: