Bug 527560 - Block sleep and screen locking after inactivity button not sync between multiple widgets
Summary: Block sleep and screen locking after inactivity button not sync between multi...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Power and Battery widget (other bugs)
Version First Reported In: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-10-21 23:33 UTC by Villemur Clément
Modified: 2026-10-26 11:17 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.8.2
Sentry Crash Report:


Attachments
2 widgets not showing the same toggle status (2.28 MB, image/png)
2026-10-21 23:39 UTC, Villemur Clément
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Villemur Clément 2026-10-21 23:33:42 UTC
DESCRIPTION
Sometimes, block sleep and screen locking after inactivity button is not sync between multiple widgets. If I open 2 widgets on each of my taskbars, one says it's blocked while the other says no. If I toggle again they're both in sync. 

STEPS TO REPRODUCE
I'm not 100% sur but it happened to me at least 3 times in the last few days. 

OBSERVED RESULT
One button is toggled on while the other is not. 

EXPECTED RESULT
Both should be the same. 

SOFTWARE/OS VERSIONS
Operating System: KDE Linux 2026-10-15 14:28
KDE Plasma Version: 6.8.80
KDE Frameworks Version: 6.32.0
Qt Version: 6.12.0
Kernel Version: 7.2.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600 6-Core Processor
Memory: 32 Gio of RAM (31.2 Gio usable)
Graphics Processor: AMD Radeon RX 6700 XT
Comment 1 Villemur Clément 2026-10-21 23:35:42 UTC
There was something similar with the brightness widget, but I'm not sure it's caused by the same issue here. 
https://bugs.kde.org/show_bug.cgi?id=523281
Comment 2 Villemur Clément 2026-10-21 23:39:52 UTC
Created attachment 197483 [details]
2 widgets not showing the same toggle status
Comment 3 Villemur Clément 2026-10-21 23:42:54 UTC
I've found a way to reproduce it. I'm not sure if all the steps here are needed but here's what I need to do in order to reproduce it. 

1. Turn off block sleep and screen locking after inactivity button. 
2. Turn on my PC. 
3. Log in. 
4. Put the PC in Sleep
5. Wake from sleep
6. Unlock
7. Toggle on the block sleep and screen locking after inactivity button. 

Observed result : 
Only the widget you just used to activate the button is showing it enabled. The other widget shows the button disabled.
Comment 4 cwo 2026-10-22 06:32:46 UTC
Can reproduce one time per plasmashell start, subsequent changes seem to be picked up. Will investigate.
Comment 5 Bug Janitor Service 2026-10-23 21:02:30 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/powerdevil/-/merge_requests/718
Comment 6 cwo 2026-10-26 09:47:33 UTC
Git commit 9b5c4167b6d91e86f624039a111707a144c2ffb0 by Christoph Wolk.
Committed on 26/10/2026 at 08:50.
Pushed by cwo into branch 'master'.

applets/batterymonitor: set switch state on first open

The battery widget sets the manual inhibition switch state whenever
the passed-in property isManuallyInhibited changes. However, this only
works if the Switch is actually loaded when it changes. This is not
necessarily the case, and you can set the manual inhibition with e.g.
a second instance of the widget. If you only open a systray instance
after first toggling the switch elsewhere (in my testing, a standalone
widget), all the things that are actually bound to isManuallyInhibited
(like the icon and power usage warning) will reflect the current state,
but the switch will remain in the off state.

Instead, set the Switch's initial value to isManuallyInhibited.
FIXED-IN: 6.8.2

M  +1    -0    applets/batterymonitor/InhibitionItem.qml

https://invent.kde.org/plasma/powerdevil/-/commit/9b5c4167b6d91e86f624039a111707a144c2ffb0
Comment 7 cwo 2026-10-26 11:17:38 UTC
Git commit f416167f7ebba092f3e053ce85afe9fe3bbfd20c by Christoph Wolk.
Committed on 26/10/2026 at 09:55.
Pushed by cwo into branch 'Plasma/6.8'.

applets/batterymonitor: set switch state on first open

The battery widget sets the manual inhibition switch state whenever
the passed-in property isManuallyInhibited changes. However, this only
works if the Switch is actually loaded when it changes. This is not
necessarily the case, and you can set the manual inhibition with e.g.
a second instance of the widget. If you only open a systray instance
after first toggling the switch elsewhere (in my testing, a standalone
widget), all the things that are actually bound to isManuallyInhibited
(like the icon and power usage warning) will reflect the current state,
but the switch will remain in the off state.

Instead, set the Switch's initial value to isManuallyInhibited.
FIXED-IN: 6.8.2


(cherry picked from commit 9f55a1858e1bf1bddca01674b294662375d55e58)

Co-authored-by: Christoph Wolk <cwo.kde@posteo.net>

M  +1    -0    applets/batterymonitor/InhibitionItem.qml

https://invent.kde.org/plasma/powerdevil/-/commit/f416167f7ebba092f3e053ce85afe9fe3bbfd20c