Bug 521937 - kwin_wayland SIGSEGV in KWin::RenderDevice::~RenderDevice during DRM initialization failure fallback
Summary: kwin_wayland SIGSEGV in KWin::RenderDevice::~RenderDevice during DRM initiali...
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: platform-drm (other bugs)
Version First Reported In: 6.7.0
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-06-21 16:51 UTC by ifazralgames
Modified: 2026-07-22 03:47 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
kinfo and coredumpctl info kwin_wayland (1.92 KB, text/plain)
2026-06-21 16:51 UTC, ifazralgames
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ifazralgames 2026-06-21 16:51:24 UTC
Created attachment 193496 [details]
kinfo and coredumpctl info kwin_wayland

SUMMARY
On an ASUS ROG Strix laptop (ASUS ROG Strix G16 G614JV (2023)) with an asymmetric hybrid GPU layout where the NVIDIA dGPU initializes first as card0 and Intel iGPU as card1, attempting to force KWin to use card1 (via KWIN_DRM_DEVICES env variable) causes a DRM initialization failure as expected. However, during the fallback/cleanup routine, kwin_wayland crashes with a Segmentation Fault (SIGSEGV) inside the RenderDevice destructor.

STEPS TO REPRODUCE
1. Have a hybrid GPU laptop where NVIDIA is registered as /dev/dri/card0 and Intel as /dev/dri/card1.
2. Attempt to force the Plasma Login Manager or user session compositor to use the iGPU by setting:
   export KWIN_DRM_DEVICES=/dev/dri/card1:/dev/dri/card0
3. Start the Wayland session.

OBSERVED RESULT
KWin correctly fails to open the mismatching DRM nodes, but instead of exiting gracefully to a TTY or login screen, it crashes immediately due to a Null Pointer or invalid memory access during memory deallocation in the destructor.

EXPECTED RESULT
KWin should handle the initialization failure gracefully and exit without a SIGSEGV.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux (Kernel 7.0.12-zen)
KDE Plasma Version: 6.7.0-3
KDE Frameworks Version: 6.27.0
Qt Version: 6.11.1

ADDITIONAL INFORMATION
Here is the stack trace captured via coredumpctl:

Stack trace of thread 1042:
#0  0x00007efc8fc9a29c n/a (libc.so.6 + 0x9a29c)
#1  0x00007efc8fc3e7d0 raise (libc.so.6 + 0x3e7d0)
#2  0x00007efc939a801d _ZN6KCrash19defaultCrashHandlerEi (libKF6Crash.so.6 + 0x801d)
#3  0x00007efc8fc3e8f0 n/a (libc.so.6 + 0x3e8f0)
#4  0x00007efc861d1120 n/a (n/a + 0x0)
#5  0x00007efc931f305a _ZN4KWin12RenderDeviceD2Ev (libkwin.so.6 + 0x1f305a)
Comment 1 Zamundaaa 2026-06-22 22:08:47 UTC
We need a proper backtrace for this: https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl

> attempting to force KWin to use card1 (via KWIN_DRM_DEVICES env variable) causes a DRM initialization failure as expected
That's not expected. KWin will skip devices in the list if it can't open them.
Comment 2 Bug Janitor Service 2026-07-07 03:48:09 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 3 Bug Janitor Service 2026-07-22 03:47:18 UTC
๐Ÿ›๐Ÿงน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.