Everything KDE from git master. STEPS TO REPRODUCE 1. Have a laptop with a 4k screen 2. Plug in an external 1080p screen of any physical size 3. Unify/mirror the displays OBSERVED RESULT The external 1080p screen shows the full screen content at 1x scale The internal 4k screen shows clipped content; only the top-left quarter of what should be shown is shown EXPECTED RESULT The external 1080p screen shows the full screen content at 1x scale The internal 4k screen shows the full screen content at 2x scale ADDITIONAL INFORMATION This happened to me while presenting at Akademy with an external projector, and was quite "exciting" to work around in real time so I could do my presentation. And I can reproduce it at home with my home mixed-DPI monitor setup too.
Created attachment 152702 [details] What it looks like when this happens
The problem appears to be that both the internal and external screens have their resolutions changed inappropriately when mirroring. If I manually change then both back to their native resolutions, the mirroring works perfectly: NB: I mirrored the displays using the "Unify Outputs" button on the OSD.
The OSD and KCM have wildly different paths. Generator::cloneScreens looks for matching resolutions and uses the same for both. Generally sane, but it's not taking wayland scaling into account which is why it explodes. We have a few options here.
Yeah, I used the OSD because I can't see the UI in the KCM to mirror; see Bug 460433. And to be more specific, when I use the Unify Outputs button in the OSD, both screens get their resolutions changed to 1600x900, but they keep their scales. So the internal screen is showing 1/4 the content of the external one. Manually changing both back to their correct native resolutions fixes the issue.
Will be fixed by https://invent.kde.org/plasma/kscreen/-/merge_requests/146.
*** Bug 440112 has been marked as a duplicate of this bug. ***
This still happens to me on 5.27.
Found a workaround today when this happened to me again at the Plasma sprint: you can use the KScreen KCM to manually set the external screen to 100% scale and the internal screen to 200% scale and then drag one on top of the other, than then both work properly.
Update: This happens only when using "Unify outputs" in the applet or the OSD. If I drag one screen on top of the other in KScreen, everything works as expected.
Still the same results in Plasma 6, FWIW.