swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.61k stars 1.11k forks source link

VRR causes cursor drawing hangups for fullscreen applications #5382

Closed mcoffin closed 4 years ago

mcoffin commented 4 years ago

With adaptive_sync on, at least with Assetto Corsa Competizione, running a game in fullscreen mode seems to cause cursor rendering to hang up and freeze for long periods of time. Everything else still looks buttery-smooth, and moving the cursor "works" as in the game gets the mouse events, but the actual drawn cursor on the screen doesn't update and freezes for ~10s.

I'll test with more games to add more detail, but I wanted to get this submitted so others can take a look.

When just on a regular screen, everything appears to work fine, mouse movement and all, and I can confirm the refresh rate is updating via a monitor-native overlay.

Boilerplate info

Notes about my config

I am using two cards (one for each monitor, but all rendering done on primary card (duh)). Launched with WLR_DRM_DEVICES=/dev/dri/card0:/dev/dri/card1.

In the log file above, DP-3 is the VRR monitor, and DVI-D-1 is a secondary non-vrr monitor

placeholder for info about what happened when I tried with the secondary monitor disconnected

Observations

Log file has a bunch of this, which is most certainly related.

May 24 12:28:55 mcoffin-dev-tower sway[35814]: 00:13:51.408 [ERROR] [backend/drm/atomic.c:36] DVI-D-1: Atomic commit failed (pageflip): Invalid argument
emersion commented 4 years ago

This might be a duplicate of https://github.com/swaywm/wlroots/issues/2216

mcoffin commented 4 years ago

This might be a duplicate of swaywm/wlroots#2216

I don't think so, as I can now confirm that the issue is still present after disable'ing the secondary monitor.

emersion commented 4 years ago

Okay. Since there are a bunch of these:

00:07:23.772 [ERROR] [backend/drm/atomic.c:36] DVI-D-1: Atomic commit failed (pageflip): Invalid argument

Could you get DRM debug logs too? See https://github.com/swaywm/wlroots/wiki/DRM-Debugging

mcoffin commented 4 years ago

@emersion with your patch to amdgpu applied, this is now resolved. I'll close.