SUMMARY As of Plasma 5.23.90, the battery applet will no longer list the applications inhibiting sleep or the screen timeout, although the inhibitors work. The feature worked in 5.23, so I think it may be a regression. STEPS TO REPRODUCE 1. Open Retroarch/MPV/Dragonplayer/Youtube in Chrome 2. Play media (games/videos) 3. Open battery applet in Plasma Panel or Latte Dock. OBSERVED RESULT The applications inhibiting sleep are not listed in the battery applet anymore. However, sleep is inhibited by the applications as they normally would. EXPECTED RESULT Chromium/Retroarch/Dragonplayer would be listed in the battery applet if something is playing. SOFTWARE/OS VERSIONS Operating System: openSUSE Leap 15.3 KDE Plasma Version: 5.23.90 KDE Frameworks Version: 5.90.0 Qt Version: 5.15.2 Kernel Version: 5.3.18-150300.59.43-default (64-bit) Graphics Platform: X11 Processors: 4 × Intel® Core™ i5-3320M CPU @ 2.60GHz Memory: 7.6 GiB of RAM Graphics Processor: Mesa DRI Intel® HD Graphics 4000
Created attachment 146290 [details] Vivaldi playing music, inhibiting sleep, doesn't appear in applet.
I suppose this was fixed in https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1377 Apart from that, it also happens to my laptop that after waking up from sleep Plasma's data engine doesn't get any inhibitions to list. The problem might be in the integration glue or in the underlying D-Bus services. When you think inhibitions do exist but are not listed, please post screenshots of the following: - open of Plasma Engine Explorer with "powermanagement" data engine selected, request/update "Inhibitions" data source and expand it in tree view; - open Qt D-Bus Viewer, then: * switch to Session Bus tab; * search for org.freedesktop.PowerManagement.Inhibit service; * in the right pane navigate to object org/kde/Solid/PowerManagement/PolicyAgent * expand the org.kde.Solid.PowerManagement.PolicyAgent interface (the one with italic font) * click on ListInhibitions method. * for testing purposes, click on AddInhibition method, enter any non-empty string in second and third arguments (app id and reason), and click OK. Few seconds later verify that inhibition this 'fake' inhibition should appear in the ListInhibitions's output.
Created attachment 146293 [details] ListInhibitions dbus method ListInhibitions method successfully shows Vivaldi (web browser) inhibit sleep while playing a video.
Created attachment 146294 [details] ListInhibitions dbus method (fake inhibitor 'foo' 'bar') The fake inhibitor shows up in Dbus Viewer as well. Still isn't reflected in the battery applet.
Created attachment 146309 [details] Plasma Engine Explorer, Inhibitions data source doesn't expand. I've just realized that this was to be done in Plasma Engine Explorer than Qt5 Dbus Viewer. My apologies.
> I've just realized that this was to be done in Plasma Engine Explorer than Qt5 Dbus Viewer. My apologies. I was asking for both, so you did everything right. Thank you! > Plasma Engine Explorer, Inhibitions data source doesn't expand. Just to clarify: I see you typed in "Inhibitions" in the source name, so I assume you explicitly "Request"ed it, and it still does not expand, correct? If so, then it rules out the possibility of a bug in applet frontend, and we gotta investigate data providers.
(In reply to ratijas from comment #6) > > I've just realized that this was to be done in Plasma Engine Explorer than Qt5 Dbus Viewer. My apologies. > > I was asking for both, so you did everything right. Thank you! > > > Plasma Engine Explorer, Inhibitions data source doesn't expand. > > Just to clarify: I see you typed in "Inhibitions" in the source name, so I > assume you explicitly "Request"ed it, and it still does not expand, correct? > If so, then it rules out the possibility of a bug in applet frontend, and we > gotta investigate data providers. That assumption is correct. I clicked on the entry and it didn't expand, so I tried manually typing it in.
> That assumption is correct. I clicked on the entry and it didn't expand, so I tried manually typing it in. Yeah, that's pretty stupid on engine explorer side. It should provide some UI means to understand that data source is not connected, and show a "Connect" button instead of requiring manual typing or context menu. // TODO for myself: overhaul the Plasma Engine Explorer UI/UX
Created attachment 146367 [details] Vivaldi playing Youtube video, inhibiting sleep, shown in 'Display Configuration' applet. Apparently, this information is shown in the 'Display Configuration' applet instead of the Battery Applet. The 'Wakelock' for Chromium shows up there while playing a video (see screenshot). This may not be a bug after all, but a 'questionable' redesign. I found this out by mistake and Display Configuration applet is not visible by default. It isn't as discoverable as when it was in the Battery Applet. ~~Also, why is Presentation Mode in both the Battery Applet and the Display Configuration applet, but the Wakelock only shown in the latter?~~ Should I close this bug?
> Display Configuration I… didn't even knew such applet exists. > This may not be a bug after all, but a 'questionable' redesign. I found this out by mistake and Display Configuration applet is not visible by default. It isn't as discoverable as when it was in the Battery Applet. No, I can assure you there were no plans on removing inhibitions from the «Battery and Brightness» applet. This is most certainly a bug is our data sources on backend part.
(In reply to ratijas from comment #10) > No, I can assure you there were no plans on removing inhibitions from the > «Battery and Brightness» applet. This is most certainly a bug is our data > sources on backend part. Then 'Display Configuration' is reading another data source, as in, its not using the backend?
Created attachment 146372 [details] «Display Configuration» and «Battery and Brightness» applets are fine I glanced at Display Configuration applet and its sources. Looks nice, uses the the same "powermanagement" data engine indeed. The code is moderately horrible, and should be fixed just like B&B applet was. Now I see where's that `inhibitions[0]` thing comes from in B&B, huh… Anyways, works for me (on git master) in both applets just fine, inhibitions are all there. Try building plasma-workspace package from source and see if it helps — are you able to do that without destroying your system? Or, you know what, let's do this: find the PowerManagementItem.qml file in your system — locate(1) utility is your friend, but usually it should be something like /usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/PowerManagementItem.qml — and upload it here or as a snippet on GitLab, so I can compare which version was that. Since inhibitions are present in your Display Configuration applet (and thus in the data engine), I suspect this is the issue that was already fixed in master.
Created attachment 146375 [details] PowerManagementItem.qml for Plasma 5.23.90 OK, I've attached the requested file. Sorry for the late response.
> No, I can assure you there were no plans on removing inhibitions from the «Battery and Brightness» > applet. This is most certainly a bug is our data sources on backend part. What exactly is the bug?
Created attachment 146447 [details] Battery and Brightness applet show sleep inhibiting apps again. I just updated to Plasma 5.24 today. Sleep inhibiting apps are now listed in the 'Battery and Brightness' applet as it did before. It works as expected, so I'll close the bug. @Ratijas, thanks for looking into the matter. You responses were quick and thorough, highly appreciated.
(In reply to Lemuel Simon from comment #15) > Created attachment 146447 [details] > Battery and Brightness applet show sleep inhibiting apps again. > > I just updated to Plasma 5.24 today. Sleep inhibiting apps are now listed in > the 'Battery and Brightness' applet as it did before. It works as expected, > so I'll close the bug. @Ratijas, thanks for looking into the matter. You > responses were quick and thorough, highly appreciated. Uhh...I'm second-guessing here. Applets work but Plasma Engine Explorer still shows nothing if the Inhibitions data source is selected under Power Management. Separate issues, yeah?