Bug 515309

Summary: Connecting external display to dGPU causes crash if primary is the iGPU
Product: [Plasma] kwin Reporter: szihalmi.botond
Component: eglAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: crash    
Priority: NOR    
Version First Reported In: 6.5.5   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Backtrace of the latest kwin_wayland crash
stderr output of kwin_wayland to which the crash happened
coredump of the crash

Description szihalmi.botond 2026-01-30 16:00:35 UTC
Created attachment 189064 [details]
Backtrace of the latest kwin_wayland crash

SUMMARY

Whenever I connect an external display to my dGPU the whole kwin_wayland crahses due to some EGL problem.
When the same display is connected to iGPU there is no issue.
I have no other issues with nvidia, prime works perfectly.

Tried enabling "fbdev", "modeset", neither helped.
Played around with a bunch of environment variables:
---------------------------------------------------------
KWIN_DRM_DEVICES=/dev/dri/card1
KWIN_OPENGL_INTERFACE=egl
__GLX_VENDOR_LIBRARY_NAME=mesa
GBM_BACKEND=nvidia-drm
__GL_GSYNC_ALLOWED=0
__GL_GSYNC_ALLOWED=0
---------------------------------------------------------

from these only "KWIN_OPENGL_INTERFACE=egl" helped, made the crash take longer, but did not stop it

No issues on x11, SDDM seems to have managed the external display correctly as well.


STEPS TO REPRODUCE
1. install nvidia closed v580.119.02
2. run kwin_wayland (can be completely emtpy with no session)
3. connect display to port that is known to use the dGPU

OBSERVED RESULT

kwin_wayland crashes and dumps core

EXPECTED RESULT

external display shows any content

SOFTWARE/OS VERSIONS
Linux:
Fedora 42 
KDE Plasma Version: 6.5.5
KDE Frameworks Version: 6.22.0
Qt Version: 6.9.3

ADDITIONAL INFORMATION
Kernel: 6.18.6-100
Graphics Platform: Wayland
Graphics Processor 1: AMD Radeon 890M Graphics
Graphics Processor 2: NVIDIA GeForce RTX 4060 Laptop GPU
Comment 1 szihalmi.botond 2026-01-30 16:01:45 UTC
Created attachment 189065 [details]
stderr output of kwin_wayland to which the crash happened
Comment 2 szihalmi.botond 2026-01-30 16:03:28 UTC
Created attachment 189066 [details]
coredump of the crash