Bug 500392 - kwin fails to start with NVIDIA driver
Summary: kwin fails to start with NVIDIA driver
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: platform-drm (other bugs)
Version First Reported In: 6.3.1
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-19 11:16 UTC by Olivier Fourdan
Modified: 2025-04-30 03:47 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 Olivier Fourdan 2025-02-19 11:16:56 UTC
SUMMARY

kwin 6.3.1 fails to start on a Fedora 42 installation with the NVIDIA driver:

```
kwin_core: Failed to open drm node: ""
kwin_scene_opengl: couldn't find dev node for drm device
kwin_scene_opengl: No render nodes have been found, falling back to primary node
kwin_scene_opengl: 0x502: GL_INVALID_OPERATION error generated. <image> and <target> are incompatible
kwin_wayland_drm: Failed to create framebuffer: Invalid argument
kwin_wayland_drm: Failed to create framebuffer: Invalid argument
```

STEPS TO REPRODUCE
1. Install Fedora 42
2. Enable RPMfusion and install NVIDIA proprietary driver
3. Log in KDE Plasma

OBSERVED RESULT

Screen stays black.

EXPECTED RESULT

KDE session starts.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 6.3.1-1.fc42.x86_64
KDE Frameworks Version: kf6-frameworkintegration-6.11.0-1.fc42.x86_64
Qt Version: 6.8.2-1.fc42.x86_64

ADDITIONAL INFORMATION

GNOME Shell as a Wayland compositor works fine on that exact same setup.

```
s -l /dev/dri/
total 0
drwxr-xr-x. 2 root root        100 Feb 19 11:56 by-path
crw-rw----+ 1 root video  226,   0 Feb 19 11:56 card0
crw-rw----+ 1 root video  226,   1 Feb 19 11:56 card1
crw-rw-rw-. 1 root render 226, 128 Feb 19 11:56 renderD128
```

card0 is simpledrm and card1 is nvidia:

```
$ ls -l /sys/class/drm/card0/device/driver/
total 0
--w------- 1 root root 4096 Feb 19 12:15 bind
lrwxrwxrwx 1 root root    0 Feb 19 12:15 simple-framebuffer.0 -> ../../../../devices/pci0000:51/0000:51:01.0/0000:52:00.0/simple-framebuffer.0
--w------- 1 root root 4096 Feb 19  2025 uevent
--w------- 1 root root 4096 Feb 19 12:15 unbind

$ ls -l /sys/class/drm/card1/device/driver/
total 0
lrwxrwxrwx 1 root root    0 Feb 19 12:15 0000:52:00.0 -> ../../../../devices/pci0000:51/0000:51:01.0/0000:52:00.0
--w------- 1 root root 4096 Feb 19 12:15 bind
lrwxrwxrwx 1 root root    0 Feb 19 12:15 module -> ../../../../module/nvidia
--w------- 1 root root 4096 Feb 19 12:15 new_id
--w------- 1 root root 4096 Feb 19 12:15 remove_id
--w------- 1 root root 4096 Feb 19 12:15 uevent
--w------- 1 root root 4096 Feb 19 12:15 unbind
```
Comment 1 Olivier Fourdan 2025-02-19 14:22:37 UTC
FWIW, it works in mutter because mutter uses the udev property `boot_vga` to select the device to use, see `meta_is_udev_device_boot_vga()`:

https://gitlab.gnome.org/GNOME/mutter/-/blob/main/src/backends/meta-udev.c?ref_type=heads#L64-74
Comment 2 Nate Graham 2025-02-19 22:33:42 UTC
Did 6.2 work?
Comment 3 Olivier Fourdan 2025-02-20 07:38:13 UTC
Actually, Austin Shafer from NVIDIA pointed at https://github.com/NVIDIA/open-gpu-kernel-modules/issues/788 as being the issue, basically, the NVIDIA driver does not enable the fbdev options with RC kernels as found in F42 at the moment.
Comment 4 Olivier Fourdan 2025-02-20 07:43:51 UTC
FTR, If anyone else with the same problem comes across this bug report, a workaround suggested by Xaver is to set `KWIN_DRM_DEVICES` to point to the NVIDIA device, e.g.:

```
$ cat /etc/environment 

KWIN_DRM_DEVICES=/dev/dri/card1
```
Comment 5 John Kizer 2025-03-14 04:19:27 UTC
Hi - just to double-check on this one, is there still an issue to be tackled here for KWin? If so, are there updated steps to reproduce, since it sounds like perhaps the immediate issue when this bug was filed has since been resolved?

Thanks!
Comment 6 Bug Janitor Service 2025-03-29 03:46:58 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Olivier Fourdan 2025-03-31 07:03:32 UTC
The issue is presumably caused by the use on an RC kernel as Austin pointed out (comment #3).

Dunno why that works with GNOME, maybe by chance, so please feel free to close this bug if you reckon this is not KDE.
Comment 8 Bug Janitor Service 2025-04-15 03:46:50 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Bug Janitor Service 2025-04-30 03:47:30 UTC
๐Ÿ›๐Ÿงน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.