Solution to Tearing, Microstutters and Input lag (VSync)

Everything about latency. Tips, testing methods, mouse lag, display lag, game engine lag, network lag, whole input lag chain, VSYNC OFF vs VSYNC ON, and more! Input Lag Articles on Blur Busters.
Post Reply
Luckylock
Posts: 4
Joined: 28 Nov 2015, 10:20

Solution to Tearing, Microstutters and Input lag (VSync)

Post by Luckylock » 27 Aug 2016, 00:04

Edit: Fast Sync (nvidia only), or G-Sync / FreeSync (perhaps with a capped framerate?) is a much better option, if it works for the specific game you want to play (Fast Sync doesn't seem to work for all games).




I play old twitch shooters a lot (competitively at one point). I've identified 3 main problems, aside from bad hardware / peripherals that affect my aim in a negative way.

1) Input lag (for the sake of this thread, usually fixed by turning VSync OFF)
2) Screen tearing (fixed by turning VSync ON)
3) Microstutters (fixed by having stable locked framerate)

I've found a way, I believe, to get rid of those 3 problems. It is required that your rig is able to handle framerate above your refresh rate persistently.



VSync

I've never bothered with VSync until recently. I've found it added too much input lag while playing Quake Live, CS:GO or Left 4 Dead 2 (or any other games for that matter). Over the years I've acquired a beastly machine, great mouse, 144hz monitor etc. I have always played games with uncapped 300+ framerate playing on low settings for maximum performance.

I was recently made aware of how much screen tearing negatively affects aiming.

Also, as I understand it now, the reason why VSync adds input lag when your game can handle framerate above your refresh rate is because the game renders ahead, puts the frames in a "buffer" and then waits for the monitor's refresh cycles.

So how do you get rid of VSync's input lag? By locking your fps.



In-game FPS Limiters

According to different sources, the input lag caused by VSync can be significantly reduced by manually locking your framerate "at least 2 fps below" your refresh rate. (Example: In CSGO with a 144hz monitor, you would use fps_max 142 while using VSync ON)

It effectively makes the monitor wait for the game, not the opposite, which indeed reduces the input lag greatly. However this method introduces another inherent problem since you will see repeated frames: Microstutters.

The reason why you lock your FPS "at least 2 fps below" is because the in-game FPS limiter isn't precise enough, and the FPS would otherwise, every now and then, fluctuate and render over the 144 FPS mark introducing a great amount of input lag in the process.

The ultimate solution to this is to use a rock solid FPS capping utility called RivaTuner Statistics Server.



RivaTuner Statistics Server

This application uses a "proper framerate limiting approach for SMOOTH framerate [...] a simple wait loop executed on CPU to provide expected target frame timing"1. Basically, the FPS cap is very precise and butter smooth.

That means you can set the cap to exactly match your refresh rate (in my case 144) without fear of your FPS fluctuating and going above your maximum refresh rate. It will prevent the game from rendering ahead, effectively reducing VSync's input lag.

----------------

Input lag is greatly reduced, screen tearing is non-existent and there is absolutely zero microstutters.

I have no measurement tools to back up my findings. I believe it potentially gives the best solution for butter smooth gameplay with minimum input lag. Try it out! If you've played with screen tearing all your life, you miss out big time on fluidity.

Also, let me know if works for you please! I am really enjoying the VSync experience now. Cheers.


-> Forcing VSync "ON" through nvidia control pannel
1http://forums.guru3d.com/showthread.php?p=4443926
Last edited by Luckylock on 27 Aug 2016, 10:49, edited 4 times in total.

User avatar
lexlazootin
Posts: 1251
Joined: 16 Dec 2014, 02:57

Re: Solution to Tearing, Microstutters and Input lag (VSync)

Post by lexlazootin » 27 Aug 2016, 04:19

Have you tried G-Sync/FreeSync or Nvidia's new "FastSync"?

They could probably fix your issue entirely with better results! :D

Sparky
Posts: 682
Joined: 15 Jan 2014, 02:29

Re: Solution to Tearing, Microstutters and Input lag (VSync)

Post by Sparky » 27 Aug 2016, 05:31

Unless they've changed their implementation in the last year or so, RTSS isn't a synchronous framerate cap. It will either do nothing to reduce latency, or it will cause frame dropping just like an in-game framerate cap(though with an additional frame of latency over an in game cap).

RTSS is however lower latency than the radeonpro framerate cap.

The "at least 2 fps lower" part is also not really accurate. If it's AT ALL lower, you'll get the latency reduction, and you'll also get stutter(if your cap is 2fps lower than your refresh rate, you'll repeat 2 frames every second, if it's 0.1fps lower, you'll repeat a frame once every 10 seconds). If the cap is AT ALL higher than refresh rate, the latency creeps up to normal uncapped vsync.

In many implementations, the framerate doesn't end up at exactly what you set the cap to, this depends on how framerate is limited, this is probably where that "2 fps lower" idea comes from.

fast sync (or other frame dropping buffering schemes like fullscreen windowed) will give similar results to framerate capped vsync, except that the the maximum input lag can be lower due to the higher framerate. You still get judder if your framerate isn't an exact multiple of refresh rate.

The best fix within the power of a game dev is a refresh synchronous framerate cap. The best fix within the power of a consumer is a variable refresh monitor.

Also, "microstutter" refers to a pacing issue typically seen in multi GPU setups with AFR. The game engine sees a pattern of short long short long frames, and then those frames get displayed with even pacing, or vice versa. The result is that you can have animation stuttering even if your framerate stays solid at 60fps(or whatever your refresh rate is). "Hitches", "judder", "repeated frames", or "missed frame deadline" would more accurately describe whats happening when you cap framerate with vsync on.

User avatar
lexlazootin
Posts: 1251
Joined: 16 Dec 2014, 02:57

Re: Solution to Tearing, Microstutters and Input lag (VSync)

Post by lexlazootin » 27 Aug 2016, 09:43

A frame rate capping solution which i don't see many people doing for some reason is the one inside of Nvidia Inspector. It lets you do driver level fps caps which work pretty well and has selectable options for exactly what you're talking about.

I use it all the time for Fallout 4 playing at 90fps with my G-Sync and there is no judder what so ever.

http://imgur.com/a/fHOjz if it doesn't have the option you want just type it into the box and it will accept it.

Sparky
Posts: 682
Joined: 15 Jan 2014, 02:29

Re: Solution to Tearing, Microstutters and Input lag (VSync)

Post by Sparky » 27 Aug 2016, 10:07

lexlazootin wrote:A frame rate capping solution which i don't see many people doing for some reason is the one inside of Nvidia Inspector. It lets you do driver level fps caps which work pretty well and has selectable options for exactly what you're talking about.

I use it all the time for Fallout 4 playing at 90fps with my G-Sync and there is no judder what so ever.

http://imgur.com/a/fHOjz if it doesn't have the option you want just type it into the box and it will accept it.
It's better than nothing, but it's still more latency than an in-game cap.

Luckylock
Posts: 4
Joined: 28 Nov 2015, 10:20

Re: Solution to Tearing, Microstutters and Input lag (VSync)

Post by Luckylock » 27 Aug 2016, 10:46

lexlazootin wrote:Have you tried G-Sync/FreeSync or Nvidia's new "FastSync"?

They could probably fix your issue entirely with better results! :D
G-sync and Free-sync are only solutions for framerates below your maximum refresh rate. If your FPS is above your refresh rate even with G-Sync and Free-sync I believe (correct me if I'm wrong, I don't have such a monitor) it will either act the same as VSync (input lag) or turn off completely (tearing). Limiting your framerate below your maximum refresh rate is still recommended in that case as well. Besides, not everyone has the newer monitors.

About FastSync: Yeah, someone made me aware of that new feature yesterday shortly after I posted on another website. It's a much better option! I got it working for CS:GO but not for Quake Live. Unfortunately it doesn't seem like it works on every game.

Sparky
Posts: 682
Joined: 15 Jan 2014, 02:29

Re: Solution to Tearing, Microstutters and Input lag (VSync)

Post by Sparky » 27 Aug 2016, 11:05

Luckylock wrote:
lexlazootin wrote:Have you tried G-Sync/FreeSync or Nvidia's new "FastSync"?

They could probably fix your issue entirely with better results! :D
G-sync and Free-sync are only solutions for framerates below your maximum refresh rate. If your FPS is above your refresh rate even with G-Sync and Free-sync I believe (correct me if I'm wrong, I don't have such a monitor) it will either act the same as VSync (input lag) or turn off completely (tearing). Limiting your framerate below your maximum refresh rate is still recommended in that case as well. Besides, not everyone has the newer monitors.

About FastSync: Yeah, someone made me aware of that new feature yesterday shortly after I posted on another website. It's a much better option! I got it working for CS:GO but not for Quake Live. Unfortunately it doesn't seem like it works on every game.
Yes, but it makes the capping framerate option much more effective, reducing average latency by half a frame and maximum latency by a full frame when compared to vsync with a framerate cap, while getting rid of the stutters caused by the cap. If it's an in game cap, the latency is even lower than fast sync at high framerates(all else being equal).

Luckylock
Posts: 4
Joined: 28 Nov 2015, 10:20

Re: Solution to Tearing, Microstutters and Input lag (VSync)

Post by Luckylock » 27 Aug 2016, 11:20

Sparky wrote: Yes, but it makes the capping framerate option much more effective, reducing average latency by half a frame and maximum latency by a full frame when compared to vsync with a framerate cap, while getting rid of the stutters caused by the cap. If it's an in game cap, the latency is even lower than fast sync at high framerates(all else being equal).
Completely agree, I might consider a G-Sync / FreeSync monitor in my next purchase. I've noticed Fast Sync has microstutters as well while trying it on CS:GO.

Glide
Posts: 280
Joined: 24 Mar 2015, 20:33

Re: Solution to Tearing, Microstutters and Input lag (VSync)

Post by Glide » 30 Aug 2016, 11:49

The best way to minimize input lag when using V-Sync without introducing stutter is to set the maximum pre-rendered frames (flip queue) to 1 and use regular V-Sync.
Fast Sync should only be used when you can keep your minimum framerate above 2x the refresh rate, otherwise it will stutter.
The reason that people seem to think that Fast Sync is faster than V-Sync when your framerate is <2x the refresh rate, is because it automatically forces the flip queue to 1.

Using a framerate cap in conjunction with V-Sync can potentially reduce input lag a little bit further by pushing rendering time closer to the refresh, but in my experience it almost guarantees that a game will stutter as it misses sync every few seconds as a result.

Post Reply