Summary: | The Power Management applet displays incorrect description of effects of org.freedesktop.portal.Inhibit | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Wyatt Childers <kdebugs.81do7> |
Component: | Battery Monitor | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | emil.vanherp, kde, kdebugs.81do7, me, natalie_clarius, nate |
Priority: | NOR | ||
Version: | 6.0.4 | ||
Target Milestone: | 1.0 | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Wyatt Childers
2024-05-16 20:02:21 UTC
Is this not a bug in kscreenlocker? If I'm not mistaken the logic which correctly detects the inhibition in the battery monitor is here: https://invent.kde.org/plasma/powerdevil/-/blob/master/applets/batterymonitor/plugin/powermanagementcontrol.cpp But kscreensaver fails to detect that the screen has to be locked: https://invent.kde.org/plasma/kscreenlocker/-/blob/master/powermanagement_inhibition.cpp If org.freedesktop.portal.Inhibit is used with Firefox in Flatpak I see this with dbus-monitor >signal time=1722369868.405491 sender=org.freedesktop.DBus -> destination=:1.1401 serial=4294967295 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired > string ":1.1401" >signal time=1722369868.405515 sender=org.freedesktop.DBus -> destination=:1.1401 serial=4294967295 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost > string ":1.1401" >method call time=1722369869.908031 sender=:1.544 -> destination=org.kde.Solid.PowerManagement serial=13724 path=/org/kde/Solid/PowerManagement/PolicyAgent; interface=org.kde.Solid.PowerManagement.PolicyAgent; member=AddInhibition > uint32 1 > string "org.mozilla.firefox" > string "video-playing" >signal time=1722369874.825363 sender=:1.545 -> destination=(null destination) serial=9434 path=/org/kde/Solid/PowerManagement/PolicyAgent; interface=org.kde.Solid.PowerManagement.PolicyAgent; member=InhibitionsChanged > array [ > struct { > string "org.mozilla.firefox" > string "video-playing" > } > ] > array [ > ] >method call time=1722369874.825737 sender=:1.515 -> destination=org.kde.Solid.PowerManagement.PolicyAgent serial=4342 path=/org/kde/Solid/PowerManagement/PolicyAgent; interface=org.kde.Solid.PowerManagement.PolicyAgent; member=HasInhibition > uint32 4 >method call time=1722369874.827273 sender=:1.535 -> destination=org.kde.Solid.PowerManagement serial=304963 path=/org/kde/Solid/PowerManagement/PolicyAgent; interface=org.kde.Solid.PowerManagement.PolicyAgent; member=ListInhibitions >method call time=1722369874.827313 sender=:1.535 -> destination=org.kde.Solid.PowerManagement serial=304964 path=/org/kde/Solid/PowerManagement/PolicyAgent; interface=org.kde.Solid.PowerManagement.PolicyAgent; member=ListInhibitions >method call time=1722369877.280859 sender=:1.544 -> destination=org.kde.Solid.PowerManagement serial=13727 path=/org/kde/Solid/PowerManagement/PolicyAgent; interface=org.kde.Solid.PowerManagement.PolicyAgent; member=ReleaseInhibition > uint32 920 >signal time=1722369877.281258 sender=:1.545 -> destination=(null destination) serial=9439 path=/org/kde/Solid/PowerManagement/PolicyAgent; interface=org.kde.Solid.PowerManagement.PolicyAgent; member=InhibitionsChanged > array [ > ] > array [ > string "org.mozilla.firefox" > ] >method call time=1722369877.281461 sender=:1.515 -> destination=org.kde.Solid.PowerManagement.PolicyAgent serial=4343 path=/org/kde/Solid/PowerManagement/PolicyAgent; interface=org.kde.Solid.PowerManagement.PolicyAgent; member=HasInhibition > uint32 4 >method call time=1722369877.281671 sender=:1.535 -> destination=org.kde.Solid.PowerManagement serial=304966 path=/org/kde/Solid/PowerManagement/PolicyAgent; interface=org.kde.Solid.PowerManagement.PolicyAgent; member=ListInhibitions >method call time=1722369877.281676 sender=:1.535 -> destination=org.kde.Solid.PowerManagement serial=304967 path=/org/kde/Solid/PowerManagement/PolicyAgent; interface=org.kde.Solid.PowerManagement.PolicyAgent; member=ListInhibitions In the case of Firefox without Flatpak (using org.freedesktop.ScreenSaver it seems) I see this: >>signal time=1722370014.376410 sender=org.freedesktop.DBus -> destination=:1.1405 serial=4294967295 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired > string ":1.1405" >signal time=1722370014.376428 sender=org.freedesktop.DBus -> destination=:1.1405 serial=4294967295 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost > string ":1.1405" >method call time=1722370017.317112 sender=:1.515 -> destination=org.kde.Solid.PowerManagement.PolicyAgent serial=4408 path=/org/kde/Solid/PowerManagement/PolicyAgent; interface=org.kde.Solid.PowerManagement.PolicyAgent; member=AddInhibition > uint32 4 > string "firefox" > string "video-playing" >signal time=1722370022.072171 sender=:1.545 -> destination=(null destination) serial=9486 path=/org/kde/Solid/PowerManagement/PolicyAgent; interface=org.kde.Solid.PowerManagement.PolicyAgent; member=InhibitionsChanged > array [ > struct { > string "firefox" > string "video-playing" > } > ] > array [ > ] >method call time=1722370022.072447 sender=:1.515 -> destination=org.kde.Solid.PowerManagement.PolicyAgent serial=4410 path=/org/kde/Solid/PowerManagement/PolicyAgent; interface=org.kde.Solid.PowerManagement.PolicyAgent; member=HasInhibition > uint32 4 >method call time=1722370022.072457 sender=:1.535 -> destination=org.kde.Solid.PowerManagement serial=305042 path=/org/kde/Solid/PowerManagement/PolicyAgent; interface=org.kde.Solid.PowerManagement.PolicyAgent; member=ListInhibitions >method call time=1722370022.072463 sender=:1.535 -> destination=org.kde.Solid.PowerManagement serial=305043 path=/org/kde/Solid/PowerManagement/PolicyAgent; interface=org.kde.Solid.PowerManagement.PolicyAgent; member=ListInhibitions >method call time=1722370022.168754 sender=:1.515 -> destination=org.kde.Solid.PowerManagement.PolicyAgent serial=4411 path=/org/kde/Solid/PowerManagement/PolicyAgent; interface=org.kde.Solid.PowerManagement.PolicyAgent; member=ReleaseInhibition > uint32 924 >signal time=1722370022.169080 sender=:1.545 -> destination=(null destination) serial=9491 path=/org/kde/Solid/PowerManagement/PolicyAgent; interface=org.kde.Solid.PowerManagement.PolicyAgent; member=InhibitionsChanged > array [ > ] > array [ > string "firefox" > ] >method call time=1722370022.169252 sender=:1.515 -> destination=org.kde.Solid.PowerManagement.PolicyAgent serial=4413 path=/org/kde/Solid/PowerManagement/PolicyAgent; interface=org.kde.Solid.PowerManagement.PolicyAgent; member=HasInhibition > uint32 4 >method call time=1722370022.169629 sender=:1.535 -> destination=org.kde.Solid.PowerManagement serial=305045 path=/org/kde/Solid/PowerManagement/PolicyAgent; interface=org.kde.Solid.PowerManagement.PolicyAgent; member=ListInhibitions >method call time=1722370022.169645 sender=:1.535 -> destination=org.kde.Solid.PowerManagement serial=305046 path=/org/kde/Solid/PowerManagement/PolicyAgent; interface=org.kde.Solid.PowerManagement.PolicyAgent; member=ListInhibitions The only difference I can see is AddInhibition with 4 vs 1. (In reply to Emil from comment #1) > Is this not a bug in kscreenlocker? > > If I'm not mistaken the logic which correctly detects the inhibition in the > battery monitor is here: > > https://invent.kde.org/plasma/powerdevil/-/blob/master/applets/ > batterymonitor/plugin/powermanagementcontrol.cpp > > But kscreensaver fails to detect that the screen has to be locked: > > https://invent.kde.org/plasma/kscreenlocker/-/blob/master/ > powermanagement_inhibition.cpp Does the applet depend on kscreenlocker somehow? (In reply to Wyatt Childers from comment #3) > (In reply to Emil from comment #1) > > Is this not a bug in kscreenlocker? > > > > If I'm not mistaken the logic which correctly detects the inhibition in the > > battery monitor is here: > > > > https://invent.kde.org/plasma/powerdevil/-/blob/master/applets/ > > batterymonitor/plugin/powermanagementcontrol.cpp > > > > But kscreensaver fails to detect that the screen has to be locked: > > > > https://invent.kde.org/plasma/kscreenlocker/-/blob/master/ > > powermanagement_inhibition.cpp > > Does the applet depend on kscreenlocker somehow? No, but if I understand the bug report correctly (and how I experience it) the applet does correctly indicate that screen locking *should* be blocked. Which means it's a bug in kscreenlocker that should also block with org.freedesktop.portal.Inhibit (In reply to Emil from comment #4) > (In reply to Wyatt Childers from comment #3) > > (In reply to Emil from comment #1) > > > Is this not a bug in kscreenlocker? > > > > > > If I'm not mistaken the logic which correctly detects the inhibition in the > > > battery monitor is here: > > > > > > https://invent.kde.org/plasma/powerdevil/-/blob/master/applets/ > > > batterymonitor/plugin/powermanagementcontrol.cpp > > > > > > But kscreensaver fails to detect that the screen has to be locked: > > > > > > https://invent.kde.org/plasma/kscreenlocker/-/blob/master/ > > > powermanagement_inhibition.cpp > > > > Does the applet depend on kscreenlocker somehow? > > No, but if I understand the bug report correctly (and how I experience it) > the applet does correctly indicate that screen locking *should* be blocked. > Which means it's a bug in kscreenlocker that should also block with > org.freedesktop.portal.Inhibit Nate Graham was quite adamant in the Bug 485376 that the power management behavior is right but the applet is wrong. I don't agree with him (https://bugs.kde.org/show_bug.cgi?id=485376#c15), but none the less I filed this bug to request that Plasma at least be consistent by displaying what it's doing. So no, this is not the bug you're looking for. You may want to leave a comment in Bug 485376. You were right all along. But that bug was actually just fixed today. See Bug 486506. With that fixed, I'm not sure if there's anything else to do for this issue specifically, or if all that's left of it is covered by Bug 418433. (In reply to Nate Graham from comment #6) > You were right all along. But that bug was actually just fixed today. See > Bug 486506. > > With that fixed, I'm not sure if there's anything else to do for this issue > specifically, or if all that's left of it is covered by Bug 418433. Great! Let's assume Bug 418433 will take care of any remaining discrepancies. *** This bug has been marked as a duplicate of bug 418433 *** Indeed! |