Bug 511361

Summary: Kwin crashed in KWin::DrmObject::gpu() after detaching display cable
Product: [Plasma] kwin Reporter: FF <pilif.pilif>
Component: platform-drmAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: nate, xaver.hugl
Priority: NOR Keywords: multiscreen
Version First Reported In: 6.5.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.5.1
Sentry Crash Report: https://crash-reports.kde.org/share/issue/2229c3a1957b46c0997fb62cbd0a0e94/
Attachments: kcrash report

Description FF 2025-10-30 07:30:29 UTC
Created attachment 186319 [details]
kcrash report

SUMMARY
kwin crashes when I detach the display / monitor cable from the PC

STEPS TO REPRODUCE
1. on dual monitor setup just detach one of the monitor cables from the PC


OBSERVED RESULT

kwin crash dialog and cascaded crashes of applications such as firefox, thunderbird

EXPECTED RESULT
One can work firther wit the opened programs on the monitor which is left

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux 
KDE Plasma Version: 6.5.0
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2025-10-30 16:56:44 UTC
Thread 1 (Thread 0x7f32c385d400 (LWP 130393)):
[KCrash Handler]
#5  0x00007f32cd4ad563 in KWin::DrmObject::gpu (this=<optimized out>) at /usr/src/debug/kwin/kwin-6.5.0/src/backends/drm/drm_object.cpp:54
#6  KWin::DrmPipeline::gpu (this=<optimized out>) at /usr/src/debug/kwin/kwin-6.5.0/src/backends/drm/drm_pipeline.cpp:471
#7  KWin::DrmPipelineLayer::gpu (this=<optimized out>) at /usr/src/debug/kwin/kwin-6.5.0/src/backends/drm/drm_layer.cpp:109
#8  KWin::DrmPipelineLayer::recommendedSizes (this=<optimized out>) at /usr/src/debug/kwin/kwin-6.5.0/src/backends/drm/drm_layer.cpp:150
#9  0x00007f32cd33b98e in KWin::ItemView::calculateViewport (this=this@entry=0x5567ec0d08a0, itemRect=...) at /usr/src/debug/kwin/kwin-6.5.0/src/scene/scene.cpp:247
#10 0x00007f32cd33bd56 in KWin::ItemTreeView::viewport (this=0x5567ec0d08a0) at /usr/src/debug/kwin/kwin-6.5.0/src/scene/scene.cpp:388
#11 0x00007f32cd3278ca in KWin::Item::scheduleRepaintInternal (this=this@entry=0x5567eabd3380, region=...) at /usr/src/debug/kwin/kwin-6.5.0/src/scene/item.cpp:450
#12 0x00007f32cd327a40 in KWin::Item::scheduleRepaint (this=this@entry=0x5567eabd3380, region=...) at /usr/src/debug/kwin/kwin-6.5.0/src/scene/item.cpp:429
#13 0x00007f32cd327a8d in KWin::Item::scheduleRepaint (this=0x5567eabd3380, region=...) at /usr/src/debug/kwin/kwin-6.5.0/src/scene/item.cpp:611
#14 0x00007f32cd33c16b in KWin::ItemTreeView::~ItemTreeView (this=<optimized out>, this=<optimized out>) at /usr/src/debug/kwin/kwin-6.5.0/src/scene/scene.cpp:378
#15 0x00007f32cd33c1a6 in KWin::ItemTreeView::~ItemTreeView (this=<optimized out>, this=<optimized out>) at /usr/src/debug/kwin/kwin-6.5.0/src/scene/scene.cpp:380
#16 0x00007f32cd190da6 in std::default_delete<KWin::ItemView>::operator() (this=<optimized out>, __ptr=<optimized out>) at /usr/include/c++/15.2.1/bits/unique_ptr.h:87
#17 std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> >::~unique_ptr (this=<optimized out>, this=<optimized out>) at /usr/include/c++/15.2.1/bits/unique_ptr.h:399
#18 std::pair<KWin::OutputLayer* const, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> > >::~pair (this=<optimized out>, this=<optimized out>) at /usr/include/c++/15.2.1/bits/stl_pair.h:302
#19 std::destroy_at<std::pair<KWin::OutputLayer* const, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> > > > (__location=0x5567eb7cb9e8) at /usr/include/c++/15.2.1/bits/stl_construct.h:88
#20 std::allocator_traits<std::allocator<std::__detail::_Hash_node<std::pair<KWin::OutputLayer* const, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> > >, false> > >::destroy<std::pair<KWin::OutputLayer* const, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> > > > (__a=..., __p=0x5567eb7cb9e8) at /usr/include/c++/15.2.1/bits/alloc_traits.h:698
#21 std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<KWin::OutputLayer* const, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> > >, false> > >::_M_deallocate_node (this=<optimized out>, __n=0x5567eb7cb9e0) at /usr/include/c++/15.2.1/bits/hashtable_policy.h:1572
#22 std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<KWin::OutputLayer* const, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> > >, false> > >::_M_deallocate_nodes (this=0x5567ebe44bd0, __n=0x0) at /usr/include/c++/15.2.1/bits/hashtable_policy.h:1594
#23 std::_Hashtable<KWin::OutputLayer*, std::pair<KWin::OutputLayer* const, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> > >, std::allocator<std::pair<KWin::OutputLayer* const, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> > > >, std::__detail::_Select1st, std::equal_to<KWin::OutputLayer*>, std::hash<KWin::OutputLayer*>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::~_Hashtable (this=<optimized out>, this=<optimized out>) at /usr/include/c++/15.2.1/bits/hashtable.h:1852
#24 0x00007f32cd18f749 in std::unordered_map<KWin::OutputLayer*, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> >, std::hash<KWin::OutputLayer*>, std::equal_to<KWin::OutputLayer*>, std::allocator<std::pair<KWin::OutputLayer* const, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> > > > >::~unordered_map (this=<optimized out>, this=<optimized out>) at /usr/include/c++/15.2.1/bits/unordered_map.h:112
#25 std::pair<KWin::RenderLoop* const, std::unordered_map<KWin::OutputLayer*, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> >, std::hash<KWin::OutputLayer*>, std::equal_to<KWin::OutputLayer*>, std::allocator<std::pair<KWin::OutputLayer* const, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> > > > > >::~pair (this=<optimized out>, this=<optimized out>) at /usr/include/c++/15.2.1/bits/stl_pair.h:302
#26 std::destroy_at<std::pair<KWin::RenderLoop* const, std::unordered_map<KWin::OutputLayer*, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> >, std::hash<KWin::OutputLayer*>, std::equal_to<KWin::OutputLayer*>, std::allocator<std::pair<KWin::OutputLayer* const, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> > > > > > > (__location=0x5567ebe44bc8) at /usr/include/c++/15.2.1/bits/stl_construct.h:88
#27 std::allocator_traits<std::allocator<std::__detail::_Hash_node<std::pair<KWin::RenderLoop* const, std::unordered_map<KWin::OutputLayer*, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> >, std::hash<KWin::OutputLayer*>, std::equal_to<KWin::OutputLayer*>, std::allocator<std::pair<KWin::OutputLayer* const, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> > > > > >, false> > >::destroy<std::pair<KWin::RenderLoop* const, std::unordered_map<KWin::OutputLayer*, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> >, std::hash<KWin::OutputLayer*>, std::equal_to<KWin::OutputLayer*>, std::allocator<std::pair<KWin::OutputLayer* const, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> > > > > > > (__a=..., __p=0x5567ebe44bc8) at /usr/include/c++/15.2.1/bits/alloc_traits.h:698
#28 std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<KWin::RenderLoop* const, std::unordered_map<KWin::OutputLayer*, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> >, std::hash<KWin::OutputLayer*>, std::equal_to<KWin::OutputLayer*>, std::allocator<std::pair<KWin::OutputLayer* const, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> > > > > >, false> > >::_M_deallocate_node (this=0x5567ead55540, __n=0x5567ebe44bc0) at /usr/include/c++/15.2.1/bits/hashtable_policy.h:1572
#29 std::_Hashtable<KWin::RenderLoop*, std::pair<KWin::RenderLoop* const, std::unordered_map<KWin::OutputLayer*, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> >, std::hash<KWin::OutputLayer*>, std::equal_to<KWin::OutputLayer*>, std::allocator<std::pair<KWin::OutputLayer* const, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> > > > > >, std::allocator<std::pair<KWin::RenderLoop* const, std::unordered_map<KWin::OutputLayer*, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> >, std::hash<KWin::OutputLayer*>, std::equal_to<KWin::OutputLayer*>, std::allocator<std::pair<KWin::OutputLayer* const, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> > > > > > >, std::__detail::_Select1st, std::equal_to<KWin::RenderLoop*>, std::hash<KWin::RenderLoop*>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_erase (this=0x5567ead55540, __bkt=<optimized out>, __prev_n=<optimized out>, __n=0x5567ebe44bc0) at /usr/include/c++/15.2.1/bits/hashtable.h:2590
#30 std::_Hashtable<KWin::RenderLoop*, std::pair<KWin::RenderLoop* const, std::unordered_map<KWin::OutputLayer*, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> >, std::hash<KWin::OutputLayer*>, std::equal_to<KWin::OutputLayer*>, std::allocator<std::pair<KWin::OutputLayer* const, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> > > > > >, std::allocator<std::pair<KWin::RenderLoop* const, std::unordered_map<KWin::OutputLayer*, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> >, std::hash<KWin::OutputLayer*>, std::equal_to<KWin::OutputLayer*>, std::allocator<std::pair<KWin::OutputLayer* const, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> > > > > > >, std::__detail::_Select1st, std::equal_to<KWin::RenderLoop*>, std::hash<KWin::RenderLoop*>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::erase (this=this@entry=0x5567ead55540, __k=@0x7fff693300d0: 0x5567eab0d0a0) at /usr/include/c++/15.2.1/bits/hashtable.h:2620
#31 0x00007f32cd18f837 in std::unordered_map<KWin::RenderLoop*, std::unordered_map<KWin::OutputLayer*, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> >, std::hash<KWin::OutputLayer*>, std::equal_to<KWin::OutputLayer*>, std::allocator<std::pair<KWin::OutputLayer* const, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> > > > >, std::hash<KWin::RenderLoop*>, std::equal_to<KWin::RenderLoop*>, std::allocator<std::pair<KWin::RenderLoop* const, std::unordered_map<KWin::OutputLayer*, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> >, std::hash<KWin::OutputLayer*>, std::equal_to<KWin::OutputLayer*>, std::allocator<std::pair<KWin::OutputLayer* const, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> > > > > > > >::erase (this=0x5567ead55540, __x=@0x7fff693300d0: 0x5567eab0d0a0) at /usr/include/c++/15.2.1/bits/unordered_map.h:833
#32 KWin::Compositor::removeOutput (this=0x5567ead554e0, output=0x5567eab0b750) at /usr/src/debug/kwin/kwin-6.5.0/src/compositor.cpp:956
#33 KWin::Compositor::removeOutput (this=0x5567ead554e0, output=0x5567eab0b750) at /usr/src/debug/kwin/kwin-6.5.0/src/compositor.cpp:949
#34 0x00007f32ca7d716f 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
#35 doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, argv=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4255
#36 0x00007f32cd41ed1b in QMetaObject::activate<void, KWin::Output*> (sender=<optimized out>, mo=<optimized out>, local_signal_index=<optimized out>, ret=<optimized out>, sender=<optimized out>, mo=<optimized out>, local_signal_index=<optimized out>, ret=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs.h:319
#37 KWin::Workspace::outputRemoved (this=<optimized out>, _t1=<optimized out>) at /usr/src/debug/kwin/build/src/kwin_autogen/include/moc_workspace.cpp:659
#38 0x00007f32cd4170cf in KWin::Workspace::updateOutputs (this=0x5567eb69c650, outputOrder=...) at /usr/src/debug/kwin/kwin-6.5.0/src/workspace.cpp:1228
#39 0x00007f32cd40edcd in KWin::Workspace::applyOutputConfiguration (this=this@entry=0x5567eb69c650, config=..., outputOrder=std::optional = {...}) at /usr/src/debug/kwin/kwin-6.5.0/src/workspace.cpp:442
#40 0x00007f32cd40f0fe in KWin::Workspace::updateOutputConfiguration (this=this@entry=0x5567eb69c650) at /usr/src/debug/kwin/kwin-6.5.0/src/workspace.cpp:511
#41 0x00007f32cd4101a0 in KWin::Workspace::slotOutputBackendOutputsQueried (this=0x5567eb69c650) at /usr/src/debug/kwin/kwin-6.5.0/src/workspace.cpp:1148
#42 0x00007f32ca7d716f 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
#43 doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, argv=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4255
#44 0x00007f32cd482d30 in KWin::DrmBackend::updateOutputs (this=this@entry=0x7f32bc00f4c0) at /usr/src/debug/kwin/kwin-6.5.0/src/backends/drm/drm_backend.cpp:303
#45 0x00007f32cd484967 in KWin::DrmBackend::handleUdevEvent (this=0x7f32bc00f4c0) at /usr/src/debug/kwin/kwin-6.5.0/src/backends/drm/drm_backend.cpp:203
#46 0x00007f32ca7d716f 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
#47 doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, argv=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4255
#48 0x00007f32ca7e1c40 in QMetaObject::activate<void, QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal> (sender=0x5567eab06160, mo=<optimized out>, local_signal_index=0, ret=0x0) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs.h:319
#49 QSocketNotifier::activated (this=0x5567eab06160, _t1=..., _t2=<optimized out>, _t3=...) at /usr/src/debug/qt6-base/build/src/corelib/Core_autogen/include/moc_qsocketnotifier.cpp:161
#50 QSocketNotifier::event (this=0x5567eab06160, e=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qsocketnotifier.cpp:324
#51 0x00007f32cb9020a0 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x5567eab06160, e=0x7fff69331300) at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:3307
#52 0x00007f32ca76a6c8 in QCoreApplication::notifyInternal2 (receiver=0x5567eab06160, event=0x7fff69331300) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1109
#53 0x00007f32ca92f049 in QCoreApplication::sendEvent (receiver=<optimized out>, event=0x7fff69331300) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1549
#54 QEventDispatcherUNIXPrivate::activateSocketNotifiers (this=this@entry=0x5567ea87c050) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_unix.cpp:276
#55 0x00007f32ca92fb6c in QEventDispatcherUNIX::processEvents (this=<optimized out>, flags=..., flags@entry=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_unix.cpp:498
#56 0x00007f32cb534773 in QUnixEventDispatcherQPA::processEvents (this=<optimized out>, flags=...) at /usr/src/debug/qt6-base/qtbase/src/gui/platform/unix/qunixeventdispatcher.cpp:27
#57 0x00007f32ca775a86 in QEventLoop::processEvents (this=0x7fff693314d0, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:104
#58 QEventLoop::exec (this=0x7fff693314d0, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:186
#59 0x00007f32ca76f171 in QCoreApplication::exec () at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1452
#60 0x00007f32cb8fd31a in QApplication::exec () at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:2574
#61 0x00005567dcc839e4 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kwin/kwin-6.5.0/src/main_wayland.cpp:635
Comment 2 Zamundaaa 2025-10-30 21:17:59 UTC
Should already be fixed with https://invent.kde.org/plasma/kwin/-/commit/f5415995c51d6b0e68087a386e16c2003ba5c314 in 6.5.1