| Summary: | Plasmashell dies with "wl_registry#85: error 0: invalid global kde_output_device_v2 (7772)" Wayland protocol error on monitor wake-up | ||
|---|---|---|---|
| Product: | [Plasma] plasmashell | Reporter: | Raman Gupta <rocketraman> |
| Component: | general | Assignee: | Plasma Bugs List <plasma-bugs-null> |
| Status: | REPORTED --- | ||
| Severity: | crash | CC: | goffi, kde, kdedev, nate, notmart, roman, spillner, xaver.hugl |
| Priority: | HI | Keywords: | multiscreen, wayland-only |
| Version First Reported In: | 6.4.3 | ||
| Target Milestone: | 1.0 | ||
| Platform: | Fedora RPMs | ||
| OS: | Linux | ||
| See Also: | https://bugs.kde.org/show_bug.cgi?id=512448 | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | gdb backtrace | ||
|
Description
Raman Gupta
2025-07-31 12:50:31 UTC
As the message at the top of the summary says, if something crashed, we need a backtrace of it so we can figure out what's going on. Can you please attach a backtrace of the crash using the coredumpctl command-line program, as detailed in https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl ? Thanks. Created attachment 183707 [details] gdb backtrace As I noted: > When the process is eventually restarted using `systemctl --user restart plasma-plasmashell.service` then plasmashell crashes and restarts, and I see this in the logs: So the crash only happens on the restart, not when the monitors wake. I neglected to take a back trace from Plasma from before the crash, and now I am unable to reproduce the issue. Last few times I have tried it, Plasma outputs the same errors (wl_registry#85: error 0: invalid global kde_output_device_v2), but is killed and restarted successfully by the system without any explicit involvement from me. That raises a question in my mind: is this kill and restart on wake the intended behavior of KDE plasma for sleeping monitors? Attached is the backtrace from the core dump when Plasma failed to restart on its own. I am reinstalling xscreensaver so my monitors don't sleep at all. This issue along with another problem I am encountering where every few seconds my computer makes some kind of peripheral connect/disconnect noise while the monitors are sleeping is highly annoying. Searchable backtrace Thread 1 (Thread 0x7ffa7ac69300 (LWP 654937)): #0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44 #1 0x00007ffa806811e3 in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:89 #2 0x00007ffa80627afe in __GI_raise (sig=6) at ../sysdeps/posix/raise.c:26 #3 0x00007ffa83be8031 in KCrash::defaultCrashHandler (sig=6) at /usr/src/debug/kf6-kcrash-6.16.0-1.fc42.x86_64/src/kcrash.cpp:605 #4 0x00007ffa80627c30 in <signal handler called> () at /lib64/libc.so.6 #5 __syscall_cancel_arch () at ../sysdeps/unix/sysv/linux/x86_64/syscall_cancel.S:52 #6 0x00007ffa8067b9da in __internal_syscall_cancel (a1=<optimized out>, a2=<optimized out>, a3=<optimized out>, a4=<optimized out>, a5=a5@entry=0, a6=a6@entry=4294967295, nr=202) at cancellation.c:49 #7 0x00007ffa8067c04c in __futex_abstimed_wait_common64 (private=0, futex_word=0x559360a7ffa8, expected=<optimized out>, op=<optimized out>, abstime=0x0, cancel=true) at futex-internal.c:57 #8 __futex_abstimed_wait_common (futex_word=futex_word@entry=0x559360a7ffa8, expected=<optimized out>, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at futex-internal.c:87 #9 0x00007ffa8067c0af in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x559360a7ffa8, expected=<optimized out>, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at futex-internal.c:139 #10 0x00007ffa8067e71e in __pthread_cond_wait_common (cond=0x559360a7ff88, mutex=0x559360a7ff60, clockid=0, abstime=0x0) at pthread_cond_wait.c:426 #11 ___pthread_cond_wait (cond=0x559360a7ff88, mutex=0x559360a7ff60) at pthread_cond_wait.c:458 #12 0x00007ffa80ed3aac in QWaitConditionPrivate::wait (this=0x559360a7ff60, deadline=...) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/thread/qwaitcondition_unix.cpp:67 #13 QWaitCondition::wait (this=this@entry=0x7ffa6806c530, mutex=mutex@entry=0x7ffa6806c528, deadline=...) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/thread/qwaitcondition_unix.cpp:145 #14 0x00007ffa81e9b535 in QDBusPendingCallPrivate::waitForFinished (this=this@entry=0x7ffa6806c4e0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/dbus/qdbuspendingcall.cpp:206 #15 0x00007ffa81e51a17 in QDBusConnectionPrivate::sendWithReply (this=0x7ffa6800f360, message=<optimized out>, mode=QDBus::Block, timeout=-1) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/dbus/qdbusintegrator.cpp:2072 #16 0x00007ffa81e33e38 in QDBusConnection::call (this=this@entry=0x7ffc5bd454d0, message=..., mode=mode@entry=QDBus::Block, timeout=timeout@entry=-1) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/dbus/qdbusconnection.cpp:410 #17 0x00007ff97eea84d7 in NetworkManager::NetworkManagerPrivate::retrieveInitialProperties (interfaceName=..., path=<optimized out>) at /usr/src/debug/kf6-networkmanager-qt-6.16.0-1.fc42.x86_64/src/manager.cpp:258 #18 0x00007ff97ee8ed97 in NetworkManager::AccessPoint::AccessPoint (this=<optimized out>, path=..., parent=<optimized out>, this=<optimized out>, path=<optimized out>, parent=<optimized out>) at /usr/src/debug/kf6-networkmanager-qt-6.16.0-1.fc42.x86_64/src/accesspoint.cpp:64 #19 0x00007ff97eecbcad in NetworkManager::WirelessDevicePrivate::accessPointAdded (this=0x55936138db40, accessPoint=...) at /usr/src/debug/kf6-networkmanager-qt-6.16.0-1.fc42.x86_64/src/wirelessdevice.cpp:174 #20 0x00007ffa80d657ba in QtPrivate::QSlotObjectBase::call (this=0x5593614fdaf0, r=0x55936138db40, a=0x7ffc5bd45830) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qobjectdefs_impl.h:461 #21 doActivate<false> (sender=0x55936138dd38, signal_index=3, argv=argv@entry=0x7ffc5bd45830) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qobject.cpp:4146 #22 0x00007ffa80d5c089 in QMetaObject::activate (sender=<optimized out>, m=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffc5bd45830) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qobject.cpp:4206 #23 0x00007ff97ef3ed32 in QMetaObject::activate<void, QDBusObjectPath> (sender=<optimized out>, mo=<optimized out>, local_signal_index=0, ret=0x0, sender=<optimized out>, mo=<optimized out>, local_signal_index=<optimized out>, ret=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs.h:306 #24 OrgFreedesktopNetworkManagerDeviceWirelessInterface::AccessPointAdded (this=<optimized out>, _t1=<optimized out>) at /usr/src/debug/kf6-networkmanager-qt-6.16.0-1.fc42.x86_64/redhat-linux-build/src/KF6NetworkManagerQt_autogen/include/moc_wirelessdeviceinterface.cpp:228 #25 OrgFreedesktopNetworkManagerDeviceWirelessInterface::qt_static_metacall (_o=_o@entry=0x55936138dd38, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=0, _a=_a@entry=0x7ffc5bd45a08) at /usr/src/debug/kf6-networkmanager-qt-6.16.0-1.fc42.x86_64/redhat-linux-build/src/KF6NetworkManagerQt_autogen/include/moc_wirelessdeviceinterface.cpp:125 #26 0x00007ff97ef3fc87 in OrgFreedesktopNetworkManagerDeviceWirelessInterface::qt_metacall (this=0x55936138dd38, _c=<optimized out>, _id=0, _a=0x7ffc5bd45a08) at /usr/src/debug/kf6-networkmanager-qt-6.16.0-1.fc42.x86_64/redhat-linux-build/src/KF6NetworkManagerQt_autogen/include/moc_wirelessdeviceinterface.cpp:208 #27 0x00007ffa81e4aa9e in QDBusConnectionPrivate::deliverCall (this=0x7ffa6800f360, object=0x55936138dd38, msg=..., metaTypes=<optimized out>, slotIdx=5) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/dbus/qdbusintegrator.cpp:1007 #28 0x00007ffa80d5662c in QObject::event (this=<optimized out>, e=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qobject.cpp:1431 #29 0x00007ffa8323d97f in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55936138dd38, e=0x7ffa68259150) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/widgets/kernel/qapplication.cpp:3303 #30 0x00007ffa80cf9f38 in QCoreApplication::notifyInternal2 (receiver=0x55936138dd38, event=0x7ffa68259150) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1106 #31 0x00007ffa80cfa19d in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1546 #32 0x00007ffa80cfdd26 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x55935e1e2d40) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1879 #33 0x00007ffa8101016f in postEventSourceDispatch (s=0x55935e1e9fd0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:246 #34 0x00007ffa7f711880 in g_main_dispatch (context=0x7ffa68000f00) at ../glib/gmain.c:3398 #35 g_main_context_dispatch_unlocked (context=0x7ffa68000f00) at ../glib/gmain.c:4249 #36 0x00007ffa7f71a7c8 in g_main_context_iterate_unlocked (context=context@entry=0x7ffa68000f00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4314 #37 0x00007ffa7f71a973 in g_main_context_iteration (context=0x7ffa68000f00, may_block=1) at ../glib/gmain.c:4379 #38 0x00007ffa8100f9ad in QEventDispatcherGlib::processEvents (this=0x55935e1eabf0, flags=...) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:399 #39 0x00007ffa80d07b03 in QEventLoop::exec (this=this@entry=0x7ffc5bd46050, flags=..., flags@entry=...) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/global/qflags.h:77 #40 0x00007ffa80d03419 in QCoreApplication::exec () at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1449 #41 0x00007ffa814ddbad in QGuiApplication::exec () at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/gui/kernel/qguiapplication.cpp:1986 #42 0x00007ffa8323d8e9 in QApplication::exec () at /usr/src/debug/qt6-qtbase-6.9.1-1.fc42.x86_64/src/widgets/kernel/qapplication.cpp:2570 #43 0x00005593478c696c in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/plasma-workspace-6.4.3-1.fc42.x86_64/shell/main.cpp:188 Warning: 'set logging off', an alias for the command 'set logging enabled', is deprecated. Use 'set logging enabled off'. (In reply to Raman Gupta from comment #2) > Created attachment 183707 [details] > gdb backtrace Thanks for the backtrace, that's useful. I understand there are three intertwined distinct issues. 1. When waking the monitors from sleep, Plasma dies with errors starting with `invalid global kde_output_device_v2` 2. Then, when restarting plasmashell, it crashes 3. The repeated peripheral connect/disconnect sound playing repeatedly. 1 and 2 may be interrelated, I'll let the plasmashell developers take a closer look. The connection sound issue is likely bug 494330. I see you added some information to that report, thanks! > As I noted: > > > When the process is eventually restarted using `systemctl --user restart plasma-plasmashell.service` then plasmashell crashes and restarts, and I see this in the logs: > > So the crash only happens on the restart, not when the monitors wake. I > neglected to take a back trace from Plasma from before the crash, and now I > am unable to reproduce the issue. Last few times I have tried it, Plasma > outputs the same errors (wl_registry#85: error 0: invalid global > kde_output_device_v2), but is killed and restarted successfully by the > system without any explicit involvement from me. That raises a question in > my mind: is this kill and restart on wake the intended behavior of KDE > plasma for sleeping monitors? > > Attached is the backtrace from the core dump when Plasma failed to restart > on its own. > > I am reinstalling xscreensaver so my monitors don't sleep at all. This issue > along with another problem I am encountering where every few seconds my > computer makes some kind of peripheral connect/disconnect noise while the > monitors are sleeping is highly annoying. (In reply to TraceyC from comment #4) > (In reply to Raman Gupta from comment #2) > > Created attachment 183707 [details] > > gdb backtrace > > Thanks for the backtrace, that's useful. I understand there are three > intertwined distinct issues. > 1. When waking the monitors from sleep, Plasma dies with errors starting > with `invalid global kde_output_device_v2` > 2. Then, when restarting plasmashell, it crashes > 3. The repeated peripheral connect/disconnect sound playing repeatedly. > > 1 and 2 may be interrelated, I'll let the plasmashell developers take a > closer look. Almost exactly right -- for the avoidance of doubt on 1 and 2, I've seen it happen in these two ways: 1. When waking the monitors from sleep, Plasma hangs with errors starting with `invalid global kde_output_device_v2` 2. Then, when manually restarting plasmashell, the systemd kill signal doesn't work and it eventually crashes when systemd eventually force kills it (The backtrace above is for this case) OR 1. When waking the monitors from sleep, Plasma dies with errors starting with `invalid global kde_output_device_v2` 2. Systemd restarts it automatically (I don't have a backtrace for this case) > invalid global kde_output_device_v2
So this is a wayland protocol error, and it's plasma's fault. Let's focus on that first, since fixing that has a good chance of preventing the cascade of other failures resulting from it.
Dying is worse than crashing since it won't auto-restart. And sounds like manually restarting causes crashes anyway. Raising the priority to HI. We should make Plasma auto-restart for this case, if we can. That would reduce the pressure. >We should make Plasma auto-restart for this case, if we can. That would reduce the pressure.
I checked and confirmed plasmashell does auto-restart if it encounters a wayland error.
It's possible we hit the protocol error 3 times in a row after restart, but there's nothing to fix there.
----
This bug is a bit messy; we also have a report of an assert if we sigterm whilst in a blocking call to NetworkManager and all the traces relate to that, not the original wayland thing.
I'm pretty sure I've only ever seen Plasma close without re-launching in response to a Wayland protocol error. Maybe the auto-restart behavior isn't working. Is there any way to simulate or intentionally provoke a Wayland protocol error? the backtrace looks like a different issue as seems an assert in the networkmanager applet, while the first issue of this bug seems a wayland protocol error (which makes the app quit, not crash) >Is there any way to simulate or intentionally provoke a Wayland protocol error?
That's why I did, I patched kwin to make it throw an error in response to a specific task manager call then triggered it.
systemd restarted it just fine.
It's possible it changed in Qt at some point, I do recall some changes in that area at some point.
Ok, reducing the severity to that of a normal crash, then. *** Bug 512448 has been marked as a duplicate of this bug. *** Coming here from #512448... I agree that the preconditions and symptoms seem very similar (multiple monitor setup, crash occurs when monitors are waking from sleep, generates the "invalid global kde_output_device_v2" log message), but my issue triggers a normal exit(), not a crash, and seems to be a little more random, occurring on only a low percentage of wakeups, even after the displays were idle overnight, and definitely not crashing/exiting again shortly after a restart. The backtrace attached to this issue is also confusing, and while the subject line mentions "Wayland protocol errors" the posted logs don't include them. The TL;DR on #512448 was that QWaylandEglWindow::UpdateSurface() is triggering a program exit after detecting a protocol issue via QWaylandDisplay::checkWaylandError(). That may very well also be the case for #507691, but it seems like the attached info isn't sufficient to confirm that. *** Bug 513157 has been marked as a duplicate of this bug. *** |