https://bugs.kde.org/show_bug.cgi?id=528768
Bug ID: 528768
Summary: Display settings: after a failed apply the checkbox
stays ticked and Apply is greyed out
Classification: Applications
Product: systemsettings
Version First 6.8.2
Reported In:
Platform: NixOS
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: kcm_kscreen
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---
DESCRIPTION
When a display setting fails to apply the UI is left in an inconsistent state.
STEPS TO REPRODUCE
1. Have a display that is not activatable e.g. because you are affected by
https://gitlab.freedesktop.org/drm/amd/-/work_items/5339
2. Go into System Settings > Display
3. Select the display that can't be enabled and set the "Enabled" checkbox
4. Click "Apply"
OBSERVED RESULT
An error is shown in the settings, the display stays off but the "Enabled"
checkbox stays active and the apply and reset buttons get deactivated.
EXPECTED RESULT
An error message is displayed and either
1. The apply and reset buttons stay active and the flag stays
2. The flag is rolled back and apply is greyed out
I think 1. is more user friendly, in case the user bundled a whole bunch of
changes?
SOFTWARE/OS VERSIONS
Operating System (available in the Info Center app, or by running `kinfo` in a
terminal window): NixOS 26.11
KDE Plasma Version: 6.8.2
KDE Frameworks Version: 6.31.0
Qt Version: 6.12.0
ADDITIONAL INFORMATION (Sorry this is LLM assisted, because I don't know C++
well enough):
I have read `KCMKScreen::doSave` and `KCModuleQml::save()` but I have no proof
beyond Claude Sonnet 5.5 in Claude Code telling me that these are relevant.
In
[`KCMKScreen::doSave`](https://invent.kde.org/plasma/kscreen/-/blob/5272cafd6c9d2e26ce4fb3501a13dcd85b3dedf3/kcm/kcm.cpp#L165-L170)
when `op->exec()` returns false, only the error message is set but no cleanup
handler is invoked.
Since `save` also returns void there is no signal beyond the error string that
the apply failed and the
[KCModuleQml](https://invent.kde.org/frameworks/kcmutils/-/blob/987a29d90bc2f305bd833a9b4accdab1953be1a3/src/kcmoduleqml.cpp#L281-L285)
runs
`d->configModule->setNeedsSave(false);` which then locks in the bad state (I'm
reasonably convinced that this is what is happening but haven't applied a
debugger to actually step through to confirm)
Should `m_configHandler->checkNeedsSave();` also be run here like in the error
case [above in the same
function](https://invent.kde.org/plasma/kscreen/-/blob/5272cafd6c9d2e26ce4fb3501a13dcd85b3dedf3/kcm/kcm.cpp#L153-L157)
--
You are receiving this mail because:
You are watching all bug changes.