[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1116619: kwin-wayland: all opened app crash when disconnecting usb-c docking station on a multi-monitor setup



I mean, it *can* be backported, I'm currently running this patch and it
seems to work fine.

I tested by plugging/unplugging a USB-C docking adapter a few times,
also powering off/on the monitor while attached, and everything worked.

However, I only encountered the bug once (after unplugging the same
USB-C adapter) and cannot reproduce it reliably, so my testing is
obviously limited.

Anyway, feel free to use this patch if you want :)

--- src/wayland/colormanagement_v1.cpp.orig	2025-10-19 20:00:57.385829734 +0200
+++ src/wayland/colormanagement_v1.cpp	2025-10-19 20:24:13.337090754 +0200
@@ -60,7 +60,10 @@
 
 void ColorManagerV1::wp_color_manager_v1_get_output(Resource *resource, uint32_t id, struct ::wl_resource *output)
 {
-    new ColorManagementOutputV1(resource->client(), id, resource->version(), OutputInterface::get(output)->handle());
+    const auto outputInterface = OutputInterface::get(output);
+    if (outputInterface && !outputInterface->isRemoved()) {
+        new ColorManagementOutputV1(resource->client(), id, resource->version(), outputInterface->handle());
+    }
 }
 
 void ColorManagerV1::wp_color_manager_v1_get_surface(Resource *resource, uint32_t id, struct ::wl_resource *surface)

Reply to: