feat: clamp cursor repaints to adaptive sync framerate#2084
feat: clamp cursor repaints to adaptive sync framerate#2084njdom24 wants to merge 1 commit intoValveSoftware:masterfrom
Conversation
|
thanks for taking a crack at this, I'm on vacation at the moment but I will try and test it at some point soon. |
|
Would this MR fix my issues where, if running a game on gamescope embedded mode and adaptive sync enabled, whenever I move the cursor, the refresh rate goes to the max the monitor allows? |
|
@alosarjos that's the intention, yes |
|
Oh amazing! I was struggling with this issue, since this trigger horrible brightness flickering on OLED monitors whenever I moved the cursor.. Thanks for clarifying it @matte-schwartz :D |
|
I've tried with this command: But it's not working for me, am I doing something wrong? |
|
@alosarjos You may need to add Don't think there's anything I could do about that, but I'd love to be wrong. |
|
@njdom24 Thanks a lot! Yeahp, look like that did the trick! Now mouse movement is following the game framerate and working nicely. I see there is still some kind of issue where "clicking" is making the screen refresh rate jump, but only clicking not moving, so this PR is working fine for me :D |
@alosarjos Does this happen consistently? I'm not able to see this on Sway. Tested doing menu navigation with Elden Ring Nightreign, which I capped at 60 (better than its built-in FPS limiter for VRR) with |
|
Video is not very good. But I think you can see it better on the second half of it. This is an OLED monitor, so when refresh rate jumps too fast, the brightness flickers. But not 100% sure on reproducibility, I got it first time, then I restarted game 3 times, and on the last one happened again. One curious thing tho, on the other clicking wasn't flickering, but there was this kind of time interval where the screen would go to the max refresh rate for a moment, in a very timed way. The only other game with HDR to see clearly the flickering is Kingdom Come Deliverance 2. I don't see any issue there (There is no cursor). But maybe it's a red herring and nothing to do with this. video.mp4 |
Following the idea from #1562, adds an
--adaptive-sync-ignore-cursoroption to clamp cursor updates to a game's refresh rate, preventing VRR from shooting to the max refresh rate on cursor movement.Follows the pattern used by
adaptive_sync_ignore_overlayConVar.Tested using the Wayland backend with Final Fantasy XIV. It has a built-in software cursor, but this method is much more responsive.