FS#43986 - [qt5-base] All qt5 applications crashes when connecting/disconnecting a HDMI cable

Attached to Project: Arch Linux
Opened by AnAkkk (AnAkkk) - Saturday, 28 February 2015, 17:54 GMT
Last edited by Antonio Rojas (arojas) - Monday, 25 April 2016, 17:22 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 13
Private No

Details

Description:
All qt5 applications are crashes when connecting/disconnecting the HDMI cable to my TV, that includes plasmashell and kwin.


Additional info:
This has been fixed in Qt 5.5, see https://bugreports.qt.io/browse/QTBUG-42985
Three patches are available:
https://codereview.qt-project.org/#/c/105171/ (merged in 5.5)
https://codereview.qt-project.org/#/c/105127/ (should be in 5.4.1?)
https://codereview.qt-project.org/#/c/105128/ (should be in 5.4.1?)

I think only the first patch is needed.
This task depends upon

Closed by  Antonio Rojas (arojas)
Monday, 25 April 2016, 17:22 GMT
Reason for closing:  Fixed
Additional comments about closing:  qt5-base 5.6.0
Comment by Felix Yan (felixonmars) - Sunday, 01 March 2015, 07:40 GMT
All these three patches were merged in the 5.5 branch and I didn't find them in 5.4.1 (I could be wrong if there were backports under different commit). I also saw some dependencies in the codereview page which would bring in even more patches from 5.5 branch. I'll apply them if upstream decided to backport the commits into 5.4 branch.
Comment by Matthias Blaicher (mabl) - Sunday, 05 April 2015, 11:51 GMT
Oh, this drives me nuts as well. But I guess it is not the Arch way to backport the patch? End of May Qt 5.5 will be released...
Comment by Ivan P (Soukyuu) - Sunday, 31 May 2015, 20:11 GMT
Still happening here.

According to the KDE bug report here[1], a workaround should be part of qt 5.4.2
The patch in question (mentioned above) is [2]

[1] https://bugs.kde.org/show_bug.cgi?id=345544#c22
[2] https://codereview.qt-project.org/#/c/111100/
Comment by Matthias Blaicher (mabl) - Tuesday, 02 June 2015, 05:59 GMT
Hi Ivan,
thank you for the heads-up, I was basically eating my nails waiting for the long out Qt 5.5 release. Now, it looks like Qt 5.4.2 will include a workaround. Given that 5.4.2 is nearly out [1], I guess there is no need to cherry-pick the patch for this package 5.4.1.

[1] http://lists.qt-project.org/pipermail/releasing/2015-June/001953.html
Comment by AnAkkk (AnAkkk) - Tuesday, 02 June 2015, 13:08 GMT
The workaround seem to be in the Qt 5.4 git branch, but for some reason it's not in the 5.4.2 one.
Comment by Matthias Blaicher (mabl) - Tuesday, 02 June 2015, 13:22 GMT
I'm going mad... Indeed - I've just downloaded the freshly released 5.4.2 tarball and the patch is indeed missing!

@felixonmars: Can we have the patch applied out of the tree? It looks like its already applied by other distros on 5.4.1...
Comment by Bradley Wilson-Hunt (BradErz) - Wednesday, 03 June 2015, 10:21 GMT
I'm also having the same issue ^^ I'm using DVI though and not HDMI.
Comment by AnAkkk (AnAkkk) - Wednesday, 03 June 2015, 11:49 GMT
  • Field changed: Percent Complete (100% → 0%)
Tested 5.4.2, still crashing, the patch doesn't solve the issue.
Comment by AnAkkk (AnAkkk) - Wednesday, 03 June 2015, 11:52 GMT
#0 0x00007fa1cd8d19b0 in QScreen::handle() const () from /usr/lib/libQt5Gui.so.5
#1 0x00007fa1bc6657db in ?? () from /usr/lib/qt/plugins/platforms/libqxcb.so
#2 0x00007fa1bc678f76 in ?? () from /usr/lib/qt/plugins/platforms/libqxcb.so
#3 0x00007fa1bc6793ff in ?? () from /usr/lib/qt/plugins/platforms/libqxcb.so
#4 0x00007fa1cd9737c4 in ?? () from /usr/lib/libQt5Gui.so.5
#5 0x00007fa1cd973c1b in QFontDatabase::findFont(int, QFontPrivate const*, QFontDef const&, bool) () from /usr/lib/libQt5Gui.so.5
#6 0x00007fa1cd9749ac in QFontDatabase::load(QFontPrivate const*, int) () from /usr/lib/libQt5Gui.so.5
#7 0x00007fa1cd94a275 in QFontPrivate::engineForScript(int) const () from /usr/lib/libQt5Gui.so.5
#8 0x00007fa1cd968981 in QFontMetricsF::leading() const () from /usr/lib/libQt5Gui.so.5
#9 0x00007fa1cdaf8876 in ?? () from /usr/lib/libQt5Gui.so.5
#10 0x00007fa1cdaff753 in QPainter::drawText(QRect const&, int, QString const&, QRect*) () from /usr/lib/libQt5Gui.so.5
#11 0x00007fa1ce0b2ba4 in QStyle::drawItemText(QPainter*, QRect const&, int, QPalette const&, bool, QString const&, QPalette::ColorRole) const () from /usr/lib/libQt5Widgets.so.5
#12 0x00007fa1ba2de023 in ?? () from /usr/lib/qt/plugins/styles/breeze.so
#13 0x00007fa1ba2d21a6 in ?? () from /usr/lib/qt/plugins/styles/breeze.so
#14 0x00007fa1ba2dd0b4 in ?? () from /usr/lib/qt/plugins/styles/breeze.so
#15 0x00007fa1ce1d2dd3 in QMenuBar::paintEvent(QPaintEvent*) () from /usr/lib/libQt5Widgets.so.5
#16 0x00007fa1ce090b98 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#17 0x00007fa1ce1d5cab in QMenuBar::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#18 0x00007fa1ce04e62c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#19 0x00007fa1ce053d10 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#20 0x00007fa1cd38c57b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#21 0x00007fa1ce08a099 in QWidgetPrivate::sendPaintEvent(QRegion const&) () from /usr/lib/libQt5Widgets.so.5
#22 0x00007fa1ce08a6e1 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/libQt5Widgets.so.5
#23 0x00007fa1ce08b36c in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) ()
from /usr/lib/libQt5Widgets.so.5
#24 0x00007fa1ce08b259 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) ()
from /usr/lib/libQt5Widgets.so.5
#25 0x00007fa1ce08a251 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/libQt5Widgets.so.5
#26 0x00007fa1ce05b5d2 in ?? () from /usr/lib/libQt5Widgets.so.5
#27 0x00007fa1ce05b7bc in ?? () from /usr/lib/libQt5Widgets.so.5
#28 0x00007fa1ce07a37f in QWidgetPrivate::syncBackingStore() () from /usr/lib/libQt5Widgets.so.5
#29 0x00007fa1ce090998 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#30 0x00007fa1ce1a1d9b in QMainWindow::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#31 0x00007fa1d011290a in KMainWindow::event(QEvent*) () from /usr/lib/libKF5XmlGui.so.5
#32 0x00007fa1d015ef35 in KXmlGuiWindow::event(QEvent*) () from /usr/lib/libKF5XmlGui.so.5
#33 0x00007fa1ce04e62c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#34 0x00007fa1ce053d10 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#35 0x00007fa1cd38c57b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#36 0x00007fa1ce05c7af in ?? () from /usr/lib/libQt5Widgets.so.5
#37 0x00007fa1ce05d44d in ?? () from /usr/lib/libQt5Widgets.so.5
#38 0x00007fa1ce0a7398 in ?? () from /usr/lib/libQt5Widgets.so.5
#39 0x00007fa1cd3bcc1a in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#40 0x00007fa1cd8af70f in QWindow::screenChanged(QScreen*) () from /usr/lib/libQt5Gui.so.5
#41 0x00007fa1cd8b0605 in QWindowPrivate::emitScreenChangedRecursion(QScreen*) () from /usr/lib/libQt5Gui.so.5
#42 0x00007fa1cd8b3643 in QWindowPrivate::setTopLevelScreen(QScreen*, bool) () from /usr/lib/libQt5Gui.so.5
#43 0x00007fa1cd8b37d5 in QWindow::screenDestroyed(QObject*) () from /usr/lib/libQt5Gui.so.5
#44 0x00007fa1cd3bcaa7 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#45 0x00007fa1cd3bd4bf in QObject::destroyed(QObject*) () from /usr/lib/libQt5Core.so.5
#46 0x00007fa1cd3c4ada in QObject::~QObject() () from /usr/lib/libQt5Core.so.5
#47 0x00007fa1cd8d1999 in QScreen::~QScreen() () from /usr/lib/libQt5Gui.so.5
#48 0x00007fa1cd8995f9 in QPlatformScreen::~QPlatformScreen() () from /usr/lib/libQt5Gui.so.5
#49 0x00007fa1bc658b49 in ?? () from /usr/lib/qt/plugins/platforms/libqxcb.so
#50 0x00007fa1bc64bf59 in ?? () from /usr/lib/qt/plugins/platforms/libqxcb.so
#51 0x00007fa1bc64cbf6 in ?? () from /usr/lib/qt/plugins/platforms/libqxcb.so
#52 0x00007fa1bc64d9e3 in ?? () from /usr/lib/qt/plugins/platforms/libqxcb.so
#53 0x00007fa1cd3bdae1 in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5
#54 0x00007fa1ce04e62c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#55 0x00007fa1ce053d10 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#56 0x00007fa1cd38c57b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#57 0x00007fa1cd38e6b7 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQt5Core.so.5
#58 0x00007fa1cd3e38f3 in ?? () from /usr/lib/libQt5Core.so.5
#59 0x00007fa1c75609fd in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#60 0x00007fa1c7560ce0 in ?? () from /usr/lib/libglib-2.0.so.0
#61 0x00007fa1c7560d8c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#62 0x00007fa1cd3e3cff in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#63 0x00007fa1cd389ffa in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#64 0x00007fa1cd391a4c in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#65 0x00007fa1d117ca99 in kdemain () from /usr/lib/libkdeinit5_konsole.so
#66 0x00007fa1d0dd7790 in __libc_start_main () from /usr/lib/libc.so.6
#67 0x0000000000400779 in _start ()
Comment by Matthias Blaicher (mabl) - Wednesday, 03 June 2015, 12:08 GMT
Indeed. Yesterday I had compiled a patched version of 5.4.1 and still ran into crashes when changing the monitor configuration, albeit things behaved way more stable. (I have a script which takes me from only laptop display to two docked monitors and no laptop screen with intermediate steps to avoid total crashes. Before this patch, kwin still crashed - that disappeared.)

However, the problems do not seem to be resolved perfectly since undocking from the docked configuration (2xexternal screens) still crashes all qt5 programms and drops me back to sddm...

Maybe I'll try Qt 5.5 - its supposed to be binary compatible to the 5.4.2, right?
Comment by AnAkkk (AnAkkk) - Wednesday, 29 July 2015, 19:13 GMT
There are two patches which were merged after Qt 5.5 release:
https://codereview.qt-project.org/#/c/114796/
https://codereview.qt-project.org/#/c/120700/

These should solve more cases of crashes when switching screens. Please add them to the qt5 package :)
Comment by Peter Wu (Lekensteyn) - Thursday, 30 July 2015, 10:43 GMT
Affects kwin_x11, plasmashell and konsole in KF5 as well. Upstream bugs matches the backtrace I get when turning off an external HDMI monitor:

https://bugreports.qt.io/browse/QTBUG-44158 SEGFAULT while resizing the desktop
https://bugreports.qt.io/browse/QTBUG-47385 Crash in XCB Backend after display turned off/on

backtrace for konsole (qt5 rebuilt with symbols):
#5 QXcbScreen::mapFromNative (this=0x0, pos=...) at qxcbscreen.cpp:281
#6 0x00007f9a0f4bf9bd in QXcbWindow::handleButtonPressEvent (this=this@entry=0x1d2e3d0, event_x=event_x@entry=1147, event_y=event_y@entry=242, root_x=root_x@entry=1147, root_y=root_y@entry=271, detail=1, modifiers=..., timestamp=191581564) at qxcbwindow.cpp:2132
#7 0x00007f9a0f4bff2a in QXcbWindow::handleXIMouseEvent (this=0x1d2e3d0, event=0x7f9a080055d0) at qxcbwindow.cpp:2231
#8 0x00007f9a0f4d2f29 in QXcbConnection::xi2HandleEvent (this=this@entry=0x1ba8a50, event=event@entry=0x7f9a080055d0) at qxcbconnection_xi2.cpp:529
#9 0x00007f9a0f4abbd5 in QXcbConnection::handleXcbEvent (this=this@entry=0x1ba8a50, event=event@entry=0x7f9a080055d0) at qxcbconnection.cpp:1079
#10 0x00007f9a0f4ac073 in QXcbConnection::processXcbEvents (this=0x1ba8a50) at qxcbconnection.cpp:1418
#11 0x00007f9a20434eb1 in QObject::event (this=0x1ba8a50, e=<optimized out>) at kernel/qobject.cpp:1246
#12 0x00007f9a2113f00c in QApplicationPrivate::notify_helper (this=this@entry=0x1bb7c90, receiver=receiver@entry=0x1ba8a50, e=e@entry=0x7f9a080054b0) at kernel/qapplication.cpp:3717
#13 0x00007f9a211444e6 in QApplication::notify (this=0x7fff1a5a4f70, receiver=0x1ba8a50, e=0x7f9a080054b0) at kernel/qapplication.cpp:3500
#14 0x00007f9a2040589b in QCoreApplication::notifyInternal (this=0x7fff1a5a4f70, receiver=0x1ba8a50, event=event@entry=0x7f9a080054b0) at kernel/qcoreapplication.cpp:965
#15 0x00007f9a20407c96 in sendEvent (event=0x7f9a080054b0, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:224
#16 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x1b69de0) at kernel/qcoreapplication.cpp:1593
#17 0x00007f9a20408178 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1451
#18 0x00007f9a2045be33 in postEventSourceDispatch (s=0x1bedff0) at kernel/qeventdispatcher_glib.cpp:271
#19 0x00007f9a1a5d5a17 in g_main_dispatch (context=0x7f9a080016f0) at gmain.c:3122
#20 g_main_context_dispatch (context=context@entry=0x7f9a080016f0) at gmain.c:3737
#21 0x00007f9a1a5d5c70 in g_main_context_iterate (context=context@entry=0x7f9a080016f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3808
#22 0x00007f9a1a5d5d1c in g_main_context_iteration (context=0x7f9a080016f0, may_block=may_block@entry=1) at gmain.c:3869
#23 0x00007f9a2045c23f in QEventDispatcherGlib::processEvents (this=0x1bed5f0, flags=...) at kernel/qeventdispatcher_glib.cpp:418
#24 0x00007f9a2040326a in QEventLoop::exec (this=this@entry=0x7fff1a5a4e30, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#25 0x00007f9a2040b20c in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1229
#26 0x00007f9a24261a99 in kdemain () from /usr/lib/libkdeinit5_konsole.so
#27 0x00007f9a23ebc790 in __libc_start_main () from /usr/lib/libc.so.6
#28 0x0000000000400779 in _start ()

Will try the above patches (https://codereview.qt-project.org/114796, https://codereview.qt-project.org/120700)
Comment by Peter Wu (Lekensteyn) - Thursday, 30 July 2015, 22:15 GMT
As reported in https://bugreports.qt.io/browse/QTBUG-44158, the above backtrace (this=0x0) is gone with the two patches applied. plasmashell still crashes though after enabling HDMI1 and disabling LVDS (likely reproducible in other ways):

Thread 1 (Thread 0x7efd84e64800 (LWP 12003)):
[KCrash Handler]
#5 Plasma::Applet::actions (this=this@entry=0x0) at /shared/src/plasma-framework-5.12.0/src/plasma/applet.cpp:571
#6 0x0000000000451099 in ShellCorona::addOutput (this=this@entry=0x1d8ddc0, output=...) at /build/src/plasma-workspace-5.3.2/shell/shellcorona.cpp:843
#7 0x000000000045121f in ShellCorona::outputEnabledChanged (this=0x1d8ddc0) at /build/src/plasma-workspace-5.3.2/shell/shellcorona.cpp:737
#8 0x00007efd7f0cbe77 in call (a=0x7ffe6c136270, r=0x1d8ddc0, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:124
#9 QMetaObject::activate (sender=0x1d58d40, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3703
#10 0x00007efd83d4cf17 in KScreen::Output::apply(QSharedPointer<KScreen::Output> const&) () from /usr/lib/libKF5Screen.so.6
#11 0x00007efd83d3822e in KScreen::Config::apply(QSharedPointer<KScreen::Config> const&) () from /usr/lib/libKF5Screen.so.6
#12 0x00007efd83d3f559 in KScreen::ConfigMonitor::Private::updateConfigs(QSharedPointer<KScreen::Config> const&) () from /usr/lib/libKF5Screen.so.6
#13 0x00007efd83d418a9 in KScreen::ConfigMonitor::Private::edidReady(QDBusPendingCallWatcher*) () from /usr/lib/libKF5Screen.so.6
#14 0x00007efd7f0cbe77 in call (a=0x7ffe6c136670, r=0x2914d90, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:124
#15 QMetaObject::activate (sender=0x48db880, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffe6c136670) at kernel/qobject.cpp:3703
#16 0x00007efd7f0cc7e7 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7efd800dc6e0 <QDBusPendingCallWatcher::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffe6c136670) at kernel/qobject.cpp:3583
#17 0x00007efd7fec2a8f in QDBusPendingCallWatcher::finished (this=<optimized out>, _t1=0x48db880) at .moc/moc_qdbuspendingcall.cpp:148
#18 0x00007efd7fec4165 in _q_finished (this=<optimized out>) at qdbuspendingcall.cpp:488

Needs more testing and debugging.
Comment by Matthias Blaicher (mabl) - Saturday, 01 August 2015, 06:11 GMT
@felixonmars:
I've also tried the two mentioned upstream patches on Qt 5.5 and things improve considerably. Since they are pretty localized, could they be cherry-picked until 5.5.1 is released in September?
Comment by Matthias Blaicher (mabl) - Thursday, 13 August 2015, 11:23 GMT
What is the status on this? Can these be cherry-picked? As I know the Qt release team they will barely make a September release of 5.5.1. In addition, this could give us a chance to get the remaining issues ironed out of Qt5/Plasma.
Comment by Peter Wu (Lekensteyn) - Thursday, 13 August 2015, 20:02 GMT
I'm running for a few weeks with this patch and it is certainly safe to apply it (better than crashing). Have you tested it too Matthias? I am interested in your experience with KF5.

Some other issues (still need to file a Qt5 bug for this):

Upon removal of a HDMI cable, it occured a few times that my laptop panel went blank/off (possibly due to a bug in kscreen). As a result all screens appear as off and kdeinit5 crashes due to a fatal error in Qt:
#6 0x00007fec4b46e93a in abort () from /usr/lib/libc.so.6
#7 0x00007fec4b884f31 in qt_message_fatal (context=..., message=<synthetic pointer>) at global/qlogging.cpp:1575
#8 QMessageLogger::fatal (this=this@entry=0x7ffebe723530, msg=msg@entry=0x7fec4c360f60 "Cannot create window: no screens available") at global/qlogging.cpp:777
#9 0x00007fec4bfdb184 in QWindowPrivate::init (this=0x160e320) at kernel/qwindow.cpp:215
#10 0x00007fec4a12217c in QWidgetWindow::QWidgetWindow (this=0x154c6d0, widget=0x1619410) at kernel/qwidgetwindow.cpp:117
#11 0x00007fec4a0f3c4c in QWidgetPrivate::createTLSysExtra (this=this@entry=0x1521990) at kernel/qwidget.cpp:1490
#12 0x00007fec4a0fd71a in QWidgetPrivate::create_sys (this=this@entry=0x1521990, window=window@entry=0, initializeWindow=initializeWindow@entry=true, destroyOldWindow=destroyOldWindow@entry=true) at kernel/qwidget.cpp:1396
#13 0x00007fec4a0fd8a9 in QWidget::create (this=0x1619410, window=0, initializeWindow=<optimized out>, destroyOldWindow=<optimized out>) at kernel/qwidget.cpp:1311
#14 0x00007fec4a10a901 in QWidgetPrivate::init (this=0x1521990, parentWidget=<optimized out>, f=...) at kernel/qwidget.cpp:1178
#15 0x00007fec4a120d73 in QDesktopWidget::QDesktopWidget (this=0x1619410) at kernel/qdesktopwidget.cpp:131
#16 0x00007fec4a0c235d in QApplication::desktop () at kernel/qapplication.cpp:2870
#17 0x00007fec38d252d9 in ScreenLocker::LockWindow::initialize (this=0x1526790) at /build/src/plasma-workspace-5.3.2/ksmserver/screenlocker/lockwindow.cpp:82
#18 0x00007fec38d18a0a in ScreenLocker::KSldApp::showLockWindow (this=this@entry=0x1589ea0) at /build/src/plasma-workspace-5.3.2/ksmserver/screenlocker/ksldapp.cpp:551
#19 0x00007fec38d1aa3b in ScreenLocker::KSldApp::lock (this=0x1589ea0, establishLock=ScreenLocker::EstablishLock::Delayed) at /build/src/plasma-workspace-5.3.2/ksmserver/screenlocker/ksldapp.cpp:362
#20 0x00007fec4baa5e77 in call (a=0x7ffebe723bc0, r=0x1589ea0, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:124
#21 QMetaObject::activate (sender=0x158e6a0, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3703
#22 0x00007fec37dd2751 in KIdleTime::timeoutReached(int) () from /usr/lib/libKF5IdleTime.so.5
#23 0x00007fec37dd3f80 in ?? () from /usr/lib/libKF5IdleTime.so.5
#24 0x00007fec4baa5fea in QMetaObject::activate (sender=0x158e520, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3718
#25 0x00007fec37dd8be1 in ?? () from /usr/lib/libKF5IdleTime.so.5
#26 0x00007fec37dd8522 in ?? () from /usr/lib/libKF5IdleTime.so.5
#27 0x00007fec37dd887e in ?? () from /usr/lib/libKF5IdleTime.so.5
#28 0x00007fec4ba743ff in QAbstractEventDispatcher::filterNativeEvent (this=<optimized out>, eventType=..., message=message@entry=0x7fec30004070, result=result@entry=0x7ffebe723e88) at kernel/qabstracteventdispatcher.cpp:460
#29 0x00007fec36280554 in QXcbConnection::handleXcbEvent (this=this@entry=0x15092a0, event=event@entry=0x7fec30004070) at qxcbconnection.cpp:996
#30 0x00007fec36281303 in QXcbConnection::processXcbEvents (this=0x15092a0) at qxcbconnection.cpp:1434
#31 0x00007fec4baa6eb1 in QObject::event (this=0x15092a0, e=<optimized out>) at kernel/qobject.cpp:1246
#32 0x00007fec4a0c600c in QApplicationPrivate::notify_helper (this=this@entry=0x14fe510, receiver=receiver@entry=0x15092a0, e=e@entry=0x7fec300040a0) at kernel/qapplication.cpp:3717
#33 0x00007fec4a0cb4e6 in QApplication::notify (this=0x14f32d0, receiver=0x15092a0, e=0x7fec300040a0) at kernel/qapplication.cpp:3500
#34 0x00007fec4ba7789b in QCoreApplication::notifyInternal (this=0x14f32d0, receiver=0x15092a0, event=event@entry=0x7fec300040a0) at kernel/qcoreapplication.cpp:965
#35 0x00007fec4ba79c96 in sendEvent (event=0x7fec300040a0, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:224
#36 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x1489420) at kernel/qcoreapplication.cpp:1593
#37 0x00007fec4ba7a178 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1451
#38 0x00007fec4bacde33 in postEventSourceDispatch (s=0x1541ab0) at kernel/qeventdispatcher_glib.cpp:271
#39 0x00007fec47fbaa17 in g_main_dispatch (context=0x7fec300016f0) at gmain.c:3122
#40 g_main_context_dispatch (context=context@entry=0x7fec300016f0) at gmain.c:3737
#41 0x00007fec47fbac70 in g_main_context_iterate (context=context@entry=0x7fec300016f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3808
#42 0x00007fec47fbad1c in g_main_context_iteration (context=0x7fec300016f0, may_block=may_block@entry=1) at gmain.c:3869
#43 0x00007fec4bace23f in QEventDispatcherGlib::processEvents (this=0x1541a90, flags=...) at kernel/qeventdispatcher_glib.cpp:418
#44 0x00007fec4ba7526a in QEventLoop::exec (this=this@entry=0x7ffebe7244b0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#45 0x00007fec4ba7d20c in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1229
#46 0x00007fec4bfce40c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1528
#47 0x00007fec4a0c2475 in QApplication::exec () at kernel/qapplication.cpp:2977
#48 0x00007fec38cf2f76 in kdemain (argc=1, argv=<optimized out>) at /build/src/plasma-workspace-5.3.2/ksmserver/main.cpp:330


Konsole almost always dissappears now upon disabling an external HDMI screen. Reported at https://bugs.kde.org/show_bug.cgi?id=350876#c3
Workaround:
xdotool search --pid `pidof konsole` | xargs -tn1 xdotool windowmap


The plasma panel appears on the wrong screen. Workaround after such an event:
kquitapp5 plasmashell && kstart5 plasmashell
Comment by Matthias Blaicher (mabl) - Monday, 17 August 2015, 13:52 GMT
Hi Peter,

I'm also applying the two patches and things feel smoother. However there are still issues, e.g. on docking I sometimes get a plasma crash. It's really annoying how long it takes to get rid of this issue. I'm sure 5.5.1 will still be problematic...



Thread 1 (Thread 0x7fb94d385800 (LWP 2638)):
[KCrash Handler]
#5 0x00007fb9377ddc4e in QXcbScreen::mapToNative(QRect const&) const () from /usr/lib/libQt5XcbQpa.so.5
#6 0x00007fb9377e2e23 in QXcbWindow::mapToNative(QRect const&, QXcbScreen const*) const () from /usr/lib/libQt5XcbQpa.so.5
#7 0x00007fb9377e461b in QXcbWindow::propagateSizeHints() () from /usr/lib/libQt5XcbQpa.so.5
#8 0x00007fb9377e948c in QXcbWindow::setGeometry(QRect const&) () from /usr/lib/libQt5XcbQpa.so.5
#9 0x00007fb9476f2c6e in QWindow::setY(int) () from /usr/lib/libQt5Gui.so.5
#10 0x00007fb88b134cd3 in ?? () from /usr/lib/qt/qml/org/kde/plasma/private/notifications/libnotificationshelperplugin.so
#11 0x00007fb88b136290 in ?? () from /usr/lib/qt/qml/org/kde/plasma/private/notifications/libnotificationshelperplugin.so
#12 0x00007fb88b13718c in ?? () from /usr/lib/qt/qml/org/kde/plasma/private/notifications/libnotificationshelperplugin.so
#13 0x00007fb88b13a930 in ?? () from /usr/lib/qt/qml/org/kde/plasma/private/notifications/libnotificationshelperplugin.so
#14 0x00007fb94a2e65d9 in ?? () from /usr/lib/libQt5Qml.so.5
#15 0x00007fb94a26460c in ?? () from /usr/lib/libQt5Qml.so.5
#16 0x00007fb94a265e2c in ?? () from /usr/lib/libQt5Qml.so.5
#17 0x00007fb94a26663d in QV4::QObjectMethod::callInternal(QV4::CallData*) () from /usr/lib/libQt5Qml.so.5
#18 0x00007fb94a27d123 in QV4::Runtime::callProperty(QV4::ExecutionEngine*, int, QV4::CallData*) () from /usr/lib/libQt5Qml.so.5
#19 0x00007fb8900f5d49 in ?? ()
#20 0x0003000000000000 in ?? ()
#21 0x0003000000000014 in ?? ()
#22 0x0003000000000005 in ?? ()
#23 0x0000000005a1a3d0 in ?? ()
#24 0x0000000004f21930 in ?? ()
#25 0x919c28b7b6f41900 in ?? ()
#26 0x00007fb91b0001f0 in ?? ()
#27 0x00007fb91b0001f8 in ?? ()
#28 0x000000000313a710 in ?? ()
#29 0x00007fb94a21d7ba in ?? () from /usr/lib/libQt5Qml.so.5
#30 0x00007fb94a27d123 in QV4::Runtime::callProperty(QV4::ExecutionEngine*, int, QV4::CallData*) () from /usr/lib/libQt5Qml.so.5
#31 0x00007fb8900f195c in ?? ()
#32 0x0003000000000000 in ?? ()
#33 0xbfff800000000000 in ?? ()
#34 0x0003000000000000 in ?? ()
#35 0x0000000004f835e0 in ?? ()
#36 0x00007ffe3805ddb4 in ?? ()
#37 0x0000000005502cd0 in ?? ()
#38 0x00007fb91b000138 in ?? ()
#39 0x00007fb91b000140 in ?? ()
#40 0x000000000313a710 in ?? ()
#41 0x00007fb94a21d7ba in ?? () from /usr/lib/libQt5Qml.so.5
#42 0x00007fb94a30d76f in ?? () from /usr/lib/libQt5Qml.so.5
#43 0x00007fb94a2b3d46 in QQmlBoundSignalExpression::evaluate(void**) () from /usr/lib/libQt5Qml.so.5
#44 0x00007fb94a2b45fb in ?? () from /usr/lib/libQt5Qml.so.5
#45 0x00007fb94a2f0c77 in QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) () from /usr/lib/libQt5Qml.so.5
#46 0x00007fb94a2938bc in QQmlData::signalEmitted(QAbstractDeclarativeData*, QObject*, int, void**) () from /usr/lib/libQt5Qml.so.5
#47 0x00007fb9471bb8f0 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#48 0x00007fb92dbb0547 in ?? () from /usr/lib/qt/qml/org/kde/plasma/core/libcorebindingsplugin.so
#49 0x00007fb92db9c20a in ?? () from /usr/lib/qt/qml/org/kde/plasma/core/libcorebindingsplugin.so
#50 0x00007fb92dbb2a4d in ?? () from /usr/lib/qt/qml/org/kde/plasma/core/libcorebindingsplugin.so
#51 0x00007fb947198ffa in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const () from /usr/lib/libQt5Core.so.5
#52 0x00007fb94719e74d in QMetaObject::invokeMethod(QObject*, char const*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) () from /usr/lib/libQt5Core.so.5
#53 0x00007fb94b63682e in Plasma::DataEngine::connectSource(QString const&, QObject*, unsigned int, Plasma::Types::IntervalAlignment) const () from /usr/lib/libKF5Plasma.so.5
#54 0x00007fb92db9cf73 in ?? () from /usr/lib/qt/qml/org/kde/plasma/core/libcorebindingsplugin.so
#55 0x00007fb92dbb2879 in ?? () from /usr/lib/qt/qml/org/kde/plasma/core/libcorebindingsplugin.so
#56 0x00007fb92dbb4408 in ?? () from /usr/lib/qt/qml/org/kde/plasma/core/libcorebindingsplugin.so
#57 0x00007fb94a2e65d9 in ?? () from /usr/lib/libQt5Qml.so.5
#58 0x00007fb94a26460c in ?? () from /usr/lib/libQt5Qml.so.5
#59 0x00007fb94a265e2c in ?? () from /usr/lib/libQt5Qml.so.5
#60 0x00007fb94a26663d in QV4::QObjectMethod::callInternal(QV4::CallData*) () from /usr/lib/libQt5Qml.so.5
#61 0x00007fb94a27cbf1 in QV4::Runtime::callActivationProperty(QV4::ExecutionEngine*, int, QV4::CallData*) () from /usr/lib/libQt5Qml.so.5
#62 0x00007fb8900f2395 in ?? ()
#63 0x000000000234e7d0 in ?? ()
#64 0x00000000ffffffff in ?? ()
#65 0x00000000ffffffff in ?? ()
#66 0x919c28b7b6f41900 in ?? ()
#67 0x00000000ffffffff in ?? ()
#68 0x000000000234e7d0 in ?? ()
#69 0x00007fb91b000058 in ?? ()
#70 0x00007fb91b000060 in ?? ()
#71 0x000000000313a710 in ?? ()
#72 0x00007fb94a21d7ba in ?? () from /usr/lib/libQt5Qml.so.5
#73 0x00007fb94a30d76f in ?? () from /usr/lib/libQt5Qml.so.5
#74 0x00007fb94a2b3d46 in QQmlBoundSignalExpression::evaluate(void**) () from /usr/lib/libQt5Qml.so.5
#75 0x00007fb94a2b45fb in ?? () from /usr/lib/libQt5Qml.so.5
#76 0x00007fb94a2f0c77 in QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) () from /usr/lib/libQt5Qml.so.5
#77 0x00007fb94a2938bc in QQmlData::signalEmitted(QAbstractDeclarativeData*, QObject*, int, void**) () from /usr/lib/libQt5Qml.so.5
#78 0x00007fb9471bb8f0 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#79 0x00007fb92dbb28f0 in ?? () from /usr/lib/qt/qml/org/kde/plasma/core/libcorebindingsplugin.so
#80 0x00007fb9471bceb1 in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5
#81 0x00007fb94855c00c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#82 0x00007fb9485614e6 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#83 0x00007fb94718d89b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#84 0x00007fb94718fc96 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQt5Core.so.5
#85 0x00007fb9471e3e33 in ?? () from /usr/lib/libQt5Core.so.5
#86 0x00007fb942d5b9fd in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#87 0x00007fb942d5bce0 in ?? () from /usr/lib/libglib-2.0.so.0
#88 0x00007fb942d5bd8c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#89 0x00007fb9471e423f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#90 0x00007fb94718b26a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#91 0x00007fb94719320c in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#92 0x000000000042fe13 in main ()
Comment by Felix Yan (felixonmars) - Tuesday, 18 August 2015, 11:16 GMT
The mentioned two patches were applied in qt5 5.5.0-2.
Comment by Karoly Negyesi (chx) - Saturday, 29 August 2015, 21:22 GMT
This is definitely not fixed. I just ran a full system upgrade and typing alt+f2 and then k-o-n ok, this crashed already. If I try to start Konsole from the menu also by searching for it, then Plasma crashes. Not fun. I can start Konsole from the menu.

I have a docked T420 with an external monitor connected via DVI.
Comment by Peter Wu (Lekensteyn) - Thursday, 15 October 2015, 22:03 GMT
There is some discussion in this upstream bug about a possible fix. Hopefully it can be applied on top of the 5.5.1 release.

https://bugreports.qt.io/browse/QTBUG-42985
Comment by Margot (dmrobotix) - Wednesday, 18 November 2015, 18:34 GMT
This wasn't a huge issue for me until I ran an update a few days ago (10/16/15, I believe) that had a full system upgrade. Now I have this exact problem. When I plug in my HDMI cable, my laptop monitor goes black and so does the external monitor. When I unplug, if I am lucky, my laptop monitor returns but generally it does not have I have to do a hard reboot.

I'm running qt5 5.5.1-3, KDE Plasma 5.4.3-1 on Arch Linux 4.2.5-1. My laptop is an Early 2015 Macbook Pro 13 inch.
Comment by Matthias Blaicher (mabl) - Tuesday, 01 December 2015, 06:31 GMT
It looks like a final fix is slowly emerging from the bug report, it's already at its 21st iteration... Interestingly, someone pointed out in the above bug that Fedora already cherry picked an intermediate version of the patch to Qt 5.5.

Maybe we could do the same? Especially knowing how delayed Qt releases typically are.
Comment by Peter Wu (Lekensteyn) - Saturday, 05 December 2015, 11:49 GMT
The 23th iteration of the patch exists, but it does not apply on the 5.5.1 release. There were some other crash-related patches and refactoring stuff, so I tried the Fedora patches on top of 5.5.1-3:

# From http://pkgs.fedoraproject.org/cgit/qt5-qtbase.git/
patch -d qtbase -p1 -i "$srcdir/qtbase-opensource-src-5.5-disconnect_displays.patch"
patch -d qtbase -p1 -i "$srcdir/138201.patch"

It seems to work much better:

- After connecting a HDMI monitor, previously "krunner" (Alt-F2) would not appear on the old screen and would be placed to the left half of the new screen (which is larger than the laptop screen). Now it is properly positioned and displayed (depending on the focused monitor). (previously I had to workaround: Alt-F2 (krunner), kquitapp5 krunner && kstart5 krunner)
- konsole has not disappeared yet. (previously it would randomly be hidden, workaround: (open new konsole,) xdotool search --pid `pidof konsole` | xargs -tn1 xdotool windowmap)

What remains an issue (but a minor one compared to all crashes):

- The plasma panel with the task bar, etc. is still randomly shown on the wrong screen. Workaround: Alt-F2 (krunner), invoke kquitapp5 plasmashell && kstart5 plasmashell

Other:

- The first time I tested disconnecting the screen, its removal was not detected. Invoking "xrandr" once fixed this for that case (this would trigger some randr events).
Comment by Peter Wu (Lekensteyn) - Friday, 11 December 2015, 20:17 GMT
Qt5/KF5 is still very buggy. It already failed some scenarios:

- Suspend laptop, disconnect monitor, resume.
- Disconnect monitor.
- Connect monitor.

plasmashell has already crashed once. Previously my konsole windows would be hidden, now they just become useless window boxes which can accept input, but the output is not updated. At the moment this includes the context menu which I should supposedly get when right-clicking on the menu bar.

I can only hope that this gets fixed in Qt 5.6...
Comment by Matthias Blaicher (mabl) - Friday, 11 December 2015, 20:25 GMT
You mean with the Fedora patch these issues still remain? How nice... At least the https://codereview.qt-project.org/#/c/138201/ has been merged now. Given that the Qt 5.6 release is planned for February and hence still quite far out, could we cherry pick the merged patch (and its dependencies) to 5.5?
Comment by AnAkkk (AnAkkk) - Monday, 14 December 2015, 14:09 GMT
Felix Yan, please cherry pick the patches, there are still too many issues with connecting external screens, most of which that these patches fix.

I guess these are the needed patches:
https://github.com/qtproject/qtbase/commit/0c33a823c560bdf18a513ae460eea4d7bdf9e115
https://github.com/qtproject/qtbase/commit/a094af001795c9651b299d700a992150d1aba33a
Comment by Felix Yan (felixonmars) - Monday, 14 December 2015, 14:28 GMT
They look complex to me, so I could not comment if it wouldn't cause any issues. Please let me know if upstream backported the patches to 5.5 branch and I'll cherry-pick.
Comment by AnAkkk (AnAkkk) - Monday, 14 December 2015, 14:57 GMT
Apparently this isn't going to be backported:

"(probably) not, there are no new 5.5 releases planned, at least according to https://wiki.qt.io/Qt-5.5-release&quot;
Comment by Peter Wu (Lekensteyn) - Monday, 14 December 2015, 15:33 GMT
It is unfortunately not easy to backport those patches. I tried to, but then had to pull three other related changes and then I still had a conflict so I gave up there and tried the Fedora patch instead. If you have time, maybe you could try building the Qt 5.6 branch and test it?
Comment by Elvis Stansvik (estan) - Saturday, 19 December 2015, 02:32 GMT
It seems Rex Dieter did an update of the Fedora backports of those patches 7 days ago: http://pkgs.fedoraproject.org/cgit/qt5-qtbase.git/commit/?id=7a8506bfbcd3dbf31fdc08627c2aa10570b13493

If Fedora keeps them updated, and they turn out to work well. I think it would be great if Arch could pick them out and use them until 5.6 is out as well. I know it's not the Arch way, but I switch monitors a lot (several times a day) and suffer badly from this bug (bugs?). In january I start work and I need my laptop to work. I'll be switching monitors even more then.
Comment by Matthias Blaicher (mabl) - Saturday, 19 December 2015, 08:46 GMT
I feel your pain. I switch also 5-6 times a day and I fear every darn single time. It's horrible. Unfortunatly, the Dieter Rex updates were for the Fedora master branch which is already at 5.6, while the final patch was not yet merged. There has not yet been a further backport to f23: http://pkgs.fedoraproject.org/cgit/qt5-qtbase.git/log/?h=f23

I'll try to cherry pick myself for the moment... Let you guys know how it went.
Comment by Elvis Stansvik (estan) - Saturday, 19 December 2015, 11:45 GMT
Ah, you're right Mattias, I was looking at the wrong repo. Yes, would be interested in if you have success in picking them to 5.5.1.
Comment by Konstantin Gribov (gross) - Saturday, 19 December 2015, 21:28 GMT
Any progress on it? I'm on qt 5.5.1-6 and plasma 5.5-1, it crashes in 20 to 40% of monitor configuration changes (inserting DisplayPort cable). Sometimes it leaves me without panel but more annoying thing is lockscreen crash.

I think, it's time to patent "Insert HDMI/DP to unlock" feature.
Comment by Elvis Stansvik (estan) - Saturday, 19 December 2015, 21:31 GMT
For what it's worth, I grew desperate and made an amalgamation patch of

"xcb: Handle screen siblings in QXcbVirtualDesktop"
URL: https://codereview.qt-project.org/#/c/140381/
SHA: 8beec998999b0ad7abf3192069c649b64aa999f5

and

"xcb: Use a placeholder QScreen when there are no outputs connected"
URL: https://codereview.qt-project.org/#/c/138201/
SHA: a094af001795c9651b299d700a992150d1aba33a

modified to apply cleanly to 5.5.1 (it's the latter of the two that is supposedly the real fix), and built my own package:

https://www.dropbox.com/s/t62jc3o238durh2/qt5-base-5.5.1-7-x86_64.pkg.tar.xz?dl=0

Here's the modified package source I used, including my patch:

https://www.dropbox.com/sh/3eeu5vkjg50i16l/AACtcaV3-ZXbkh9xLwoou2-8a?dl=0

Unfortunatly, I'm currently getting crashes in Plasma (and/or KWin) quite regularly when changing monitors, even with this patched version. So either I'm lousy at backporting, or I didn't fully understand which earlier patches that has to be included as well. Or the problems I'm seeing currently is not related to the issue fixed by that particular patch. If I'd include more patches though, the patch would go unwieldly big.

But there it is, if anyone wants to try the package and see if it solves their particular problem.
Comment by Elvis Stansvik (estan) - Saturday, 19 December 2015, 22:16 GMT
It could be that I needed to include the "remove caching of screens" patch that is also in 5.6, but from looking at the commit message for that, that in turn depends on the whole high-dpi thing... so if that is the case (that the 138201 will not function quite right without the screen cache removal patch, then I think we're out of luck in getting a proper backport of 138201. Unless some troll really digs in and does it.
Comment by Matthias Blaicher (mabl) - Sunday, 20 December 2015, 08:13 GMT
I'm currently also on a patched version, applying the rather comprehensive patch Błażej Szczygieł proposed in the bug report yesterday.

However, I reproducibly get a plasma crash on VGA screen removal:

#5 0x00007f85642de102 in QV4::QObjectWrapper::wrap(QV4::ExecutionEngine*, QObject*) () from /usr/lib/libQt5Qml.so.5
#6 0x00007f85642625dc in QV4::ExecutionEngine::fromVariant(QVariant const&) () from /usr/lib/libQt5Qml.so.5
#7 0x00007f8564392e79 in QV4::QmlContextWrapper::get(QV4::Managed*, QV4::String*, bool*) () from /usr/lib/libQt5Qml.so.5
#8 0x00007f8564269ef3 in QV4::ExecutionContext::getProperty(QV4::String*) () from /usr/lib/libQt5Qml.so.5
#9 0x00007f85642f5587 in QV4::Runtime::getActivationProperty(QV4::ExecutionEngine*, int) () from /usr/lib/libQt5Qml.so.5

I've also seen that high-DPI thingy... It's really a shame how long the it takes to fix that darn bug. Is nobody else using KDE on Laptops?
Comment by Vyacheslav Stetskevych (tskevy) - Tuesday, 22 December 2015, 19:53 GMT
Upgraded from KDE4 to KDE5 (5.5.1 at the moment) and got bitten by this bug. Plasma panel consistently vanishes when I unplug a VGA monitor. Here's the bug report (was closed as duplicate):  FS#47491 
I'll be waiting for a solution to this, thanks.
Comment by Konstantin Gribov (gross) - Wednesday, 17 February 2016, 14:15 GMT
Any progress on it? Plasma 5 is still useless.
Comment by Elvis Stansvik (estan) - Wednesday, 24 February 2016, 17:40 GMT
As a side note, Ubuntu is now in the process of patching their package, at least with the "xcb: Use a placeholder QScreen when there are no outputs connected" patch, after this heads-up bug report by Qt developer Shawn Rutledge:

https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1548766

I know Arch will probably be fast to adopt Qt 5.6 once it's out, but in case that'll take some time, I think it would be a good idea to patch the Qt 5 package.
Comment by Peter Wu (Lekensteyn) - Saturday, 19 March 2016, 15:40 GMT
Tested with qt5-base 5.6.0-2, connecting a HDMI monitor now correctly positions the krunner (Run) dialog, my tasks panel also does not seem to shift to the wrong monitor anymore. Konsole (and other Qt applications) do not disappear anymore.

Hopefully this case can be closed now. *fingers crossed*
Comment by Jens Adam (byte) - Tuesday, 05 April 2016, 13:27 GMT
Just tested disconnecting the monitor, working fine now.
Comment by Konstantin Gribov (gross) - Tuesday, 05 April 2016, 14:09 GMT
+1, it seems to work on qt 5.6.0-2

Loading...