Bug 499981 - Mirroring screen cause reduced performance in Wayland
Summary: Mirroring screen cause reduced performance in Wayland
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: performance (show other bugs)
Version: git-stable-Plasma/6.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-13 12:53 UTC by A1RM4X
Modified: 2025-03-17 17:51 UTC (History)
2 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 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.