Bug 481222 - Support proper output mirroring
Summary: Support proper output mirroring
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: platform-drm (other bugs)
Version First Reported In: 5.93.0
Platform: Other Linux
: VHI wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
: 481584 487796 491144 492827 493478 493811 493913 494447 494958 501624 504137 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-02-11 13:18 UTC by Iyán M. V.
Modified: 2025-05-13 19:27 UTC (History)
22 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Iyán M. V. 2024-02-11 13:18:05 UTC
SUMMARY
First of all, a big THANK YOU for all the hard work and improvements around the multi-screen support. Plasma 5.x always felt a bit unreliable when connecting external screens. The RC 2 already feels much much better. Specially the "unify output" mode, which was quite broken in Plasma 5.x in my opinion.

After playing around with different setups, I only notice one small bug. My laptop has a 16:10 screen. When I connect at 16:9 external monitor and I change to "unify outputs" mode, the resolutions (correctly!) changes to a 16:9 one. There are some black bands in the built-in laptop screen (as it should!) and the external screen shows exactly the same as the laptop without any artifacts as it happens with Plasma 5.27.10.

However, when detaching the external monitor, the 16:9 resolution is kept instead of restoring the native 16:10 one.


STEPS TO REPRODUCE
1. Select native 16:10 resolution on a laptop (in my case 1920x1200)
2. Attach an external 16:9 monitor (in my case I tried with a 1920x1080 one)
3. Switch to "unify outputs" mode
4. Detach external screen

OBSERVED RESULT
Laptop keeps the 1920x1080 (16:9) resolution with black bands on the top and bottom edges

EXPECTED RESULT
Laptop should switch back to its native 16:10 resolution before the "unify outputs" mode was enabled


SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.93.0
KDE Frameworks Version: 5.249.0
Qt Version: 6.7.0
Kernel Version: 6.7.4-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i5-1135G7 @ 2.40GHz
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Manufacturer: LENOVO
Product Name: 20XYCTO1WW
System Version: ThinkPad X1 Yoga Gen 6
Comment 1 Zamundaaa 2024-02-19 15:58:24 UTC
Yeah, we'll need to properly plumb screen mirroring from KScreen to KWin, and handle this properly in KWin
Comment 2 Zamundaaa 2024-02-20 22:26:22 UTC
*** Bug 481584 has been marked as a duplicate of this bug. ***
Comment 3 Zamundaaa 2024-03-13 16:07:15 UTC
*** Bug 483437 has been marked as a duplicate of this bug. ***
Comment 4 Zamundaaa 2024-06-05 09:55:27 UTC
*** Bug 487796 has been marked as a duplicate of this bug. ***
Comment 5 Zamundaaa 2024-06-06 14:44:41 UTC
*** Bug 488111 has been marked as a duplicate of this bug. ***
Comment 6 Zamundaaa 2024-09-19 14:23:38 UTC
*** Bug 491144 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2024-09-19 16:01:39 UTC
*** Bug 492827 has been marked as a duplicate of this bug. ***
Comment 8 Miroslav Jarý 2024-09-22 09:07:10 UTC
Hey there!
Any news on when this can be expected?
Comment 9 Zamundaaa 2024-09-22 22:22:03 UTC
I plan to tackle this for the Plasma 6.3 release. No promises on completeness by then though, some parts of doing things properly require quite a lot of changes in KWin.
Comment 10 Nate Graham 2024-09-23 17:57:06 UTC
*** Bug 493478 has been marked as a duplicate of this bug. ***
Comment 11 Iyán M. V. 2024-09-23 18:23:19 UTC
Many bugs marked as duplicated of this one seem to be quite different to what I'm describing here.
Comment 12 Nate Graham 2024-09-23 18:36:16 UTC
I'll leave that for Xaver to explain, but as I understand it, they all have the same root cause.
Comment 13 Iyán M. V. 2024-09-23 18:39:59 UTC
No need to waste time explaining to me here. If it was not by mistake and the root cause is clear to Xaver, all good :) I was just confused by some of the other bugs. The bug I tried to describe here was a very minor issue, but others seem more severe and annoying.
Comment 14 Zamundaaa 2024-10-01 12:07:54 UTC
*** Bug 493913 has been marked as a duplicate of this bug. ***
Comment 15 Nate Graham 2024-10-11 19:13:13 UTC
*** Bug 494447 has been marked as a duplicate of this bug. ***
Comment 16 Nate Graham 2024-10-22 17:24:04 UTC
*** Bug 493811 has been marked as a duplicate of this bug. ***
Comment 17 Nate Graham 2024-12-12 19:52:41 UTC
*** Bug 494958 has been marked as a duplicate of this bug. ***
Comment 18 Rafael Lima 2025-02-04 23:52:51 UTC
Any hopes of having this bug fixed in time for Plasma 6.3?

I use Plasma for teaching and I mirror my screen with a projector, and the overview effect simply doesn't work in the projector.
Comment 19 Vlad Zahorodnii 2025-02-05 00:07:52 UTC
For 6.3, no
Comment 20 Nate Graham 2025-02-19 19:08:33 UTC
*** Bug 500371 has been marked as a duplicate of this bug. ***
Comment 21 Nate Graham 2025-03-17 17:03:35 UTC
*** Bug 501624 has been marked as a duplicate of this bug. ***
Comment 22 Bug Janitor Service 2025-04-09 20:32:08 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7476
Comment 23 Zamundaaa 2025-04-16 15:55:10 UTC
Git commit 3e0ecbaad2981874608118005d4dc28daf6e3ec4 by Xaver Hugl.
Committed on 16/04/2025 at 15:20.
Pushed by zamundaaa into branch 'master'.

outputconfigurationstore: implement better screen mirroring

Instead of KScreen trying to move and scale outputs in a way that kind of looks
like mirroring, this makes KWin aware of which outputs replicate which, and makes
it responsible for implementing mirroring in whatever way is best.

This commit implements simliar workarounds like KScreen had, with the only real
difference being that it avoids modifying the source display mode and position,
and takes screen rotation into account.
A better implementation can replace that bit later on, while making use of the
same information stored in the configuration.
Related: bug 502630

M  +11   -6    autotests/integration/outputchanges_test.cpp
M  +1    -0    src/backends/drm/drm_output.cpp
M  +1    -0    src/backends/virtual/virtual_output.cpp
M  +1    -0    src/backends/wayland/wayland_output.cpp
M  +9    -0    src/core/output.cpp
M  +3    -0    src/core/output.h
M  +1    -0    src/core/outputconfiguration.h
M  +88   -0    src/outputconfigurationstore.cpp
M  +2    -0    src/outputconfigurationstore.h
M  +26   -1    src/wayland/outputdevice_v2.cpp
M  +1    -0    src/wayland/outputdevice_v2.h
M  +12   -1    src/wayland/outputmanagement_v2.cpp
M  +4    -3    src/workspace.cpp
M  +1    -1    src/workspace.h

https://invent.kde.org/plasma/kwin/-/commit/3e0ecbaad2981874608118005d4dc28daf6e3ec4
Comment 24 Nate Graham 2025-05-13 19:27:16 UTC
*** Bug 504137 has been marked as a duplicate of this bug. ***