| Summary: | kwin_wayland-6.4.* (reproduced up to 6.4.5) is not working with drm (from unprivileged user, regardless on GPU) | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | Denis Reva <denis7774> |
| Component: | wayland-generic | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | REPORTED --- | ||
| Severity: | major | CC: | antonioni.rocha, darupeter, i.am, louis.leseur, matti.tiainen |
| Priority: | NOR | ||
| Version First Reported In: | 6.4.1 | ||
| Target Milestone: | --- | ||
| Platform: | Gentoo Packages | ||
| OS: | Linux | ||
| URL: | https://bugs.gentoo.org/959144 | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
emerge --info
wayland-session logs from sddm vulkaninfo glxinfo Kwin data FROM X11 |
||
|
Description
Denis Reva
2025-06-27 17:31:05 UTC
Created attachment 182739 [details]
emerge --info
Created attachment 182740 [details]
wayland-session logs from sddm
Also: elwe@RarogCmexDell ~ $ groups elwe lp wheel audio dialout video input kvm render plugdev lpadmin docker lxd libvirt pipewire qbittorrent teleri elwe@RarogCmexDell ~ $ LC_ALL=C ls -la /dev/dri/ total 0 drwxr-xr-x 3 root root 140 Jun 27 20:03 . drwxr-xr-x 20 root root 5820 Jun 27 20:04 .. drwxr-xr-x 2 root root 120 Jun 27 20:03 by-path crw-rw----+ 1 root video 226, 0 Jun 27 20:03 card0 crw-rw----+ 1 root video 226, 1 Jun 27 20:03 card1 crw-rw-rw- 1 root render 226, 128 Jun 27 20:03 renderD128 crw-rw-rw- 1 root render 226, 129 Jun 27 20:03 renderD129 elwe@RarogCmexDell ~ $ nvidia-smi Fri Jun 27 22:33:27 2025 +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 575.64 Driver Version: 575.64 CUDA Version: 12.9 | |-----------------------------------------+------------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+========================+======================| | 0 NVIDIA GeForce GTX 1060 3GB On | 00000000:04:00.0 On | N/A | | 0% 46C P8 9W / 125W | 529MiB / 3072MiB | 0% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ | 1 Tesla P100-PCIE-12GB On | 00000000:42:00.0 Off | 0 | | N/A 59C P0 28W / 250W | 6MiB / 12288MiB | 0% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ I have found the simular issues: 1. On Garuda Linux: https://forum.garudalinux.org/t/switching-to-wayland-failed-to-open-drm-device-at-dev-dri-card0/14738/41 2. On Gentoo Linux Forum: https://forums.gentoo.org/viewtopic-t-1173686.html (but it has intel gpu). I have tried reinstalling both kwin, nvidia-drivers and gentoo-kernel. Created attachment 182741 [details]
vulkaninfo
Created attachment 182742 [details]
glxinfo
Created attachment 182743 [details]
Kwin data FROM X11
The closest bug that I found is https://bugs.kde.org/show_bug.cgi?id=446160 Dbus and Elogind is working https://bugs.gentoo.org/959144#c16 The issue has been reproduced with x11-drivers/nvidia-drivers-570.169 The issue has been reproduced with kwin-6.4.2 and x11-drivers/nvidia-drivers-575.64.03 Do you know whether the issue happens when using GDM instead? (In reply to Vlad Zahorodnii from comment #12) > Do you know whether the issue happens when using GDM instead? I haven't test GDM yet, but I tested Weston and it worked. > I haven't test GDM yet, but I tested Weston and it worked.
I mean Weston works standalone.
The issue is reproduced when I launch it from TTY with dbus-session-start startplasma_wayland, I don't think that GDM will change something, but I'll give it a try later.
I have just tested Gnome's Mutter; it works on that system (with SDDM). have you confirmed yet that that KMS is functional, e.g. via the kernel command line option ‘nvidia-drm.modeset=1’? I faced nearly this exact issue with a new Gentoo installation: in my case, I was building a unified kernel image and wasn’t correctly setting the cmdline options (In reply to Matt Snow from comment #16) > have you confirmed yet that that KMS is functional, e.g. via the kernel > command line option ‘nvidia-drm.modeset=1’? Sadly, yes, it is the first thing I have checked. I am using Gentoo's dist-kernel RarogCmexDell /home/elwe # cat /sys/module/nvidia_drm/parameters/modeset Y RarogCmexDell /home/elwe # cat /sys/module/nvidia_drm/parameters/fbdev Y Issue still present even if modesetting is enabled. I added nvidia-drm.modeset=1 to kernel commandline. Nothing changed. I have also unmasked matrox mgag200 to test if it works. The log become even more hilarious: No backend specified, automatically choosing drm kwin_core: Failed to activate /org/freedesktop/login1/session/_35 session. Maybe another compositor is running? kwin_wayland_drm: failed to open drm device at "/dev/dri/card0" kwin_wayland_drm: failed to open drm device at "/dev/dri/card1" kwin_wayland_drm: failed to open drm device at "/dev/dri/card2" kwin_wayland_drm: No suitable DRM devices have been found No backend specified, automatically choosing drm... (loop) I have amd radeon rx 560 2gb, I will attempt with one later. The issue has reproduced with kwin 6.4.3 The issue has been reproduced with Radeon RX 560 2Gb. This is not nvidia's fault this time :) The bug become a lot more mysterious. I have the same issue running Gentoo (ARM64) on UTM w/ Apple hypervisor and virtio_gpu + llvmpipe. kwin/plasma wayland worked fine until upgrading to 6.4.1 or so, now I see the same "Failed to activate: ... Maybe another compositor is running" and "failed to open drm device at /dev/dri/card0" messages. I'm using greetd as the display/session manager. kwin x11 still works. I have found a suspicious piece. Under normal user `eglinfo -B` shows: 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. EGL API version: 1.5 EGL vendor string: Mesa Project EGL version string: 1.5 EGL client APIs: OpenGL OpenGL_ES OpenGL core profile vendor: Mesa OpenGL core profile renderer: llvmpipe (LLVM 20.1.8, 256 bits) OpenGL core profile version: 4.5 (Core Profile) Mesa 25.1.6 OpenGL core profile shading language version: 4.50 OpenGL compatibility profile vendor: Mesa OpenGL compatibility profile renderer: llvmpipe (LLVM 20.1.8, 256 bits) OpenGL compatibility profile version: 4.5 (Compatibility Profile) Mesa 25.1.6 OpenGL compatibility profile shading language version: 4.50 OpenGL ES profile vendor: Mesa OpenGL ES profile renderer: llvmpipe (LLVM 20.1.8, 256 bits) OpenGL ES profile version: OpenGL ES 3.2 Mesa 25.1.6 OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20 However, under root user GBM platform is working as intended: GBM platform: EGL API version: 1.5 EGL vendor string: Mesa Project EGL version string: 1.5 EGL client APIs: OpenGL OpenGL_ES OpenGL core profile vendor: AMD OpenGL core profile renderer: AMD Radeon RX 560 Series (radeonsi, polaris11, ACO, DRM 3.63, 6.15.7-gentoo-dist) OpenGL core profile version: 4.6 (Core Profile) Mesa 25.1.6 OpenGL core profile shading language version: 4.60 OpenGL compatibility profile vendor: AMD OpenGL compatibility profile renderer: AMD Radeon RX 560 Series (radeonsi, polaris11, ACO, DRM 3.63, 6.15.7-gentoo-dist) OpenGL compatibility profile version: 4.6 (Compatibility Profile) Mesa 25.1.6 OpenGL compatibility profile shading language version: 4.60 OpenGL ES profile vendor: AMD OpenGL ES profile renderer: AMD Radeon RX 560 Series (radeonsi, polaris11, ACO, DRM 3.63, 6.15.7-gentoo-dist) OpenGL ES profile version: OpenGL ES 3.2 Mesa 25.1.6 OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20 (In reply to Reva Denis from comment #24) > I have found a suspicious piece. Under normal user `eglinfo -B` shows: > So what the amdgpu_query_info(ACCEL_WORKING) failed (-13) mean? After long research - this is "not a bug" and it's not related to the issue: https://bbs.archlinux.org/viewtopic.php?pid=2236371#p2236371 https://gitlab.freedesktop.org/mesa/mesa/-/issues/7289 See also: https://bugs.gentoo.org/959144#c26 I'm having a similar issue on a Dell laptop using intel GPU on Alpine Linux 3.22.
When running `kwin_wayland --drm --exit-with-session=kwrite` as user:
kwin_watchdog: Watchdog: disabled, not running on a systemd environment or watchdog is not set up. No WATCHDOG_USEC.
kwin_core: Failed to activate /org/freedesktop/login1/session/c5 session. Maybe another compositor is running?
Accepting client connections on sockets: QList("wayland-0")
kwin_core: Compositing forced to QPainter mode by environment variable
kwin_wayland_drm: failed to open drm device at "/dev/dri/card1"
kwin_wayland_drm: No suitable DRM devices have been found
QThreadStorage: entry 7 destroyed before end of thread 0x7cbcc8763a60
But when running as root, it works fine:
kwin_watchdog: Watchdog: disabled, not running on a systemd environment or watchdog is not set up. No WATCHDOG_USEC.
Accepting client connections on sockets: QList("wayland-0")
kwin_core: Compositing forced to QPainter mode by environment variable
kwin_wayland_drm: drmModeAddFB2WithModifiers is supported on GPU "/dev/dri/card1"
kwin_wayland_drm: Using Atomic Mode Setting on gpu "/dev/dri/card1"
kwin_wayland_drm: Number of planes on GPU "/dev/dri/card1" : 9
kwin_wayland_drm: adding GPU /dev/dri/card1
kwin_wayland_drm: New output on GPU /dev/dri/card1: eDP-1-0x082E
kwin_xkbcommon: XKB: created compose table from locale en_US.UTF-8 with path /usr/share/X11/locale/en_US.UTF-8/Compose
kwin_libinput: Libinput: event12 - thumb: enabled thumb detection (area)
kwin_libinput: Libinput: event12 - lid: activated for DELL08BC:00 04F3:30CA Touchpad<->Lid Switch
kwin_libinput: Libinput: event1 - lid: keyboard paired with Lid Switch<->AT Translated Set 2 keyboard
kwin_libinput: Libinput: event12 - palm: dwt activated with DELL08BC:00 04F3:30CA Touchpad<->AT Translated Set 2 keyboard
kwin_core: KGlobalAcceld inited
kwin_core: Attempting to load the QPainter scene
kwin_core: QPainter compositing has been successfully initialized
kwin_decorations: Trying to load decoration plugin: "/usr/lib/qt6/plugins/org.kde.kdecoration3/org.kde.breeze.so"
kwin_wayland_drm: Attempting to match QList(DrmConnector(id=99, gpu="/dev/dri/card1", name="eDP-1", connection="Connected", countMode=2), DrmConnector(id=107, gpu="/dev/dri/card1", name="HDMI-A-1", connection="Disconnected", countMode=0), DrmConnector(id=116, gpu="/dev/dri/card1", name="DP-1", connection="Disconnected", countMode=0), DrmConnector(id=123, gpu="/dev/dri/card1", name="HDMI-A-2", connection="Disconnected", countMode=0)) with QList(DrmObject(id=53, gpu="/dev/dri/card1"), DrmObject(id=75, gpu="/dev/dri/card1"), DrmObject(id=97, gpu="/dev/dri/card1"))
kwin_wayland_drm: Assigning CRTC 53 to connector 99
kwin_wayland_drm: Attempting to match QList(DrmConnector(id=107, gpu="/dev/dri/card1", name="HDMI-A-1", connection="Disconnected", countMode=0), DrmConnector(id=116, gpu="/dev/dri/card1", name="DP-1", connection="Disconnected", countMode=0), DrmConnector(id=123, gpu="/dev/dri/card1", name="HDMI-A-2", connection="Disconnected", countMode=0)) with QList(DrmObject(id=75, gpu="/dev/dri/card1"), DrmObject(id=97, gpu="/dev/dri/card1"))
kwin_wayland_drm: Attempting to match QList(DrmConnector(id=116, gpu="/dev/dri/card1", name="DP-1", connection="Disconnected", countMode=0), DrmConnector(id=123, gpu="/dev/dri/card1", name="HDMI-A-2", connection="Disconnected", countMode=0)) with QList(DrmObject(id=75, gpu="/dev/dri/card1"), DrmObject(id=97, gpu="/dev/dri/card1"))
kwin_wayland_drm: Attempting to match QList(DrmConnector(id=123, gpu="/dev/dri/card1", name="HDMI-A-2", connection="Disconnected", countMode=0)) with QList(DrmObject(id=75, gpu="/dev/dri/card1"), DrmObject(id=97, gpu="/dev/dri/card1"))
kwin_wayland_drm: Testing CRTC assignment... passed
[...]
Unfortunately, I did not manage to get any more verbose output from kwin_wayland. I did run it with strace to compare when run as root / user, but I did not find any obvious error that would cause this issue. Also, I'm running on 6.3.6, and other compositors (tested weston) seems to work fine. With plasma 6.5 session manager login now works fine, but unfortunately right after that everything freezes and can't even switch VTs. There might be different bug on 6.5. I'm testing 6.5 promising, got some crashes, but I'm unsure whether it's a raw release or another form of the bug. To be precise, my symptoms with 6.5 are now that desktop loads fine, but mouse/keyboard input does not work at all (worked fine with 6.3). So probably completely different issue. |