Bug 426426

Summary: Applet: state of presentation mode switch is not synchronized across multiple instances
Product: [Plasma] plasmashell Reporter: Daniel <daniel-other+kdebug>
Component: Display Configuration widget and OSDAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: minor CC: nate
Priority: NOR    
Version First Reported In: 5.18.4   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Daniel 2020-09-11 21:57:09 UTC
SUMMARY
When having multiple kscreen applets (for enabling presentation mode), they might show incosistent information.

STEPS TO REPRODUCE
1. have to kscreen applets (on two screens for example)
2. enable presentation in one of them

OBSERVED RESULT
you can see that presentation mode isn't enabled in the other applet.

EXPECTED RESULT
the checkbox should be checked in the second and all other applets too.
Also it isn't possible to change anything in the second applet.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.73.0
Qt Version: 5.15.0
Kernel Version: 5.8.7-arch1-1
Comment 1 Nate Graham 2022-05-19 17:46:22 UTC
Still an issue with the near-total rewrite in 5.25. Seems like we need to use a global singleton to store this, rather than implicitly having it be stored per-applet.
Comment 2 ratijas 2022-05-19 17:59:02 UTC
Indeed, this is done in KScreen and Battery & Brightness applets in similar ways: they request inhibitions per applet. It should be probably moved out into a Plasma Data Engine service as an operation (sorry for multiple technical jargons).

But then it raises a question: if Plasma enables inhibition on applet's behalf, and then user proceeds to remove all instances of such applets, could we reasonably detect that and turn inhibition off? Surely, a corner care like this can be ignored though.
Comment 3 Nate Graham 2022-05-19 18:05:19 UTC
Data engines are on their way out and won't be in Plasma 6, BTW. I wouldn't add any new ones in the Plasma 5 timeframe.

Isn't the inhibition in this applet identical to the inhibition in the battery & brightness applet? If so, we don't really need to care about handling the case where inhibition changes but there are no KScreen applets.
Comment 4 ratijas 2022-05-19 19:07:21 UTC
> Data engines are on their way out and won't be in Plasma 6, BTW. I wouldn't add any new ones in the Plasma 5 timeframe.

Yes, but meanwhile…

> Isn't the inhibition in this applet identical to the inhibition in the battery & brightness applet? If so, we don't really need to care about handling the case where inhibition changes but there are no KScreen applets.

There is one data engine already, it's called powermanagement. New function can be added to it. Why not?
Comment 5 Nate Graham 2022-05-19 19:13:49 UTC
Sure, we can do that, as long as we accept that we'll have to port away from it in favor of something else for Plasma 6.