Bug 521594 - SDDM greeter KWin holds /dev/dri/card0 (NVIDIA eGPU), causing user session KWin to fail with “Device or resource busy” on Plasma 6.7 Wayland.
Summary: SDDM greeter KWin holds /dev/dri/card0 (NVIDIA eGPU), causing user session KW...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: 6.7.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-06-17 20:22 UTC by pdchris
Modified: 2026-06-29 12:06 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pdchris 2026-06-17 20:22:22 UTC
DESCRIPTION
After upgrading to Plasma 6.7, autologin results in eGPU to fail due to an apparent race condition: SDDM greeter KWin holds /dev/dri/card0 (NVIDIA eGPU), causing user session KWin to fail with “Device or resource busy”. If I log out and back login everything works. If I disable autologin, everything works after I type my password and login.
With Plasma 6.6 everything worked fine also with autologin

STEPS TO REPRODUCE
1. Set up a system with an Intel iGPU as the primary GPU and an NVIDIA GT 740 (or other Kepler-based) as a secondary eGPU, using the nouveau driver.
2. Enable autologin in SDDM.
3. Reboot
4. Observe: external monitors connected to the eGPU show the boot logo and KDE splash, then turn half‑black/half‑white when Plasma starts.
5. Log out and log back in – monitors work correctly.
6. if you disable autologin and reboot: monitors work correctly after you type the password and login

OBSERVED RESULT
With autoloign enabled: external monitors connected to the eGPU show the boot logo and KDE splash, then turn half‑black/half‑white when Plasma starts.

EXPECTED RESULT
With autoloign enabled: external monitors connected to the eGPU show the boot logo and KDE splash and the Plasma session when it starts (worked fine with Plasma 6.6).

SOFTWARE/OS VERSIONS
Operating System Fedora 44 KDE
Operating System: Fedora Linux 44
KDE Plasma Version: 6.7.0
KDE Frameworks Version: 6.27.0
Qt Version: 6.11.1
Kernel Version: 7.0.12-201.fc44.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × Intel® Core™ i5-14400
Memory: 40 GiB of RAM (38.8 GiB usable)
Graphics Processor 1: Intel® Graphics
Graphics Processor 2: GeForce GT 740

ADDITIONAL INFORMATION

Workaround
- logging out and logging back in always fixes the monitors.
- killing KWin from a virtual terminal (pkill -f kwin_wayland) and restarting it / logging back into the session with KWIN_DRM_DEVICES=/dev/dri/card1:/dev/dri/card0 KWIN_DRM_NO_AMS=1 kwin --replace & also works.
- disabling autologin (so the greeter is fully terminated before the user session starts) also resolves the issue.

What does NOT work
- setting KWIN_DRM_DEVICES and KWIN_DRM_NO_AMS=1 in /etc/environment, /etc/environment.d/, or SDDM’s Environment= does not prevent the error.
- EnableCompositor=false in SDDM does not help.
- a custom Wayland session that sets the variables via env does not prevent the greeter from holding the device.
-> the environment variables KWIN_DRM_DEVICES and KWIN_DRM_NO_AMS=1 are correctly read by KWin (verified via cat /proc/$(pidof kwin_wayland)/environ), but KWin still attempts to open card0 and fails.

Card mapping
~$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Raptor Lake-S UHD Graphics (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GT 740] (rev a1)

~$ ls -l /dev/dri/by-path/
total 0
drwxr-xr-x. 2 root root 120 17. Jun 21:56 .
drwxr-xr-x. 3 root root 140 17. Jun 2026  ..
lrwxrwxrwx. 1 root root   8 17. Jun 21:56 pci-0000:00:02.0-card -> ../card1
lrwxrwxrwx. 1 root root  13 17. Jun 21:56 pci-0000:00:02.0-render -> ../renderD128
lrwxrwxrwx. 1 root root   8 17. Jun 21:56 pci-0000:01:00.0-card -> ../card0
lrwxrwxrwx. 1 root root  13 17. Jun 21:56 pci-0000:01:00.0-render -> ../renderD129

Logs:
~$ journalctl -b -o short-full | grep -i -E "card0|drm|kwin_wayland|sddm" | tail -100
kwin_wayland[2272]: Failed to open /dev/dri/card0 device (Device or resource busy)
(repeated multiple times)
kwin_wayland[2272]: Failed to open drm device /dev/dri/card0
systemd[1998]: Started plasma-login-kwin_wayland.service - KDE Window Manager (Login Manager Version).
kwin_wayland[2272]: Failed to open drm node: "/dev/dri/card0"
systemd[2989]: Starting plasma-kwin_wayland.service - KDE Wayland Compositor...
systemd[2989]: Started plasma-kwin_wayland.service - KDE Wayland Compositor.
kwin_wayland[3424]: No backend specified, automatically choosing drm
kwin_wayland[3424]: Failed to open /dev/dri/card0 device (Device or resource busy)
kwin_wayland[3424]: Failed to open /dev/dri/card0 device (Device or resource busy)
kwin_wayland[3424]: Failed to open /dev/dri/card0 device (Device or resource busy)
(repeated multiple times)
Comment 1 pdchris 2026-06-17 20:25:30 UTC
Setting KWIN_DRM_DEVICES="/dev/dri/card1:/dev/dri/card0" and KWIN_DRM_NO_AMS=1 in /etc/environment, /etc/environment.d/, or SDDM’s Environment does not prevent the error
Comment 2 Akseli Lahtinen 2026-06-18 09:30:00 UTC
This and https://bugs.kde.org/show_bug.cgi?id=521568 seem related
Comment 3 pdchris 2026-06-28 08:28:22 UTC
It seems to work well now with Plasma 6.7.1
Comment 4 pdchris 2026-06-28 18:14:22 UTC
I guess the fix for https://bugs.kde.org/show_bug.cgi?id=521934
fixed this problem as well
> Backends/drm: check for the render device in importScanoutBuffer