Bug 508841 - KWin crashes upon disconnecting the external displays
Summary: KWin crashes upon disconnecting the external displays
Status: RESOLVED DUPLICATE of bug 504959
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.4.4
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2025-08-28 08:05 UTC by pavel.mezentsev
Modified: 2025-08-28 16:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/231734/events/36e9c14d1cc4439997624405280260d2/


Attachments
New crash information added by DrKonqi (91.67 KB, text/plain)
2025-08-28 08:05 UTC, pavel.mezentsev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pavel.mezentsev 2025-08-28 08:05:35 UTC
Application: kwin_wayland (6.4.4)

ApplicationNotResponding [ANR]: false
Qt Version: 6.9.1
Frameworks Version: 6.17.0
Operating System: Linux 6.16.3-arch1-1 x86_64
Windowing System: Wayland
Distribution: "Arch Linux"
DrKonqi: 6.4.4 [CoredumpBackend]

-- Information about the crash:
Since a few days my desktop crashes when external dispays get disconnected from my laptop. The dispays are connected through a usb4 dock. The laptop is Lenovo P14S with 7840U CPU. It feels like the problem started around the time when I upgreded kwin (6.4.4-1 -> 6.4.4-4). However downgrading it didn't help. At the same time the kernel was upgraded linux (6.16.arch2-1 -> 6.16.3.arch1-1) but downgrading it also didn't help. So sadly I can't pinpoint the exact culprit.

While it's annoying to re-launch all the desktop applications the bigger issue is that upon crashing the desktop environment restarts logged in. So if the laptop wakes up from sleep and the external displays get disconnect anyone can get access to my account after the crash.

The crash can be reproduced every time.

-- Backtrace (Reduced):
#5  0x00007fec858fd763 in KWin::ColorManagementOutputV1::ColorManagementOutputV1 (this=0x55bf04d20b70, client=<optimized out>, id=<optimized out>, version=<optimized out>, output=0x0) at /usr/src/debug/kwin/kwin-6.4.4/src/wayland/colormanagement_v1.cpp:580
#6  KWin::ColorManagerV1::wp_color_manager_v1_get_output (this=<optimized out>, resource=<optimized out>, id=<optimized out>, output=<optimized out>) at /usr/src/debug/kwin/kwin-6.4.4/src/wayland/colormanagement_v1.cpp:63
#7  0x00007fec81399ac6 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#8  0x00007fec8139676b in ffi_call_int (cif=cif@entry=0x7ffe64584700, fn=fn@entry=0x7fec85a19540 <QtWaylandServer::wp_color_manager_v1::handle_get_output(wl_client*, wl_resource*, unsigned int, wl_resource*)>, rvalue=<optimized out>, rvalue@entry=0x0, avalue=avalue@entry=0x7ffe645847d0, closure=closure@entry=0x0) at ../src/x86/ffi64.c:676
#9  0x00007fec8139906e in ffi_call (cif=cif@entry=0x7ffe64584700, fn=0x7fec85a19540 <QtWaylandServer::wp_color_manager_v1::handle_get_output(wl_client*, wl_resource*, unsigned int, wl_resource*)>, rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7ffe645847d0) at ../src/x86/ffi64.c:713
#10 0x00007fec84384532 in wl_closure_invoke (closure=closure@entry=0x55bf03848bb0, target=<optimized out>, target@entry=0x55bf0440a290, opcode=opcode@entry=1, data=<optimized out>, data@entry=0x55bf042db490, flags=2) at ../wayland-1.24.0/src/connection.c:1241
#11 0x00007fec84389d30 in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=<optimized out>) at ../wayland-1.24.0/src/wayland-server.c:483
#12 0x00007fec84388182 in wl_event_loop_dispatch (loop=0x55bf0225b2b0, timeout=<optimized out>) at ../wayland-1.24.0/src/event-loop.c:1059
#13 0x00007fec8590a17a in KWin::Display::dispatchEvents (this=<optimized out>) at /usr/src/debug/kwin/kwin-6.4.4/src/wayland/display.cpp:138
#14 0x00007fec829d37ef in QtPrivate::QSlotObjectBase::call (this=<optimized out>, r=<optimized out>, a=<optimized out>, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
#15 doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, argv=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4146
[...]
#17 QSocketNotifier::activated (this=0x55bf0328f9f0, _t1=..., _t2=<optimized out>, _t3=...) at /usr/src/debug/qt6-base/build/src/corelib/Core_autogen/include/moc_qsocketnotifier.cpp:161
#18 QSocketNotifier::event (this=0x55bf0328f9f0, e=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qsocketnotifier.cpp:327
#19 0x00007fec83d01c70 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55bf0328f9f0, e=0x7ffe64584ff0) at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:3303
#20 0x00007fec82968118 in QCoreApplication::notifyInternal2 (receiver=0x55bf0328f9f0, event=0x7ffe64584ff0) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1106
#21 0x00007fec82b26629 in QCoreApplication::sendEvent (receiver=<optimized out>, event=0x7ffe64584ff0) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1546
#5  0x00007fec858fd763 in KWin::ColorManagementOutputV1::ColorManagementOutputV1 (this=0x55bf04d20b70, client=<optimized out>, id=<optimized out>, version=<optimized out>, output=0x0) at /usr/src/debug/kwin/kwin-6.4.4/src/wayland/colormanagement_v1.cpp:580
#6  KWin::ColorManagerV1::wp_color_manager_v1_get_output (this=<optimized out>, resource=<optimized out>, id=<optimized out>, output=<optimized out>) at /usr/src/debug/kwin/kwin-6.4.4/src/wayland/colormanagement_v1.cpp:63
#7  0x00007fec81399ac6 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#8  0x00007fec8139676b in ffi_call_int (cif=cif@entry=0x7ffe64584700, fn=fn@entry=0x7fec85a19540 <QtWaylandServer::wp_color_manager_v1::handle_get_output(wl_client*, wl_resource*, unsigned int, wl_resource*)>, rvalue=<optimized out>, rvalue@entry=0x0, avalue=avalue@entry=0x7ffe645847d0, closure=closure@entry=0x0) at ../src/x86/ffi64.c:676
#9  0x00007fec8139906e in ffi_call (cif=cif@entry=0x7ffe64584700, fn=0x7fec85a19540 <QtWaylandServer::wp_color_manager_v1::handle_get_output(wl_client*, wl_resource*, unsigned int, wl_resource*)>, rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7ffe645847d0) at ../src/x86/ffi64.c:713
#10 0x00007fec84384532 in wl_closure_invoke (closure=closure@entry=0x55bf03848bb0, target=<optimized out>, target@entry=0x55bf0440a290, opcode=opcode@entry=1, data=<optimized out>, data@entry=0x55bf042db490, flags=2) at ../wayland-1.24.0/src/connection.c:1241
#11 0x00007fec84389d30 in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=<optimized out>) at ../wayland-1.24.0/src/wayland-server.c:483
#12 0x00007fec84388182 in wl_event_loop_dispatch (loop=0x55bf0225b2b0, timeout=<optimized out>) at ../wayland-1.24.0/src/event-loop.c:1059
#13 0x00007fec8590a17a in KWin::Display::dispatchEvents (this=<optimized out>) at /usr/src/debug/kwin/kwin-6.4.4/src/wayland/display.cpp:138
#14 0x00007fec829d37ef in QtPrivate::QSlotObjectBase::call (this=<optimized out>, r=<optimized out>, a=<optimized out>, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
#15 doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, argv=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4146
[...]
#17 QSocketNotifier::activated (this=0x55bf0328f9f0, _t1=..., _t2=<optimized out>, _t3=...) at /usr/src/debug/qt6-base/build/src/corelib/Core_autogen/include/moc_qsocketnotifier.cpp:161
#18 QSocketNotifier::event (this=0x55bf0328f9f0, e=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qsocketnotifier.cpp:327
#19 0x00007fec83d01c70 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55bf0328f9f0, e=0x7ffe64584ff0) at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:3303
#20 0x00007fec82968118 in QCoreApplication::notifyInternal2 (receiver=0x55bf0328f9f0, event=0x7ffe64584ff0) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1106
#21 0x00007fec82b26629 in QCoreApplication::sendEvent (receiver=<optimized out>, event=0x7ffe64584ff0) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1546


Reported using DrKonqi
Comment 1 pavel.mezentsev 2025-08-28 08:05:36 UTC
Created attachment 184519 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 pavel.mezentsev 2025-08-28 08:43:05 UTC
I forgot to add that the problem doesn't happen all the time. If I only have a terminal and thunderbird open disconnecting the displays works fine. However if I have firefox open (which implies multiple windows and dozens of tabs) the problem can be reproduced reliably.
Comment 3 Nate Graham 2025-08-28 16:43:22 UTC

*** This bug has been marked as a duplicate of bug 504959 ***