SUMMARY Whenever you connect a new monitor (not a previously connected one), KWin forgets the scaling for the monitor it is in. The physical size of existing monitors does not change when you connect new outputs STEPS TO REPRODUCE 1. Configure one monitor to something other than 100% (for example, laptop display panel to 200% or 250%) 2. Connect another monitor OBSERVED RESULT The first-connected monitor goes back to 100% EXPECTED RESULT The first-connected monitor's scaling remains as it was configured SOFTWARE/OS VERSIONS KDE Plasma Version: 6.0.3 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.3 ADDITIONAL INFORMATION
Is this reproducible in a new clean user account, by any chance?
(In reply to Nate Graham from comment #1) > Is this reproducible in a new clean user account, by any chance? Will test and let you know. This problem definitely happens on two different laptops that I've recently migrated to Wayland... but both have the same history of $HOME going back to 2015.
No, I've just tried with a new account and the same problem happens.
Can reproduce, but only if I first log into Xorg with the monitor connected once before - in that case the KScreen fallback code loads the config stored by KScreen for Xorg, which doesn't have a scale factor for the outputs, so it defaults to 100%. We kinda need bug 479952 to fix that nicely. When you reproduced this issue with a new user account, did you also log into Xorg first, or does it even happen if you never do that?
(In reply to Zamundaaa from comment #4) > When you reproduced this issue with a new user account, did you also log > into Xorg first, or does it even happen if you never do that? I had used the account first with X, but I did go and delete all the config files before trying this. I may have missed something, though. Which file is this stored in? ~/.local/share/kscreen/ ?
I must have made a mistake in testing previously. After ensuring ~/.local/share/kscreen was deleted, logging out and back in again, kwin_wayland does not forget the laptop screen's settings when connecting the external monitor. PS: in kcm_display, you can't type %
okay, cool, then the problem is exclusively in KWin's fallback code for KScreen configs.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5637
Git commit 7949032411153ebf9d87b0e936b1bc288df12b38 by Xaver Hugl. Committed on 23/04/2024 at 11:41. Pushed by zamundaaa into branch 'master'. outputconfigurationstore: don't overwrite output settings with kscreen configs The existing code overwrites all per-output data with the config from KScreen every time an output config is found that isn't in the KWin data base yet. That causes problems like the scale being reset to 1.0 if the user logged into Xorg before, or resetting it to whatever scale KScreen had saved on Wayland, which isn't much better. Instead of doing that, use the KScreen config as inspiration for some specific output settings, instead of copying it outright. It's not ideal, but it's better than overwriting settings the user has explicitly set up M +24 -15 src/outputconfigurationstore.cpp https://invent.kde.org/plasma/kwin/-/commit/7949032411153ebf9d87b0e936b1bc288df12b38
Git commit 10af8375ee8cfb822b5c6bbee3edc9ed93e5fe1a by Xaver Hugl. Committed on 23/04/2024 at 12:32. Pushed by zamundaaa into branch 'Plasma/6.0'. outputconfigurationstore: don't overwrite output settings with kscreen configs The existing code overwrites all per-output data with the config from KScreen every time an output config is found that isn't in the KWin data base yet. That causes problems like the scale being reset to 1.0 if the user logged into Xorg before, or resetting it to whatever scale KScreen had saved on Wayland, which isn't much better. Instead of doing that, use the KScreen config as inspiration for some specific output settings, instead of copying it outright. It's not ideal, but it's better than overwriting settings the user has explicitly set up (cherry picked from commit 7949032411153ebf9d87b0e936b1bc288df12b38) M +24 -15 src/outputconfigurationstore.cpp https://invent.kde.org/plasma/kwin/-/commit/10af8375ee8cfb822b5c6bbee3edc9ed93e5fe1a
*** Bug 486884 has been marked as a duplicate of this bug. ***
*** Bug 490608 has been marked as a duplicate of this bug. ***