Bug 487706 - "Presentation mode" wont disappear from the list of inhibitions when disabled from System Tray -> Display Configuration
Summary: "Presentation mode" wont disappear from the list of inhibitions when disabled...
Status: RESOLVED FIXED
Alias: None
Product: Powerdevil
Classification: Plasma
Component: general (show other bugs)
Version: 6.0.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-28 18:47 UTC by dclark16+bugs.kde
Modified: 2024-06-08 03:37 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.1.0
Sentry Crash Report:


Attachments
Screenshot showing the problem (44.88 KB, image/png)
2024-05-28 18:47 UTC, dclark16+bugs.kde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dclark16+bugs.kde 2024-05-28 18:47:44 UTC
Created attachment 169920 [details]
Screenshot showing the problem

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
Bug spotted with the "Enable Presentation mode" toggle in the "Display Configuration" applet. 

STEPS TO REPRODUCE
1. Run in terminal 
#!/bin/bash
while true 
do 
    clear
    busctl --user call org.kde.Solid.PowerManagement.PolicyAgent /org/kde/Solid/PowerManagement/PolicyAgent org.kde.Solid.PowerManagement.PolicyAgent ListInhibitions
    sleep 10
done
2. Toggle the "Enable Presentation Mode" in the "Display Configuration" applet several times

OBSERVED RESULT
For each toggle on and off there will be a new entry in the terminal window. Even though the toggle is off the presentation mode doesn't actually get disabled and the list of them continues to grow with each toggle. 

EXPECTED RESULT
When toggled on there should be a single entry for the presentation mode, which should prevent screen locking and the device from going to sleep. Once toggled back off the device should follow the configure power profile and the presentation mode removed.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro 24.0
(available in About System)
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2 
Qt Version:  6.7.1

ADDITIONAL INFORMATION
Had been confirmed by other people.
Comment 1 Akseli Lahtinen 2024-05-30 15:59:23 UTC
I can somewhat reproduce this, however not exactly like you mentined.

Instead of having multiple presentation modes in the inhibition list, I only have the plasmashell one. However, when disabling it, it wont disappear from the list.
Comment 2 Bug Janitor Service 2024-06-03 09:57:50 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kscreen/-/merge_requests/310
Comment 3 Akseli Lahtinen 2024-06-03 10:09:44 UTC
Git commit 553ccfabe7fb2fa28c2768b1f21d0c61ff360e3b by Akseli Lahtinen.
Committed on 03/06/2024 at 10:09.
Pushed by akselmo into branch 'master'.

PresentationModeItem.qml: fix logic bug that would not allow turning Presentation Mode off

This `if` block would always return `true` if the presentation mode is set
enabled. Removing it allows to `stopSuppressingScreenPowerManagement` job
to run again.

M  +0    -3    plasmoid/package/contents/ui/PresentationModeItem.qml

https://invent.kde.org/plasma/kscreen/-/commit/553ccfabe7fb2fa28c2768b1f21d0c61ff360e3b
Comment 4 Akseli Lahtinen 2024-06-03 10:11:20 UTC
Git commit 24c6f53126a237e67e101170bcc6d6cdb727905a by Akseli Lahtinen.
Committed on 03/06/2024 at 10:09.
Pushed by akselmo into branch 'Plasma/6.1'.

PresentationModeItem.qml: fix logic bug that would not allow turning Presentation Mode off

This `if` block would always return `true` if the presentation mode is set
enabled. Removing it allows to `stopSuppressingScreenPowerManagement` job
to run again.


(cherry picked from commit 553ccfabe7fb2fa28c2768b1f21d0c61ff360e3b)

e236c2d5 PresentationModeItem.qml: fix logic bug that would not allow turning Presentation Mode off

Co-authored-by: Akseli Lahtinen <akselmo@akselmo.dev>

M  +0    -3    plasmoid/package/contents/ui/PresentationModeItem.qml

https://invent.kde.org/plasma/kscreen/-/commit/24c6f53126a237e67e101170bcc6d6cdb727905a