Bug 496589

Summary: Powerdevil crashes in KScreen::WaylandOutputDevice::kde_output_device_v2_mode()
Product: [Plasma] plasmashell Reporter: andy
Component: Power management & brightnessAssignee: Plasma Bugs List <plasma-bugs>
Status: REPORTED ---    
Severity: crash CC: jpetso, matthew, natalie_clarius, nate, xaver.hugl
Priority: NOR Keywords: drkonqi, multiscreen
Version: 6.2.4   
Target Milestone: 1.0   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/95979/events/62c0329496de4fc8962711303379b592/

Description andy 2024-11-22 18:16:20 UTC
Application: org_kde_powerdevil (6.2.3)

ApplicationNotResponding [ANR]: false
Qt Version: 6.8.0
Frameworks Version: 6.8.0
Operating System: Linux 6.11.8-300.fc41.x86_64 x86_64
Windowing System: Wayland
Distribution: "Fedora release 41 (Forty One)"
DrKonqi: 6.2.3 [CoredumpBackend]

-- Information about the crash:
I hear constant 'bell' type notifications whenever screens are turned off, either 'naturally' i.e. display off timeout expires after screenlocks after inactivity timeout,  or if I manualll lock with meta-L then turn displays off with 'Esc' key. After a while powerdevil, I think or maybe plasmashell ?!?. crashes.

If I leave my PC for a while like this it becomes sluggish when I unlock. If I leave it long enough it is down-right unresponsive to the point I choose or have to reboot to restore usabilty, sometimes forceably using 'magic' sysreq

Has been a problem since Plasma 6.something, but wasn't happening with Plasma 5.

I have a 3 monitor setup.

The crash can be reproduced every time.

-- Backtrace:
Application: KDE Power Management System (org_kde_powerdevil), signal: Aborted


This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.fedoraproject.org/>
Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal]
Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.

warning: core file may not match specified executable file.
[New LWP 4212]
[New LWP 4386]
[New LWP 4249]
[New LWP 4250]
[New LWP 4251]
[New LWP 4242]
[New LWP 4368]
[New LWP 4388]
[New LWP 4385]
[New LWP 4375]
[New LWP 4387]
[New LWP 4390]
[New LWP 4389]
[New LWP 4232]
[New LWP 4378]
[New LWP 4243]
[New LWP 4380]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/libexec/org_kde_powerdevil'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00007f3132480624 in __pthread_kill_implementation () from /lib64/libc.so.6
[Current thread is 1 (Thread 0x7f312acb6d40 (LWP 4212))]
Cannot QML trace cores :(
/usr/share/drkonqi/gdb/python/gdb_preamble/preamble.py:516: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
  boot_time = datetime.utcfromtimestamp(psutil.boot_time()).strftime('%Y-%m-%dT%H:%M:%S')
/usr/share/drkonqi/gdb/python/gdb_preamble/preamble.py:533: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
  'timestamp': datetime.utcnow().isoformat(),
[Current thread is 1 (Thread 0x7f312acb6d40 (LWP 4212))]

Thread 17 (Thread 0x7f310f7fe6c0 (LWP 4380)):
#0  0x00007f31324f4d30 in ppoll () at /lib64/libc.so.6
#1  0x00007f3131e138a3 in g_main_context_iterate_unlocked.isra () at /lib64/libglib-2.0.so.0
#2  0x00007f3131db4783 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007f3132de9de3 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt6Core.so.6
#4  0x00007f3132b0221b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt6Core.so.6
#5  0x00007f3132c18d85 in QThread::exec() () at /lib64/libQt6Core.so.6
#6  0x00007f3132cb638b in QThreadPrivate::start(void*) () at /lib64/libQt6Core.so.6
#7  0x00007f313247e697 in start_thread () at /lib64/libc.so.6
#8  0x00007f313250254c in __clone3 () at /lib64/libc.so.6

Thread 16 (Thread 0x7f31177fe6c0 (LWP 4243)):
#0  0x00007f31324f47fd in poll () at /lib64/libc.so.6
#1  0x00007f31321f8375 in QtWaylandClient::EventThread::run() () at /lib64/libQt6WaylandClient.so.6
#2  0x00007f3132cb638b in QThreadPrivate::start(void*) () at /lib64/libQt6Core.so.6
#3  0x00007f313247e697 in start_thread () at /lib64/libc.so.6
#4  0x00007f313250254c in __clone3 () at /lib64/libc.so.6

Thread 15 (Thread 0x7f31157fa6c0 (LWP 4378)):
#0  0x00007f31324f4d30 in ppoll () at /lib64/libc.so.6
#1  0x00007f3131e138a3 in g_main_context_iterate_unlocked.isra () at /lib64/libglib-2.0.so.0
#2  0x00007f3131db4783 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007f3132de9de3 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt6Core.so.6
#4  0x00007f3132b0221b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt6Core.so.6
#5  0x00007f3132c18d85 in QThread::exec() () at /lib64/libQt6Core.so.6
#6  0x00007f3132cb638b in QThreadPrivate::start(void*) () at /lib64/libQt6Core.so.6
#7  0x00007f313247e697 in start_thread () at /lib64/libc.so.6
#8  0x00007f313250254c in __clone3 () at /lib64/libc.so.6

Thread 14 (Thread 0x7f311cdff6c0 (LWP 4232)):
#0  0x00007f31324f4d30 in ppoll () at /lib64/libc.so.6
#1  0x00007f3131e138a3 in g_main_context_iterate_unlocked.isra () at /lib64/libglib-2.0.so.0
#2  0x00007f3131db4783 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007f3132de9de3 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt6Core.so.6
#4  0x00007f3132b0221b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt6Core.so.6
#5  0x00007f3132c18d85 in QThread::exec() () at /lib64/libQt6Core.so.6
#6  0x00007f3133151681 in QDBusConnectionManager::run() () at /lib64/libQt6DBus.so.6
#7  0x00007f3132cb638b in QThreadPrivate::start(void*) () at /lib64/libQt6Core.so.6
#8  0x00007f313247e697 in start_thread () at /lib64/libc.so.6
#9  0x00007f313250254c in __clone3 () at /lib64/libc.so.6

Thread 13 (Thread 0x7f3101ffb6c0 (LWP 4389)):
#0  0x00007f313247ad69 in __futex_abstimed_wait_common () at /lib64/libc.so.6
#1  0x00007f313247d7b9 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libc.so.6
#2  0x00007f310c4be7dd in cnd_wait () at /lib64/libgallium-24.2.7.so
#3  0x00007f310c49ab6b in util_queue_thread_func () at /lib64/libgallium-24.2.7.so
#4  0x00007f310c4be70c in impl_thrd_routine () at /lib64/libgallium-24.2.7.so
#5  0x00007f313247e697 in start_thread () at /lib64/libc.so.6
#6  0x00007f313250254c in __clone3 () at /lib64/libc.so.6

Thread 12 (Thread 0x7f31017fa6c0 (LWP 4390)):
#0  0x00007f313247ad69 in __futex_abstimed_wait_common () at /lib64/libc.so.6
#1  0x00007f313247d7b9 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libc.so.6
#2  0x00007f310c4be7dd in cnd_wait () at /lib64/libgallium-24.2.7.so
#3  0x00007f310c49ab6b in util_queue_thread_func () at /lib64/libgallium-24.2.7.so
#4  0x00007f310c4be70c in impl_thrd_routine () at /lib64/libgallium-24.2.7.so
#5  0x00007f313247e697 in start_thread () at /lib64/libc.so.6
#6  0x00007f313250254c in __clone3 () at /lib64/libc.so.6

Thread 11 (Thread 0x7f3102ffd6c0 (LWP 4387)):
#0  0x00007f313247ad69 in __futex_abstimed_wait_common () at /lib64/libc.so.6
#1  0x00007f313247d7b9 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libc.so.6
#2  0x00007f310c4be7dd in cnd_wait () at /lib64/libgallium-24.2.7.so
#3  0x00007f310c49ab6b in util_queue_thread_func () at /lib64/libgallium-24.2.7.so
#4  0x00007f310c4be70c in impl_thrd_routine () at /lib64/libgallium-24.2.7.so
#5  0x00007f313247e697 in start_thread () at /lib64/libc.so.6
#6  0x00007f313250254c in __clone3 () at /lib64/libc.so.6

Thread 10 (Thread 0x7f3114ff96c0 (LWP 4375)):
#0  0x00007f31324f4d30 in ppoll () at /lib64/libc.so.6
#1  0x00007f3131e138a3 in g_main_context_iterate_unlocked.isra () at /lib64/libglib-2.0.so.0
#2  0x00007f3131db4783 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007f3132de9de3 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt6Core.so.6
#4  0x00007f3132b0221b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt6Core.so.6
#5  0x00007f3132c18d85 in QThread::exec() () at /lib64/libQt6Core.so.6
#6  0x00007f3132cb638b in QThreadPrivate::start(void*) () at /lib64/libQt6Core.so.6
#7  0x00007f313247e697 in start_thread () at /lib64/libc.so.6
#8  0x00007f313250254c in __clone3 () at /lib64/libc.so.6

Thread 9 (Thread 0x7f3103fff6c0 (LWP 4385)):
#0  0x00007f313247ad69 in __futex_abstimed_wait_common () at /lib64/libc.so.6
#1  0x00007f313247d7b9 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libc.so.6
#2  0x00007f310c4be7dd in cnd_wait () at /lib64/libgallium-24.2.7.so
#3  0x00007f310c49ab6b in util_queue_thread_func () at /lib64/libgallium-24.2.7.so
#4  0x00007f310c4be70c in impl_thrd_routine () at /lib64/libgallium-24.2.7.so
#5  0x00007f313247e697 in start_thread () at /lib64/libc.so.6
#6  0x00007f313250254c in __clone3 () at /lib64/libc.so.6

Thread 8 (Thread 0x7f31027fc6c0 (LWP 4388)):
#0  0x00007f313247ad69 in __futex_abstimed_wait_common () at /lib64/libc.so.6
#1  0x00007f313247d7b9 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libc.so.6
#2  0x00007f310c4be7dd in cnd_wait () at /lib64/libgallium-24.2.7.so
#3  0x00007f310c49ab6b in util_queue_thread_func () at /lib64/libgallium-24.2.7.so
#4  0x00007f310c4be70c in impl_thrd_routine () at /lib64/libgallium-24.2.7.so
#5  0x00007f313247e697 in start_thread () at /lib64/libc.so.6
#6  0x00007f313250254c in __clone3 () at /lib64/libc.so.6

Thread 7 (Thread 0x7f310ffff6c0 (LWP 4368)):
#0  0x00007f31324cab93 in clock_nanosleep@GLIBC_2.2.5 () at /lib64/libc.so.6
#1  0x00007f31324d6bc7 in nanosleep () at /lib64/libc.so.6
#2  0x00007f313250205a in usleep () at /lib64/libc.so.6
#3  0x00007f313214d684 in stabilized_connector_names () at /lib64/libddcutil.so.5
#4  0x00007f313214db0f in ddc_check_displays () at /lib64/libddcutil.so.5
#5  0x00007f313214f021 in ddc_watch_displays_using_udev () at /lib64/libddcutil.so.5
#6  0x00007f3131de5d43 in g_thread_proxy () at /lib64/libglib-2.0.so.0
#7  0x00007f313247e697 in start_thread () at /lib64/libc.so.6
#8  0x00007f313250254c in __clone3 () at /lib64/libc.so.6

Thread 6 (Thread 0x7f3117fff6c0 (LWP 4242)):
#0  0x00007f313247ad69 in __futex_abstimed_wait_common () at /lib64/libc.so.6
#1  0x00007f313247d7b9 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libc.so.6
#2  0x00007f3132cc2e8f in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /lib64/libQt6Core.so.6
#3  0x00007f31321f830e in QtWaylandClient::EventThread::run() () at /lib64/libQt6WaylandClient.so.6
#4  0x00007f3132cb638b in QThreadPrivate::start(void*) () at /lib64/libQt6Core.so.6
#5  0x00007f313247e697 in start_thread () at /lib64/libc.so.6
#6  0x00007f313250254c in __clone3 () at /lib64/libc.so.6

Thread 5 (Thread 0x7f3115ffb6c0 (LWP 4251)):
#0  0x00007f31324f4d30 in ppoll () at /lib64/libc.so.6
#1  0x00007f3131e138a3 in g_main_context_iterate_unlocked.isra () at /lib64/libglib-2.0.so.0
#2  0x00007f3131db9377 in g_main_loop_run () at /lib64/libglib-2.0.so.0
#3  0x00007f312b181662 in gdbus_shared_thread_func.lto_priv () at /lib64/libgio-2.0.so.0
#4  0x00007f3131de5d43 in g_thread_proxy () at /lib64/libglib-2.0.so.0
#5  0x00007f313247e697 in start_thread () at /lib64/libc.so.6
#6  0x00007f313250254c in __clone3 () at /lib64/libc.so.6

Thread 4 (Thread 0x7f31167fc6c0 (LWP 4250)):
#0  0x00007f31324f4d30 in ppoll () at /lib64/libc.so.6
#1  0x00007f3131e138a3 in g_main_context_iterate_unlocked.isra () at /lib64/libglib-2.0.so.0
#2  0x00007f3131db4783 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007f3131db47e1 in glib_worker_main () at /lib64/libglib-2.0.so.0
#4  0x00007f3131de5d43 in g_thread_proxy () at /lib64/libglib-2.0.so.0
#5  0x00007f313247e697 in start_thread () at /lib64/libc.so.6
#6  0x00007f313250254c in __clone3 () at /lib64/libc.so.6

Thread 3 (Thread 0x7f3116ffd6c0 (LWP 4249)):
#0  0x00007f313250031d in syscall () at /lib64/libc.so.6
#1  0x00007f3131ddde1d in g_cond_wait () at /lib64/libglib-2.0.so.0
#2  0x00007f3131d7d68b in g_async_queue_pop_intern_unlocked () at /lib64/libglib-2.0.so.0
#3  0x00007f3131de6a23 in g_thread_pool_spawn_thread () at /lib64/libglib-2.0.so.0
#4  0x00007f3131de5d43 in g_thread_proxy () at /lib64/libglib-2.0.so.0
#5  0x00007f313247e697 in start_thread () at /lib64/libc.so.6
#6  0x00007f313250254c in __clone3 () at /lib64/libc.so.6

Thread 2 (Thread 0x7f31037fe6c0 (LWP 4386)):
#0  0x00007f313247ad69 in __futex_abstimed_wait_common () at /lib64/libc.so.6
#1  0x00007f313247d7b9 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libc.so.6
#2  0x00007f310c4be7dd in cnd_wait () at /lib64/libgallium-24.2.7.so
#3  0x00007f310c49ab6b in util_queue_thread_func () at /lib64/libgallium-24.2.7.so
#4  0x00007f310c4be70c in impl_thrd_routine () at /lib64/libgallium-24.2.7.so
#5  0x00007f313247e697 in start_thread () at /lib64/libc.so.6
#6  0x00007f313250254c in __clone3 () at /lib64/libc.so.6

Thread 1 (Thread 0x7f312acb6d40 (LWP 4212)):
[KCrash Handler]
#4  0x00007f3132480624 in __pthread_kill_implementation () at /lib64/libc.so.6
#5  0x00007f3132427d1e in raise () at /lib64/libc.so.6
#6  0x00007f313240f942 in abort () at /lib64/libc.so.6
#7  0x00007f3132a1b81b in qAbort() () at /lib64/libQt6Core.so.6
#8  0x00007f3132a6cbf8 in qt_message(QtMsgType, QMessageLogContext const&, char const*, __va_list_tag*) () at /lib64/libQt6Core.so.6
#9  0x00007f3132a1cdcd in QMessageLogger::fatal(char const*, ...) const () at /lib64/libQt6Core.so.6
#10 0x00007f312abea73e in QtPrivate::QCallableObject<KScreen::WaylandOutputDevice::kde_output_device_v2_mode(kde_output_device_mode_v2*)::{lambda()#1}, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) [clone .cold] () at /usr/lib64/qt6/plugins/kf6/kscreen/KSC_KWayland.so
#11 0x00007f3132b5bac1 in void doActivate<false>(QObject*, int, void**) () at /lib64/libQt6Core.so.6
#12 0x00007f3130b3c056 in ffi_call_unix64 () at /lib64/libffi.so.8
#13 0x00007f3130b3774d in ffi_call_int.lto_priv () at /lib64/libffi.so.8
#14 0x00007f3130b3a64e in ffi_call () at /lib64/libffi.so.8
#15 0x00007f3133bf510e in wl_closure_invoke.constprop () at /lib64/libwayland-client.so.0
#16 0x00007f3133bf5979 in dispatch_event () at /lib64/libwayland-client.so.0
#17 0x00007f3133bf5d73 in wl_display_dispatch_queue_pending () at /lib64/libwayland-client.so.0
#18 0x00007f31321f81d2 in QtWaylandClient::QWaylandDisplay::flushRequests() () at /lib64/libQt6WaylandClient.so.6
#19 0x00007f3132b4d172 in QObject::event(QEvent*) () at /lib64/libQt6Core.so.6
#20 0x00007f3132af3a38 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib64/libQt6Core.so.6
#21 0x00007f3132af7765 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /lib64/libQt6Core.so.6
#22 0x00007f3132dea68f in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () at /lib64/libQt6Core.so.6
#23 0x00007f3131db328c in g_main_context_dispatch_unlocked.lto_priv () at /lib64/libglib-2.0.so.0
#24 0x00007f3131e137b8 in g_main_context_iterate_unlocked.isra () at /lib64/libglib-2.0.so.0
#25 0x00007f3131db4783 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#26 0x00007f3132de9de3 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt6Core.so.6
#27 0x00007f3132b0221b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt6Core.so.6
#28 0x00007f3132afda2e in QCoreApplication::exec() () at /lib64/libQt6Core.so.6
#29 0x0000556ab8e36d6c in main ()

Reported using DrKonqi
Comment 1 Nate Graham 2024-11-25 20:25:51 UTC
#10 0x00007f312abea73e in QtPrivate::QCallableObject<KScreen::WaylandOutputDevice::kde_output_device_v2_mode(kde_output_device_mode_v2*)::{lambda()#1}, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) [clone .cold] () at /usr/lib64/qt6/plugins/kf6/kscreen/KSC_KWayland.so
#11 0x00007f3132b5bac1 in void doActivate<false>(QObject*, int, void**) () at /lib64/libQt6Core.so.6

Does it happen only when a specific monitor is connected? I.e. if you disconnect one monitor at a time, is there any point at which it stops happening?
Comment 2 Nicolas Fella 2024-12-09 14:18:11 UTC
*** Bug 497101 has been marked as a duplicate of this bug. ***
Comment 3 Nicolas Fella 2024-12-09 14:18:21 UTC
*** Bug 497238 has been marked as a duplicate of this bug. ***
Comment 4 andy 2024-12-16 11:39:36 UTC
(In reply to Nate Graham from comment #1)
> Does it happen only when a specific monitor is connected? I.e. if you
> disconnect one monitor at a time, is there any point at which it stops
> happening?
Yes, it doesn't happen when I unplug the DVI connected monitor. All 3 monitors are same model HP, I have disabled Auto-Detect and Auto Switch input features as they have caused issues, at least historically.  

Graphics card is AMD RX 480 with 2xHDMI, 2xDisplayport, 1xDVI. I use 2xDisplayport and DVI. I don't use HDMI because of this longstanding  issue: https://gitlab.freedesktop.org/drm/amd/-/issues/476