Bug 499981

Summary: Mirroring screen cause reduced performance in Wayland
Product: [Plasma] kwin Reporter: A1RM4X <A1RM4X>
Component: performanceAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: A1RM4X, xaver.hugl
Priority: NOR    
Version First Reported In: git-stable-Plasma/6.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description A1RM4X 2025-02-13 12:53:41 UTC
Mirroring the main screen causes measurable reduced performance in Wayland. The issue is not reproducible in X11.


STEPS TO REPRODUCE
1. Plug a second screen output
2. Mirror screen output by replicating screen in the display configuration

OBSERVED RESULT
Reduce performance in a native game benchmark : Shadow of the Tomb Raider

Around 4%

EXPECTED RESULT
No impact on performance. In X11, there is no performance impact at all.

SOFTWARE/OS VERSIONS
Arch Linux/KDE Plasma: 
KDE Plasma Version: 6.3
KDE Frameworks Version: 6.10
Qt Version: 6.8.2


Full example here: https://youtu.be/cBR7ogYafpg
Comment 1 Zamundaaa 2025-02-13 17:12:39 UTC
This is when direct scanout is not working, right? Iow, when the "show compositing" effect does not go away in fullscreen?
Comment 2 A1RM4X 2025-02-27 18:25:47 UTC
Sorry for the late answer, I thought I would get a notification if someone answered.

I just redid the test to make sure. Composting is not showing on screen and there is a difference of 3% / 4% on the same game bench.

This is not reproducible on X11, the bench is the same weather I duplicate the screen or not.

Let me know if you need more info.
Comment 3 Zamundaaa 2025-03-05 00:15:00 UTC
This might be caused by rendering of the two screens not being synchronized - so sometimes KWin uses the app's buffers for longer than without mirroring.

Synchronizing rendering for mirrored screens is planned, so let's wait for that to be implemented and then check again.