Bug 514418 - KWin Wayland Segmentation Fault on USB-C Dock Unplug
Summary: KWin Wayland Segmentation Fault on USB-C Dock Unplug
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: 6.3.6
Platform: Debian unstable Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-10 18:18 UTC by Travis Wenks
Modified: 2026-01-11 01:06 UTC (History)
2 users (show)

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


Attachments
Patch (847 bytes, patch)
2026-01-10 18:18 UTC, Travis Wenks
Details
The actual crash (17.65 KB, text/plain)
2026-01-10 18:19 UTC, Travis Wenks
Details
my system info (214 bytes, text/plain)
2026-01-10 18:20 UTC, Travis Wenks
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Travis Wenks 2026-01-10 18:18:16 UTC
Created attachment 188395 [details]
Patch

Bug Report: KWin Wayland Segmentation Fault on USB-C Dock Unplug

Product: KWin
Component: wayland-generic
Summary: KWin crashes with SIGSEGV when unplugging a USB-C dock in Wayland session.

Description:
KWin crashes with a segmentation fault when unplugging a USB-C dock from the laptop. This occurs consistently during hot-unplug events. The crash happens in the color management protocol handling, specifically in wp_color_manager_v1_get_output when attempting to access a removed output resource.

Steps to Reproduce:
1. Connect a USB-C dock with displays to the laptop.
2. Log in to a Wayland Plasma session.
3. Unplug the USB-C dock.
4. KWin crashes with SIGSEGV.

Expected Behavior:
Unplugging the dock should not cause a crash; the system should handle hot-unplug gracefully.

Actual Behavior:
KWin crashes, requiring a session restart.

System Information:
Operating System: Debian Trixie (unstable)
Kernel Version: 6.12.57+deb13-amd64
Architecture: x86_64
Graphics Driver: Mesa 25.0.7-2
KWin Version: 6.3.7
Qt Version: 6.x
Wayland Server Library: libwayland-server.so.0

Additional Notes:
- Crash log attached (crash.log).
- Proposed fix: Add validity check for output in ColorManagerV1::wp_color_manager_v1_get_output to prevent access to removed outputs.
- Patch attached (patch.diff).
- System info attached (system_info.txt).
- Similar issues: Related to bugs 446124, 448778, 511632 (crashes on unplug, but different stack traces).

Attachments:
- crash.log: Full crash backtrace.
- patch.diff: Git diff for the proposed fix.
- system_info.txt: Detailed system information.

Submit to: https://bugs.kde.org/enter_bug.cgi?product=kwin&component=wayland-generic
Comment 1 Travis Wenks 2026-01-10 18:19:16 UTC
Created attachment 188396 [details]
The actual crash
Comment 2 Travis Wenks 2026-01-10 18:20:13 UTC
Created attachment 188397 [details]
my system info
Comment 3 Travis Wenks 2026-01-10 19:45:45 UTC
Merge request created https://invent.kde.org/plasma/kwin/-/merge_requests/8622
Comment 4 Zamundaaa 2026-01-11 01:02:31 UTC
This has been fixed since Plasma 6.4.

Also, please don't use an LLM to generate bug reports or merge requests, they just add useless information that waste time. You could at a minimum remove its instructions to you from the text...
Comment 5 Oliver Beard 2026-01-11 01:06:56 UTC
The backtrace is useless due to missing information, debug packages are not installed so symbols are not available — how this resulted in such a patch is not obvious. A look at Debian packaging indicates that Debian unstable (sid) has Plasma up to 6.5.4, so your 6.3.6 system is very much out of date.