Summary: | powerdevil does not release pending Inhibit cookie if source application exits too quickly | ||
---|---|---|---|
Product: | [Plasma] Powerdevil | Reporter: | Gabriel Marcano <gabemarcano> |
Component: | general | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gabemarcano, nate |
Priority: | NOR | ||
Version: | 5.19.1 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/powerdevil/commit/d21102cc6c7a4db204a29f376ce5eb316ef57a6e | Version Fixed In: | 5.18.6 |
Sentry Crash Report: |
Description
Gabriel Marcano
2020-06-18 04:59:06 UTC
I think the solution is to move the m_busWatcher parts in addInhibitionWithExplicitDBusService and ReleaseInhibition further up, so that they are processed before the functions are short-circuited by the pending checks. This way a service will be registered as soon as we have even a pending request, and thus the pending cookie will be released properly when that service dies or goes away. A possibly relevant merge request was started @ https://invent.kde.org/plasma/powerdevil/-/merge_requests/8 Git commit d21102cc6c7a4db204a29f376ce5eb316ef57a6e by Kai Uwe Broulik. Committed on 19/06/2020 at 17:51. Pushed by broulik into branch 'Plasma/5.18'. Watch DBus service right away to discard pending inhibitions reliably PowerDevil delays applying a power management inhibition by 5 seconds to avoid brief inhibitions to e.g. wake up the screen and similar. However, when an inhibition was posted and the process then quit, we would then still enforce the inhibition as it wasn't explicitly revoked. Fix this by always watching the inhibition sender and remove it from pending when the service goes away. FIXED-IN: 5.18.6 M +12 -14 daemon/powerdevilpolicyagent.cpp https://invent.kde.org/plasma/powerdevil/commit/d21102cc6c7a4db204a29f376ce5eb316ef57a6e |