SUMMARY I noticed the Battery and Brightness applet always ends up in a confusing state after using its "Inhibit automatic sleep and screen locking" feature. I tracked it down to the `powermanagement` data engine calling the `UnInhibit` method with incorrect signature: - [when un-inhibit sleep](https://invent.kde.org/plasma/plasma-workspace/-/blob/master/dataengines/powermanagement/powermanagementjob.cpp#L107) - [when un-inhibit screen locking](https://invent.kde.org/plasma/plasma-workspace/-/blob/master/dataengines/powermanagement/powermanagementjob.cpp#L126) The correct signature should take an unsigned int: - [`org.freedesktop.PowerManagement.UnInhibit`](https://invent.kde.org/plasma/powerdevil/-/blob/master/daemon/org.freedesktop.PowerManagement.Inhibit.xml#L10) - [`org.freedesktop.ScreenSaver.UnInhibit`](https://invent.kde.org/plasma/powerdevil/-/blob/master/daemon/org.freedesktop.ScreenSaver.xml#L30) STEPS TO REPRODUCE 1. Make sure nothing is inhibiting ``` qdbus --literal org.kde.Solid.PowerManagement.PolicyAgent \ /org/kde/Solid/PowerManagement/PolicyAgent \ org.kde.Solid.PowerManagement.PolicyAgent.ListInhibitions ``` 2. Check the "Inhibit automatic sleep and screen locking" box in the Battery and Brightness applet 3. Wait 5 seconds for the inhibition to engage and verify the list of inhibitions. There should be 2 items. 4. Uncheck the "Inhibit automatic sleep and screen locking" box in the Battery and Brightness applet OBSERVED RESULT Inhibitions are **not** released. And if you toggle the checkbox multiple times, there will be many duplicated items in the list. If you run ``` dbus-monitor "destination=org.freedesktop.PowerManagement.Inhibit" "sender=org.freedesktop.PowerManagement.Inhibit" ``` during step 4, the error reply will be captured (something similar to the following): ``` error time=1630903644.048537 sender=:1.414 -> destination=:1.57 error_name=org.freedesktop.DBus.Error.UnknownMethod reply_serial=7813 string "No such method 'UnInhibit' in interface 'org.freedesktop.PowerManagement.Inhibit' at object path '/org/freedesktop/PowerManagement/Inhibit' (signature 'i')" ``` EXPECTED RESULT Inhibitions are released. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.22.5 KDE Frameworks Version: 5.85.0 Qt Version: 5.15.2 Kernel Version: 5.13.13-arch1-1 (64-bit) Graphics Platform: X11 Processors: 12 × Intel® Core™ i7-10750H CPU @ 2.60GHz Memory: 31.1 GiB of RAM Graphics Processor: Mesa Intel® UHD Graphics
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1041
*** This bug has been marked as a duplicate of bug 433675 ***