https://bugs.kde.org/show_bug.cgi?id=521594

            Bug ID: 521594
           Summary: 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.
    Classification: Plasma
           Product: kwin
      Version First 6.7.0
       Reported In:
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: wayland-generic
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

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)

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to