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

            Bug ID: 511646
           Summary: KWin Wayland: DRM initialization fails due to absence
                    of /dev/dri/card0 (caused by nvidia-drm.fbdev=0),
                    failing to fallback to card1
    Classification: Plasma
           Product: kwin
      Version First 6.5.1
       Reported In:
          Platform: Neon
                OS: Linux
            Status: REPORTED
          Severity: critical
          Priority: NOR
         Component: platform-fbdev
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

The core issue is a structural defect in KWin 6.5.1's DRM initialization logic.
It rigidly attempts to access the device file at /dev/dri/card0 and cannot
gracefully handle the absence of this file (an ENOENT error) by automatically
falling back to the only available, valid GPU device, /dev/dri/card1.
Chain of Consequences: Kernel → udev → KWin

The problem is triggered by a seemingly optimal configuration, revealing the
KWin bug:

1. Kernel Optimization (The Trigger)

    Action: added the kernel parameter nvidia-drm.fbdev=0 to the GRUB command
line.

    Result: this flag instructs the kernel's NVIDIA driver not to register the
legacy VESA/simple framebuffer device.

2. udev Device Management (Correct Action)

    Action: as a result of the kernel's decision, the udev device manager never
receives an event to create the device file for the fallback GPU.

    Result: the file /dev/dri/card0 is correctly and intentionally absent from
the filesystem. This verifies the system configuration is clean.

3. KWin Failure (The Bug)

    Action: KWin begins its initialization and attempts to access the DRM
backend via a hard-coded or strictly ordered search for device files.

    Result (The Bug): KWin fails on the non-existent /dev/dri/card0 and aborts
the entire DRM initialization sequence, resulting in the log error:
kwin_wayland_drm: failed to open drm device at "/dev/dri/card0".

some tests:
a) journalctl -b -e --user-unit=plasma-kwin_wayland.service -g "kwin"
kwin_wayland_drm: failed to open drm device at "/dev/dri/card0"
b) ls -l /dev/dri/
total 0
2 root root        100 nov  4 20:06 by-path
1 root video  226,   1 nov  4 20:06 card1
1 root render 226, 128 nov  4 20:06 renderD128

Operating System: KDE neon User Edition
KDE Plasma Version: 6.5.1
KDE Frameworks Version: 6.19.0
Qt Version: 6.9.2
Kernel Version: 6.14.0-35-generic (64-bit)
Graphics Platform: Wayland
Memory: 16 GiB of RAM (15.6 GiB usable)
Graphics Processor: NVIDIA GeForce GT 1030

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

Reply via email to