Bug 374332

Summary: External monitor message is not refreshed when the relevant setting in the KCM is changed
Product: [Plasma] plasmashell Reporter: grouchomarx.fr
Component: Power and Battery widgetAssignee: Natalie Clarius <natalie_clarius>
Status: CONFIRMED ---    
Severity: normal CC: 60f31543-f82f-492a-8430-25db5521568b, Gvgeo, jpetso, natalie_clarius, nate, plasma-bugs-null
Priority: NOR    
Version First Reported In: 5.8.5   
Target Milestone: 1.0   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description grouchomarx.fr 2016-12-30 13:09:03 UTC
Steps to reproduce :
- plug an external monitor to a laptop
- set the power options to not sleep when the lid is closed and an external monitor is plugged
- restart the session
- there should be a message in the battery applet
"Your notebook is configured not to suspend when closing the lid while an external monitor is connected"
- set the power options to sleep when the lid is closed even when an external monitor is connected

Actual results :
- the message is still there

Expected results :
- the message should be updated when the option is changed
Comment 1 gvgeo 2020-01-25 07:26:36 UTC
There are two problems with this message.
1. Suppression message change only when loading or change outputs.
2. Suppression message does not know the desired action for lid. But always warns about suspend.

Possible needed changes.
1. Need to update "Triggers Lid Action".
void HandleButtonEventsConfig::save()
    if ( m_triggerLidActionWhenExternalMonitorPresent != m_OLDtriggerLidActionWhenExternalMonitorPresent)
        Q_EMIT triggersLidActionChanged(HandleButtonEvents::triggersLidAction()); 
            
2. Include lidAction in DBus. Display action in message, and display message only if needed.
or 2. Change the message, and add m_lidAction != 0 in HandleButtonEvents::triggersLidAction().
Comment 2 gvgeo 2020-01-25 15:00:37 UTC
Change 1 is too specific, but is just wrong, even as pseudocode.
Comment 3 Nate Graham 2023-12-08 20:36:58 UTC
Can still reproduce in Plasma 6 even with the new Powerdevil KCM and the split Power and Battery applet.
Comment 4 Nate Graham 2023-12-08 20:37:02 UTC
*** Bug 455246 has been marked as a duplicate of this bug. ***