Bug 490586

Summary: With multiple monitors enabled, reverting a secondary monitor change shows settings from primary monitor
Product: [Applications] systemsettings Reporter: nyanpasu64 <nyanpasu64>
Component: kcm_kscreenAssignee: kscreen-bugs-null <kscreen-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: dashmeshsingh98, hadrian.decurtins, kde, kdedev, med.medin.2014, nate, olib141, plasma-bugs
Priority: NOR Keywords: multiscreen
Version First Reported In: 6.1.2   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 6.3.5
Sentry Crash Report:

Description nyanpasu64 2024-07-20 23:07:23 UTC
SUMMARY
In Display Configuration, if I change the resolution/refresh of a secondary monitor and revert it (or wait for the 15 second timer to run out), the secondary monitor is selected but the resolution/refresh rate show the settings of the primary monitor.

STEPS TO REPRODUCE
1. Enable two monitor outputs, set to different resolutions to make the bug easier to see.
2. Change the resolution of the second monitor and hit Apply.
3. Hit Revert.

OBSERVED RESULT
The second monitor is otulined in blue, and "Device:" shows the second monitor. The problem is that the resolution/refresh rate match the primary monitor instead. Clicking the second monitor does nothing. If you want to change resolutions again, you have to click the primary monitor then the secondary again.

EXPECTED RESULT
If the secondary monitor remains highlighted, the fields on the page should reflect it properly.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 40
KDE Plasma Version: 6.1.2
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.2
Kernel Version: 6.9.9-200.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-3570K CPU @ 3.40GHz
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 4000
Manufacturer: M&A Technology
Product Name: DB75EN__

ADDITIONAL INFORMATION
I attempted to record the screen but Spectacle hung when I clicked "Finish recording", hanging in PipeWireBaseEncodedStream::refresh.
Comment 1 Nate Graham 2025-03-17 19:48:32 UTC
*** Bug 495364 has been marked as a duplicate of this bug. ***
Comment 2 Nate Graham 2025-03-17 19:48:38 UTC
*** Bug 494747 has been marked as a duplicate of this bug. ***
Comment 3 Bug Janitor Service 2025-04-01 12:22:53 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kscreen/-/merge_requests/367
Comment 4 Nate Graham 2025-04-04 12:50:47 UTC
Git commit 3e8ccda33895efe9311b5b5f1e142c6d608846da by Nate Graham, on behalf of Oliver Beard.
Committed on 04/04/2025 at 12:44.
Pushed by olib into branch 'master'.

kcm: Fix wrong settings shown when reverting changes
When reverting display changes, due to model changes, the StackLayout's currentIndex is changed by the stackLayout. This is a behaviour added in Qt 6.5, and requires working around to ensure we keep it the same as selectedOutput.
FIXED-IN: 6.3

M  +6    -0    kcm/ui/Panel.qml

https://invent.kde.org/plasma/kscreen/-/commit/3e8ccda33895efe9311b5b5f1e142c6d608846da
Comment 5 Oliver Beard 2025-04-04 12:51:07 UTC
Git commit 50a3ee595f5f5c6cebed220b79f13483f3ecad97 by Oliver Beard.
Committed on 04/04/2025 at 12:51.
Pushed by olib into branch 'Plasma/6.3'.

kcm: Fix wrong settings shown when reverting changes
When reverting display changes, due to model changes, the StackLayout's currentIndex is changed by the stackLayout. This is a behaviour added in Qt 6.5, and requires working around to ensure we keep it the same as selectedOutput.
FIXED-IN: 6.3


(cherry picked from commit 3e8ccda33895efe9311b5b5f1e142c6d608846da)

Co-authored-by: Oliver Beard <olib141@outlook.com>

M  +6    -0    kcm/ui/Panel.qml

https://invent.kde.org/plasma/kscreen/-/commit/50a3ee595f5f5c6cebed220b79f13483f3ecad97