<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>521594</bug_id>
          
          <creation_ts>2026-06-17 20:22:22 +0000</creation_ts>
          <short_desc>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.</short_desc>
          <delta_ts>2026-06-29 12:06:52 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Plasma</classification>
          <product>kwin</product>
          <component>wayland-generic</component>
          <version>6.7.0</version>
          <rep_platform>Fedora RPMs</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.kde.org/show_bug.cgi?id=521568</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="pdchris">petros.christopoulos</reporter>
          <assigned_to name="KWin default assignee">kwin-bugs-null</assigned_to>
          <cc>akselmo</cc>
    
    <cc>petros.christopoulos</cc>
    
    <cc>xaver.hugl</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2523960</commentid>
    <comment_count>0</comment_count>
    <who name="pdchris">petros.christopoulos</who>
    <bug_when>2026-06-17 20:22:22 +0000</bug_when>
    <thetext>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 &amp; 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.
-&gt; 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 -&gt; ../card1
lrwxrwxrwx. 1 root root  13 17. Jun 21:56 pci-0000:00:02.0-render -&gt; ../renderD128
lrwxrwxrwx. 1 root root   8 17. Jun 21:56 pci-0000:01:00.0-card -&gt; ../card0
lrwxrwxrwx. 1 root root  13 17. Jun 21:56 pci-0000:01:00.0-render -&gt; ../renderD129

Logs:
~$ journalctl -b -o short-full | grep -i -E &quot;card0|drm|kwin_wayland|sddm&quot; | 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: &quot;/dev/dri/card0&quot;
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)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2523962</commentid>
    <comment_count>1</comment_count>
    <who name="pdchris">petros.christopoulos</who>
    <bug_when>2026-06-17 20:25:30 +0000</bug_when>
    <thetext>Setting KWIN_DRM_DEVICES=&quot;/dev/dri/card1:/dev/dri/card0&quot; and KWIN_DRM_NO_AMS=1 in /etc/environment, /etc/environment.d/, or SDDM’s Environment does not prevent the error</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2524120</commentid>
    <comment_count>2</comment_count>
    <who name="Akseli Lahtinen">akselmo</who>
    <bug_when>2026-06-18 09:30:00 +0000</bug_when>
    <thetext>This and https://bugs.kde.org/show_bug.cgi?id=521568 seem related</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2527582</commentid>
    <comment_count>3</comment_count>
    <who name="pdchris">petros.christopoulos</who>
    <bug_when>2026-06-28 08:28:22 +0000</bug_when>
    <thetext>It seems to work well now with Plasma 6.7.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2527699</commentid>
    <comment_count>4</comment_count>
    <who name="pdchris">petros.christopoulos</who>
    <bug_when>2026-06-28 18:14:22 +0000</bug_when>
    <thetext>I guess the fix for https://bugs.kde.org/show_bug.cgi?id=521934
fixed this problem as well
&gt; Backends/drm: check for the render device in importScanoutBuffer</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>