vsync not working with a scaled display
In short: Tearing and mouse flickering can be observed when using a scaled secondary monitor.
Long: I initially reported this problem in picom. I will copy most of the details here for completeness.
% uname -r 5.6.2-arch1-2
GPU, drivers, and screen setup
Dual graphics. Configured with Prime render offload. Using the
modesetting driver for the Intel graphics.
GL_VERSION: 4.6 (Compatibility Profile) Mesa 20.0.4 GL_VENDOR: Intel GL_RENDERER: Mesa Intel(R) UHD Graphics 620 (KBL GT2)
GL_VERSION: 4.6.0 NVIDIA 440.64 GL_VENDOR: NVIDIA Corporation GL_RENDERER: GeForce MX150/PCIe/SSE2
% xrandr --listproviders Providers: number : 2 Provider 0: id: 0x47 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 5 associated providers: 0 name:modesetting Provider 1: id: 0x269 cap: 0x0 crtcs: 0 outputs: 0 associated providers: 0 name:NVIDIA-G0
% xrandr Screen 0: minimum 320 x 200, current 4480 x 1440, maximum 16384 x 16384 eDP-1 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 309mm x 174mm 2560x1440 60.01*+ 59.99 59.99 59.96 59.95 HDMI-2 connected 1920x1080+2560+0 (normal left inverted right x axis y axis) 527mm x 297mm 1920x1080 60.00*+ 50.00 59.94
Steps of reproduction
- enable vsync (in my case through
- connect a second monitor and scale its output with
xrandr --output HDMI-2 --auto --scale 1.33x1.33 --right-of eDP-1 --auto
- scroll in a window (e.g. browser) on the unscaled monitor or play a video with mpv and move the mouse over it
All of the below observations can only be made on the unscaled (in my case internal) monitor.
- the mouse flickers or completely disappears in screen areas which frequently refreshed. Examples:
- when scrolling in a browser
- above a gpu demo such as
- above a video playing in
glxheadsshows tearing (see also: https://imgur.com/XRuFUnQ)
- system stuttering: the scrolling becomes unresponsive and frames appear to be dropper when e.g. playing a video in
mpvdoes not report any dropped frames with
Additional videos for comparison:
- Only Laptop monitor is used (everything behaves normally): https://imgur.com/jNtR2jN
- External screen is used with normal resolution (everything behaves normally): https://imgur.com/s4890Q0
- Possibly related
- Possibly related