Summary: | powerdevil crashes in KScreen::AbstractDpmsHelper::isSupported() | ||
---|---|---|---|
Product: | [Plasma] Powerdevil | Reporter: | bin.wang |
Component: | general | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | aleixpol, avrunin, brendan.rankin, carloslcastro, dolem.hao, forestix, gbcox, kde, kde, laurent, linuxbugs, me, mwc85.23yp, nate, rdieter, rondo.sp, spamfree93, tagwerk19 |
Priority: | VHI | ||
Version: | 5.27.0 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=466620 | ||
Latest Commit: | https://invent.kde.org/plasma/libkscreen/commit/e6578e710c4fadee8d91429266d46d8864a88b1e | Version Fixed In: | 5.27.3 |
Sentry Crash Report: | |||
Attachments: | Back trace for the crash |
Description
bin.wang
2023-02-21 05:47:41 UTC
I founded some logs with "journalctl --no-pager --grep powerdevil": Jan 07 12:16:45 bin-station dbus-daemon[6219]: [system] Successfully activated service 'org.kde.powerdevil.chargethresholdhelper' Jan 07 12:16:45 bin-station dbus-daemon[6219]: [system] Activating service name='org.kde.powerdevil.backlighthelper' requested by ':1.95' (uid=1000 pid=13478 comm="/usr/lib/org_kde_powerdevil") (using servicehelper) Jan 07 12:16:45 bin-station backlighthelper[14144]: org.kde.powerdevil: no kernel backlight interface found Jan 07 12:16:45 bin-station dbus-daemon[6219]: [system] Successfully activated service 'org.kde.powerdevil.backlighthelper' Jan 07 12:16:45 bin-station org_kde_powerdevil[13478]: org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "Charge thresholds are not supported by the kernel for this hardware" Jan 07 12:16:46 bin-station org_kde_powerdevil[13478]: org.kde.powerdevil: org.kde.powerdevil.backlighthelper.brightness failed Jan 07 12:16:46 bin-station org_kde_powerdevil[13478]: org.kde.powerdevil: DPMS extension not available Jan 07 12:16:47 bin-station systemd[8766]: Started Powerdevil. Jan 07 12:16:47 bin-station org_kde_powerdevil[13478]: org.kde.powerdevil: Handle button events action could not check for screen configuration Jan 07 12:16:47 bin-station org_kde_powerdevil[13478]: org.kde.powerdevil: The profile "AC" tried to activate "DimDisplay" a non-existent action. This is usually due to an installation problem, a configuration problem, or because the action is not supported Jan 07 12:16:47 bin-station org_kde_powerdevil[13478]: org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "Charge thresholds are not supported by the kernel for this hardware" Jan 18 00:00:56 bin-station systemd[8766]: Stopping Powerdevil... Jan 18 00:00:56 bin-station systemd[8766]: Stopped Powerdevil. Jan 18 00:00:56 bin-station systemd[8766]: plasma-powerdevil.service: Consumed 3min 13.522s CPU time. -- Boot d65eca90a93c4ae48b8119ee58633b56 -- Jan 18 00:02:49 bin-station systemd[8063]: Starting Powerdevil... please attach a back trace, see also https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports @David Redondo: I cannot produce the back trace based on the article you provided: 1. I don't know what is the command to start Powerdevil in order to use gdb. 2. I can click the crash icon, but the KDE Crash Report tool dialog disappears in 1-2 seconds with the crash icon so that I'm not able to see the back trace. After leave the PC for half a day, the system tray also breaks: the icons for other progresses are not shown any more. I can only force uninstall Powerdevil as a workaround for now: "sudo pacman -Rdd powerdevil", otherwise the PC is not usable. Perhaps check coredumpctl if there's any dumps collected from org_kde_powerdevil. You can also run it from terminal via /usr/lib/libexec/org_kde_powerdevil (path may vary but it is in libexec not bin) Created attachment 156568 [details]
Back trace for the crash
There is nothing in coredumpctl. I tried to kill all the powerdevil process and use gdb to run it. This time the crash icon doesn't appear in the system tray anymore. Even the process eventually crashes. I attached the back trace for the crash. I noticed something in my log: powerdevil has been failing for at least more than one month before I upgraded KDE to 5.27.0. But since there was no crash icon flashing in the system tray, the system were usable. Since I'm using a desktop, I'm not sure if powerdevil failure affects me. I haven't checked the power management in system settings for a long time so I'm not sure if that was broken as well. But I remember I've set my system not to black screen or lock when I'm not using it, which was a long time ago. Pasting relevant part inline for searchability: #5 0x00007fbb9c266368 in std::_Optional_base_impl<bool, std::_Optional_base<bool, true, true> >::_M_get() const (this=<optimized out>) at /usr/include/c++/12.2.1/optional:482 #6 std::_Optional_base_impl<bool, std::_Optional_base<bool, true, true> >::_M_get() const (this=0x55e8622336a0) at /usr/include/c++/12.2.1/optional:482 #7 std::optional<bool>::operator*() const & (this=0x55e8622336a0) at /usr/include/c++/12.2.1/optional:970 #8 KScreen::AbstractDpmsHelper::isSupported() const (this=0x55e862233690) at /usr/src/debug/libkscreen/libkscreen-5.27.0/src/libdpms/abstractdpmshelper_p.h:32 #9 KScreen::Dpms::isSupported() const (this=<optimized out>) at /usr/src/debug/libkscreen/libkscreen-5.27.0/src/libdpms/dpms.cpp:45 #10 0x00007fbba40c7d70 in PowerDevil::ActionPool::init(PowerDevil::Core*) (this=0x55e8622039a0, parent=parent@entry=0x55e862102010) at /usr/src/debug/powerdevil/powerdevil-5.27.0/daemon/powerdevilactionpool.cpp:93 action = 0x55e862232e80 offers = {d = 0x55e8621f3400} i = {i = 0x55e86221a910} #11 0x00007fbba40cfa9d in PowerDevil::Core::onBackendReady() (this=<optimized out>) at /usr/src/debug/powerdevil/powerdevil-5.27.0/daemon/powerdevilcore.cpp:191 groups = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = std::atomic<int> = { -1 }}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x55e8621be140}, d = 0x55e8621be140}}, <No data fields>} #12 0x00007fbba35a8a71 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffcf818ffb0, r=<optimized out>, this=0x55e8621c0740, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398 receiver = <optimized out> td = <optimized out> receiverInSameThread = <optimized out> senderData = {previous = 0x0, receiver = 0x55e862102010, sender = 0x55e8621f47c0, signal = 9} c = 0x55e8621f2080 connections = {d = 0x55e8621f3600} list = <optimized out> inSenderThread = true highestConnectionId = 3 signalVector = 0x55e8621e6300 currentThreadId = 0x7fbb9d958a80 sp = <optimized out> signal_spy_set = 0x0 empty_argv = {0x0} senderDeleted = false #13 doActivate<false>(QObject*, int, void**) (sender=0x55e8621f47c0, signal_index=9, argv=0x7ffcf818ffb0) at kernel/qobject.cpp:3923 receiver = <optimized out> td = <optimized out> receiverInSameThread = <optimized out> senderData = {previous = 0x0, receiver = 0x55e862102010, sender = 0x55e8621f47c0, signal = 9} c = 0x55e8621f2080 connections = {d = 0x55e8621f3600} list = <optimized out> inSenderThread = true highestConnectionId = 3 signalVector = 0x55e8621e6300 currentThreadId = 0x7fbb9d958a80 sp = <optimized out> signal_spy_set = 0x0 empty_argv = {0x0} senderDeleted = false #14 0x00007fbb9c2bd34b in PowerDevilUPowerBackend::initWithBrightness(bool) (this=<optimized out>, screenBrightnessAvailable=<optimized out>) at /usr/src/debug/powerdevil/powerdevil-5.27.0/daemon/backends/upower/powerdevilupowerbackend.cpp:284 controls = {{d = 0x7fbba36605c0 <QHashData::shared_null>, e = 0x7fbba36605c0 <QHashData::shared_null>}} supported = {i = <optimized out>} #15 0x00007fbba35a8a71 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffcf81901c0, r=<optimized out>, this=0x55e86220c1f0, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398 receiver = <optimized out> td = <optimized out> receiverInSameThread = <optimized out> senderData = {previous = 0x7ffcf8190250, receiver = 0x55e8621f47c0, sender = 0x55e8621f47c0, signal = 14} c = 0x55e8621f5bb0 connections = {d = 0x55e8621f3600} list = <optimized out> inSenderThread = true highestConnectionId = 2 signalVector = 0x55e8621e6300 currentThreadId = 0x7fbb9d958a80 sp = <optimized out> signal_spy_set = 0x0 empty_argv = {0x0} senderDeleted = false #16 doActivate<false>(QObject*, int, void**) (sender=0x55e8621f47c0, signal_index=14, argv=0x7ffcf81901c0) at kernel/qobject.cpp:3923 receiver = <optimized out> td = <optimized out> receiverInSameThread = <optimized out> senderData = {previous = 0x7ffcf8190250, receiver = 0x55e8621f47c0, sender = 0x55e8621f47c0, signal = 14} c = 0x55e8621f5bb0 connections = {d = 0x55e8621f3600} list = <optimized out> inSenderThread = true highestConnectionId = 2 signalVector = 0x55e8621e6300 currentThreadId = 0x7fbb9d958a80 sp = <optimized out> signal_spy_set = 0x0 empty_argv = {0x0} senderDeleted = false #17 0x00007fbb9c2b4494 in PowerDevilUPowerBackend::brightnessSupportQueried(bool) (this=<optimized out>, _t1=<optimized out>) at /usr/src/debug/powerdevil/build/daemon/backends/upower/powerdevilupowerbackend_autogen/EWIEGA46WW/moc_powerdevilupowerbackend.cpp:223 _a = {0x0, 0x7ffcf81901bc} Is this on wayland? m_supported has no value. On X the helper sets m_supported in the constructor. We are calling blockUntilSupported(); beforehand in isSupported. The WaylandHelper does QMetaObject::invokeMethod(m_dpmsManager, "addRegistryListener"); and calls setSupported in connect(this, &DpmsManager::activeChanged, this, [this] { When as a result of "addRegistryListener" the global is not bound the crash happens. I wonder though about the root cause, I can think of two cases but both are not conclusive - if it's queued this would happen, but we use AutoConnection overload and both objects are in the main thread - compositor doesn't have the global, but KWin always creates the interface. A possibly relevant merge request was started @ https://invent.kde.org/plasma/libkscreen/-/merge_requests/103 For that MR I could reproduce it by running it under weston. Please make sure your system is running properly as this could have been a symptom of something else failing, as you claim to be using it with Plasma. A possibly relevant merge request was started @ https://invent.kde.org/plasma/libkscreen/-/merge_requests/105 Git commit 160fff73b6c8e4f2d8cb8141d9c8c53f0b008eaf by Aleix Pol Gonzalez, on behalf of Aleix Pol. Committed on 22/02/2023 at 16:41. Pushed by apol into branch 'master'. dpms/wayland: Explicitly set as unsupported if addRegistryListener didn't find the interface If a org_kde_kwin_dpms_manager wasn't found, setSupported(false) so that the user gets closure. M +2 -2 src/libdpms/abstractdpmshelper_p.h M +4 -1 src/libdpms/waylanddpmshelper.cpp M +1 -1 src/libdpms/waylanddpmshelper_p.h https://invent.kde.org/plasma/libkscreen/commit/160fff73b6c8e4f2d8cb8141d9c8c53f0b008eaf Git commit 1515b6533ffd23218d674ff4222218f846d415c4 by Aleix Pol Gonzalez, on behalf of Aleix Pol. Committed on 22/02/2023 at 16:46. Pushed by ngraham into branch 'Plasma/5.27'. dpms/wayland: Explicitly set as unsupported if addRegistryListener didn't find the interface If a org_kde_kwin_dpms_manager wasn't found, setSupported(false) so that the user gets closure. (cherry picked from commit 160fff73b6c8e4f2d8cb8141d9c8c53f0b008eaf) M +2 -2 src/libdpms/abstractdpmshelper_p.h M +4 -1 src/libdpms/waylanddpmshelper.cpp M +1 -1 src/libdpms/waylanddpmshelper_p.h https://invent.kde.org/plasma/libkscreen/commit/1515b6533ffd23218d674ff4222218f846d415c4 *** Bug 465987 has been marked as a duplicate of this bug. *** *** Bug 466191 has been marked as a duplicate of this bug. *** I know this bug is marked as fixed, but I wanted to point it out, because it has come to my attention, that with the new Linux Kernel 6.1.14 that has just been released, Powerdevil has also started to crash as it was in version 6.2 (also tested with version 6.2.1 and it continues to fail), I am commenting on it because I found it interesting to note that with previous versions of 6.1 (tested up to 6.1.13) this problem did not occur, in case this could give some other important information. Reviewing the KSystemLog log with Kernel 6.1.14, I see that the error it is giving now is not the same as the one with Kernel 6.2, now it is leaving the following error when trying to access the power management configuration: 26/2/23 0:37 systemsettings Failed to query platform profile choices "The name org.kde.Solid.PowerManagement was not provided by any .service files" Sounds like a different issue; please submit a new bug report. Make sure to include a backtrace with debug symbols if Powerdevil is crashing. Sorry, I think I didn't take a good look at the logs before. I don't understand now what is happening, I don't think any KDE component has been updated today. Right now it's also failing me with Kernel 6.1.13 when it didn't fail before, I don't understand it... I have reviewed the logs and I see that it is effectively leaving the same log as in Kernel 6.2. What I don't understand is why this started to fail when a couple of days ago it worked perfectly... Anyway, I'm waiting for KDE 5.27.2 to see if the bug is fixed with the change you've made. *** Bug 466615 has been marked as a duplicate of this bug. *** *** Bug 466697 has been marked as a duplicate of this bug. *** If Bug 466697 is a duplicate, then this needs to be re-opened, since the reporter is using 5.27.2 where it's supposed to be fixed. Instead marking it as a duplicate of Bug 466620, which is the successor. Or we can re-open this and continue to mark everything as a duplicate of it. (In reply to Aleix Pol from comment #23) > *** Bug 466697 has been marked as a duplicate of this bug. *** From that thread.... I have just started seeing the crash happening in F37. It happens when I log in with X11. Not seen it with Wayland. Stack trace of thread 2858: #0 0x00007f34db019e5c __pthread_kill_implementation (libc.so.6 + 0x8ce5c) #1 0x00007f34dafc9a76 raise (libc.so.6 + 0x3ca76) #2 0x00007f34dafb37fc abort (libc.so.6 + 0x267fc) #3 0x00007f34da6d7e80 _ZSt21__glibcxx_assert_failPKciS0_S0_ (libstdc++.so.6 + 0xd7e80) #4 0x00007f34c4e71347 _ZNK7KScreen4Dpms11isSupportedEv (libKF5ScreenDpms.so.8 + 0x9347) #5 0x00007f34dba7a36f _ZN10PowerDevil10ActionPool4initEPNS_4CoreE (libpowerdevilcore.so.2 + 0x1736f) #6 0x00007f34dba81ded _ZN10PowerDevil4Core14onBackendReadyEv (libpowerdevilcore.so.2 + 0x1eded) #7 0x00007f34dacd0e96 _Z10doActivateILb0EEvP7QObjectiPPv (libQt5Core.so.5 + 0x2d0e96) #8 0x00007f34c5d1eafa _ZN23PowerDevilUPowerBackend18initWithBrightnessEb (powerdevilupowerbackend.so + 0x12afa) #9 0x00007f34dacd0e96 _Z10doActivateILb0EEvP7QObjectiPPv (libQt5Core.so.5 + 0x2d0e96) #10 0x00007f34c5d15f53 _ZN23PowerDevilUPowerBackend24brightnessSupportQueriedEb (powerdevilupowerbackend.so + 0x9f53) #11 0x00007f34dacd0e96 _Z10doActivateILb0EEvP7QObjectiPPv (libQt5Core.so.5 + 0x2d0e96) ... (In reply to tagwerk19 from comment #25) > (In reply to Aleix Pol from comment #23) > > *** Bug 466697 has been marked as a duplicate of this bug. *** > From that thread.... > > I have just started seeing the crash happening in F37. > > It happens when I log in with X11. Not seen it with Wayland. > > Stack trace of thread 2858: > #0 0x00007f34db019e5c __pthread_kill_implementation (libc.so.6 + > 0x8ce5c) > #1 0x00007f34dafc9a76 raise (libc.so.6 + 0x3ca76) > #2 0x00007f34dafb37fc abort (libc.so.6 + 0x267fc) > #3 0x00007f34da6d7e80 _ZSt21__glibcxx_assert_failPKciS0_S0_ > (libstdc++.so.6 + 0xd7e80) > #4 0x00007f34c4e71347 _ZNK7KScreen4Dpms11isSupportedEv > (libKF5ScreenDpms.so.8 + 0x9347) > #5 0x00007f34dba7a36f _ZN10PowerDevil10ActionPool4initEPNS_4CoreE > (libpowerdevilcore.so.2 + 0x1736f) > #6 0x00007f34dba81ded _ZN10PowerDevil4Core14onBackendReadyEv > (libpowerdevilcore.so.2 + 0x1eded) > #7 0x00007f34dacd0e96 _Z10doActivateILb0EEvP7QObjectiPPv > (libQt5Core.so.5 + 0x2d0e96) > #8 0x00007f34c5d1eafa > _ZN23PowerDevilUPowerBackend18initWithBrightnessEb > (powerdevilupowerbackend.so + 0x12afa) > #9 0x00007f34dacd0e96 _Z10doActivateILb0EEvP7QObjectiPPv > (libQt5Core.so.5 + 0x2d0e96) > #10 0x00007f34c5d15f53 > _ZN23PowerDevilUPowerBackend24brightnessSupportQueriedEb > (powerdevilupowerbackend.so + 0x9f53) > #11 0x00007f34dacd0e96 _Z10doActivateILb0EEvP7QObjectiPPv > (libQt5Core.so.5 + 0x2d0e96) > ... I can confirm this is now happening in F37, and appears to be limited to X11 at this time. I'm experiencing when using VNC remote console which is limted to X11. Here is the Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=2174951 As I just wrote in this related bug: https://bugs.kde.org/show_bug.cgi?id=466620 After installing the new kernel 6.2.2 my problems with the Powerdevil on Wayland have disappeared. Please, try yourselves to see if with luck this also solves you. Sorry, not true, the new kernel doesn't fix the Powerdevil problem. Please look at the bug: https://bugs.kde.org/show_bug.cgi?id=466620 Where you can find an explanation of what happened when I did the test and why it worked for me. (In reply to Nate Graham from comment #24) > If Bug 466697 is a duplicate, then this needs to be re-opened, since the > reporter is using 5.27.2 where it's supposed to be fixed. Instead marking it > as a duplicate of Bug 466620, which is the successor. > > Or we can re-open this and continue to mark everything as a duplicate of it. Yes, as you mention, this bug should be reopened. The Fedora bug I referenced refers to: powerdevil-5.27.2-1.fc37.x86_64 A possibly relevant merge request was started @ https://invent.kde.org/plasma/libkscreen/-/merge_requests/113 Git commit 5cd9e09fb3075734ece547b65fe4039626891330 by Aleix Pol. Committed on 05/03/2023 at 01:50. Pushed by apol into branch 'Plasma/5.27'. dpms/xcb: Make sure we are setting it as unsupported when it is Otherwise it might end up waiting for the support. M +2 -4 src/libdpms/xcbdpmshelper.cpp https://invent.kde.org/plasma/libkscreen/commit/5cd9e09fb3075734ece547b65fe4039626891330 Git commit e6578e710c4fadee8d91429266d46d8864a88b1e by Aleix Pol Gonzalez, on behalf of Aleix Pol. Committed on 05/03/2023 at 15:31. Pushed by apol into branch 'master'. dpms/xcb: Make sure we are setting it as unsupported when it is Otherwise it might end up waiting for the support. (cherry picked from commit 5cd9e09fb3075734ece547b65fe4039626891330) M +2 -4 src/libdpms/xcbdpmshelper.cpp https://invent.kde.org/plasma/libkscreen/commit/e6578e710c4fadee8d91429266d46d8864a88b1e *** Bug 466620 has been marked as a duplicate of this bug. *** *** Bug 466697 has been marked as a duplicate of this bug. *** *** Bug 466808 has been marked as a duplicate of this bug. *** *** Bug 466904 has been marked as a duplicate of this bug. *** *** Bug 466800 has been marked as a duplicate of this bug. *** *** Bug 465399 has been marked as a duplicate of this bug. *** No longer crashes in my test case ... ... Fedora 37 with Plasma 5.27.3 in a KVM guest, QXL video and X11. Had been repeatedly crashing in a loop. Thank you... No errors on my end either, in this case a KDE 5.27.3 with Wayland, so the error seems to be fixed. Thanks for your great support. Yay! *** Bug 467552 has been marked as a duplicate of this bug. *** |