Bug 419387

Summary: Frame drops when the second monitor has 30Hz refresh rate
Product: [Plasma] kwin Reporter: Guo Yunhe <i>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: me
Priority: NOR Flags: vlad.zahorodnii: Wayland+
vlad.zahorodnii: X11-
Version First Reported In: 5.18.3   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Guo Yunhe 2020-03-29 17:45:19 UTC
SUMMARY
When you have two monitors with different refresh rates, the one higher refresh rate drop frames (noticeably).

STEPS TO REPRODUCE
1. Connect to two 1080p monitors, we call them A and B
2. In KDE Settings, set refresh rates of both to 60Hz
3. Watch this video in monitor A https://www.youtube.com/watch?v=Cyxixzi2dgQ
4. In KDE Settings, set refresh rate of A to 60Hz and B to 30Hz
5. Watch the same video in monitor A
6. Shift+Alt+F12 to disable KWin composition
7. Watch the same video in monitor A
OBSERVED RESULT
When B is 60Hz, monitor A doesn't drop frames.
When B is 30Hz, monitor A drop frames noticeably. 
When B is 30Hz but KWin composition is off, monitor A doesn't drop frames.

EXPECTED RESULT
Monitor A shouldn't drop frames when monitor B has a different refresh rate.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20200326
KDE Plasma Version: 5.18.3
KDE Frameworks Version: 5.68.0
Qt Version: 5.14.1
Kernel Version: 5.5.11-1-default
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-8550U CPU @ 1.80GHz
Memory: 31.1 GiB

ADDITIONAL INFORMATION
I think this is not deal to GPU performance limitation, because when you reduce refresh rate of monitor B, the total computing load is smaller and GPU should render faster.
Comment 1 Vlad Zahorodnii 2020-03-30 10:47:26 UTC
X11 or Wayland?
Comment 2 Guo Yunhe 2020-03-30 10:49:37 UTC
It can be reproduced in both X and Wayland.
Comment 3 Vlad Zahorodnii 2020-03-30 11:15:37 UTC
On X11, it's not a bug.

On Wayland, we support per-screen rendering. However, due to the current compositor architecture, we're capping to the lowest frame rate.
Comment 4 Jonah Sabean 2020-11-16 23:38:35 UTC
> On Wayland, we support per-screen rendering. However, due to the current compositor architecture, we're capping to the lowest frame rate.

So are there plans to improve this? This is quite unfortunate, especially since Gnome supports this perfectly now as of Gnome/Mutter 3.38.
Comment 5 Vlad Zahorodnii 2020-11-25 09:14:57 UTC
(In reply to Jonah Sabean from comment #4)
> > On Wayland, we support per-screen rendering. However, due to the current compositor architecture, we're capping to the lowest frame rate.
> 
> So are there plans to improve this? This is quite unfortunate, especially
> since Gnome supports this perfectly now as of Gnome/Mutter 3.38.

Yes, we are working on it.
Comment 6 Vlad Zahorodnii 2021-10-13 13:14:22 UTC
kwin_wayland does true per screen rendering now, so this bug should be fixed.