Bug 477355 - display configuration applet: cannot leave presentation mode
Summary: display configuration applet: cannot leave presentation mode
Status: RESOLVED FIXED
Alias: None
Product: KScreen
Classification: Plasma
Component: OSD and Plasma applet (show other bugs)
Version: 5.27.80
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Natalie Clarius
URL:
Keywords: qt6
: 474437 480275 482028 484340 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-11-22 08:50 UTC by Eric Armbruster
Modified: 2024-03-23 20:06 UTC (History)
10 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Armbruster 2023-11-22 08:50:44 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Open the display configuration applet
2. Click on the switch to enable the presentation mode
3. 

OBSERVED RESULT
When clicking again on the switch to leave the presentation mode nothing happens

EXPECTED RESULT
Leaving presentation mode works

Operating System: Arch Linux 
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.245.0
Qt Version: 6.6.0
Kernel Version: 6.6.2-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 3700X 8-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX 5700 XT
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7C37
System Version: 3.0

ADDITIONAL INFORMATION
Please assign bug report to the correct product
Comment 1 Nate Graham 2023-11-26 17:05:36 UTC
Can reproduce.
Comment 2 Nate Graham 2023-11-26 17:09:18 UTC
I took a look at the code in KScreen (where the applet lives) and what seems to be happening is this:

Whenever you click on the switch, it disables itself and starts a beginSuppressingScreenPowerManagement or stopSuppressingScreenPowerManagement job. Once the job completes, the switch re-enables itself. But if it doesn't complete, then the switch remains disabled forever. And the disabled state for a PlasmaComponents.Switch looks nearly identical to the enabled state, so it's hard to tell that that's what happened.

I can reproduce the job not finishing and the switch remaining disabled. Natalie, can you take a look here?
Comment 3 Natalie Clarius 2023-11-27 23:29:12 UTC
Duplicate of https://bugs.kde.org/show_bug.cgi?id=474437?

@Nate, you said you couldn't reproduce on the other bug report but you can here? Can you explain the difference?
Comment 4 Natalie Clarius 2023-11-27 23:31:00 UTC
I can reproduce what I understand to be the same bug reported here and in the other thread.
Comment 5 Bug Janitor Service 2023-11-28 01:07:06 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3611
Comment 6 Bug Janitor Service 2023-11-28 01:08:11 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kscreen/-/merge_requests/262
Comment 7 Nate Graham 2023-12-04 21:40:59 UTC
*** Bug 474437 has been marked as a duplicate of this bug. ***
Comment 8 Natalie Clarius 2024-01-23 20:08:46 UTC
Git commit e07ba2cb8c9b3b3315b62cd55fa678cb1a46abb1 by Natalie Clarius.
Committed on 23/01/2024 at 20:48.
Pushed by nclarius into branch 'master'.

plasmoid: adapt to changed inhibition request handling

This was overlooked to adapt with https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3294: The data engine now manages the cookie internally rather than passing it between the applet.

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

https://invent.kde.org/plasma/kscreen/-/commit/e07ba2cb8c9b3b3315b62cd55fa678cb1a46abb1
Comment 9 Natalie Clarius 2024-01-23 20:49:13 UTC
Git commit 0266e1403ca121b382f06d60c13ced61bd800dde by Natalie Clarius.
Committed on 23/01/2024 at 20:48.
Pushed by nclarius into branch 'master'.

dataengines/powermanagement: set result for inhibition request

This is needed for the battery and display configuration applets to update state (reenable switch and show OSD or error notification).

M  +4    -0    dataengines/powermanagement/powermanagementjob.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/0266e1403ca121b382f06d60c13ced61bd800dde
Comment 10 duha.bugs 2024-01-24 19:18:22 UTC
*** Bug 480275 has been marked as a duplicate of this bug. ***
Comment 11 Nicolas Fella 2024-03-22 21:10:29 UTC
*** Bug 482028 has been marked as a duplicate of this bug. ***
Comment 12 Méven Car 2024-03-23 09:22:43 UTC
Git commit ab792c02861b61e0af375e68eaf03d76ffd8a4d4 by Méven Car, on behalf of Natalie Clarius.
Committed on 23/03/2024 at 09:22.
Pushed by meven into branch 'Plasma/6.0'.

dataengines/powermanagement: set result for inhibition request

This is needed for the battery and display configuration applets to update state (reenable switch and show OSD or error notification).


(cherry picked from commit 0266e1403ca121b382f06d60c13ced61bd800dde)

M  +4    -0    dataengines/powermanagement/powermanagementjob.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/ab792c02861b61e0af375e68eaf03d76ffd8a4d4
Comment 13 Natalie Clarius 2024-03-23 11:02:53 UTC
Git commit cefc4921e24b0dbffa660911836c5a03bd5a8c21 by Natalie Clarius.
Committed on 23/03/2024 at 01:34.
Pushed by nicolasfella into branch 'Plasma/6.0'.

plasmoid: adapt to changed inhibition request handling

This was overlooked to adapt with https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3294: The data engine now manages the cookie internally rather than passing it between the applet.


(cherry picked from commit e07ba2cb8c9b3b3315b62cd55fa678cb1a46abb1)

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

https://invent.kde.org/plasma/kscreen/-/commit/cefc4921e24b0dbffa660911836c5a03bd5a8c21
Comment 14 Nicolas Fella 2024-03-23 20:05:33 UTC
*** Bug 484340 has been marked as a duplicate of this bug. ***