Bug 460246 - OSD and applet: "Unify Outputs" action with 4k@200% and 1080p@100% screens screen clips output on 4k screen on Wayland
Summary: OSD and applet: "Unify Outputs" action with 4k@200% and 1080p@100% screens sc...
Status: CONFIRMED
Alias: None
Product: KScreen
Classification: Plasma
Component: OSD and Plasma applet (show other bugs)
Version: master
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords: multiscreen, wayland
: 440112 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-10-11 15:23 UTC by Nate Graham
Modified: 2024-03-07 15:41 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
What it looks like when this happens (2.50 MB, image/jpeg)
2022-10-11 15:25 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2022-10-11 15:23:35 UTC
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.
Comment 1 Nate Graham 2022-10-11 15:25:47 UTC
Created attachment 152702 [details]
What it looks like when this happens
Comment 2 Nate Graham 2022-10-14 13:53:37 UTC
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.
Comment 3 David Edmundson 2022-10-14 13:56:45 UTC
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.
Comment 4 Nate Graham 2022-10-14 14:02:42 UTC
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.
Comment 5 Nate Graham 2022-10-14 16:29:21 UTC
Will be fixed by https://invent.kde.org/plasma/kscreen/-/merge_requests/146.
Comment 6 Nate Graham 2023-01-04 20:59:55 UTC
*** Bug 440112 has been marked as a duplicate of this bug. ***
Comment 7 frederic.parrenin@univ-grenoble-alpes.fr 2023-02-23 09:49:05 UTC
This still happens to me on 5.27.
Comment 8 Nate Graham 2023-05-06 11:48:45 UTC
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.
Comment 9 Nate Graham 2023-07-26 19:35:45 UTC
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.
Comment 10 Nate Graham 2024-03-07 15:38:40 UTC
Still the same results in Plasma 6, FWIW.