Framelimiting and Vsync introducing variable input lag?

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.
John1975
Posts: 6
Joined: 29 Oct 2015, 17:06

Framelimiting and Vsync introducing variable input lag?

Post by John1975 » 29 Oct 2015, 18:38

Hello, this is my first post here and I hope that someone can explain or even assist me in fixing this following behaviour I've noticed in many of my games.

Out of the box, most PC games have horrible framepacing with Vsync which causes constant stutter/judder and as such I usually have to additionally cap the framerate with something like RTSS or similar in order to get a reasonably smooth 60fps without judder, however doing so causes the input lag to change whenever the framerate has dropped.

I try to explain as best I can (with limited english)

The game runs at 60 FPS and feels accordingly responsive, now the framerate drops briefly for any reason (GPU load, loading screen ect.) and then after the framerate recovers back to 60 there is suddenly noticably more input lag, all inputs have more delay than before, now if the framerate drops again and then goes back up there will be less input lag and that goes on and on, after every framedrop the input lag seems to change, either increases or decreases.


This only seems to happen when I use any framelimiting tool in combination with Vsync, using just Vsync without any additional capping and the input lag remains consistent across framedrops, however without capping the frametimes are usually rather poor in most games causing judder.

It does not matter which framelimiter I use, whether external or in-game, the input method (gamepad or mouse) also seems irrelevant

This issue is more obvious if used with standard half refresh vsync to 30 FPS (Nvidia inspector), though I can also notice it at 60FPS, though not quite as pronounced.

Reducing the pre rendered number of frames lessens the issue, though it's still noticable.

I've noticed it for example in these games: The Witcher 3 60FPS (also at 30), Batman AK 30FPS, GTA V 30FPS, CoD Advanced Warfare 60FPS.
I have never noticed such behaviour with my PS4 games.
I also tested with a clean Windows 7 install, though that made no difference

I understand extra lag during a framedrop but not after one, so has anyone made similar experiences as I described above, is this normal on PC or is something wrong on my part and if so, what could it be?


Currently running:
Win 10 64 bit
GTX 970 3.5 GB (358.50)
Intel Core i7 2600k stock
8GB RAM
Asus vg248qe (running at 60HZ in these cases)

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

Re: Framelimiting and Vsync introducing variable input lag?

Post by Sparky » 30 Oct 2015, 07:13

May I ask why you're using the low refresh rate?

V-sync will always introduce input lag, but you can get rid of some of it by capping framerate below the refresh rate(this causes an occasional dropped frame, which shows up as judder). Capping it above the refresh rate does absolutely nothing, and the different tools have significant differences in input latency, due to where they're implemented. If you're going to use a framerate cap, the best option is to cap it in game.

Aside from g-sync/freesync, the best option I've seen so far for consistent latency is either vsync off with as high a framerate as possible, or vsync on with no framecap, while using GeDoSaTo with FlushGPUEveryFrame true. Which is better depends on how important responsive controls are to the type of game being played.

With g-sync or freesync, the best option is to cap framerate in game just below the monitor's max refresh rate, so you stay in the VRR window.

More details:

http://forums.blurbusters.com/viewtopic ... 8&start=20

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

Re: Framelimiting and Vsync introducing variable input lag?

Post by Glide » 30 Oct 2015, 09:54

External framerate caps are a bad fix for frame pacing.
Disable in-game V-Sync, set the driver to 1 Pre-Rendered Frame, and enable V-Sync in the driver.
That will solve frame pacing issues 99% of the time, without the problems that framerate limiters can introduce. (dropped frames, variable input lag etc.)

I also think it's strange that you're capping to 30 FPS with a 970 at 1080p.
It should be able to run most games at 60 FPS if you just reduce one or two of the more demanding settings.
John1975 wrote:I have never noticed such behaviour with my PS4 games.
Console games typically have more than 100ms of input lag, so plus or minus a frame won't make as much of a difference.

John1975
Posts: 6
Joined: 29 Oct 2015, 17:06

Re: Framelimiting and Vsync introducing variable input lag?

Post by John1975 » 30 Oct 2015, 10:11

@Sparky

If I use higher refresh rates the colors are getting a bit washed out on my monitor, so I only use high refresh rates if I can acually maintain high framerates, which is not the case in most games.

Why have I bought a 144HZ monitor in the first place?
Because at the time I thought that this would fix the consistent judder/stuttering issues that plagued me ever since I started playing on the PC, I did not know anything about framepacing and half refresh Vsync and such things nor had I any clue how PCs worked at that time, I probably still don't, but on recent consoles, Vsync Stutter/judder was almost never an issue (unless they drop frames) and I wanted a similar experience on PC.
Frankly a 60HZ IPS panel would have probably been better suited to me in hindsight but that can't be helped now...

What I ideally want is either a locked 60 FPS or locked 30 FPS without frequent tearing or judder.
Consistent tearing or judder are things I personally find unacceptable, it may occasionally happen, but it must not be constant, as such playing without Vsync is off the table for me, as tearing is even at 144HZ very obvious to me.

Capping below the refresh rate fixes the variable input lag though, as you said, introduces frequent judder which is not acceptable to me.

I understand that Vsync introduces latency, that on it's own is not bothering me all that much, what I fail to understand is why the latency is changing every time a frame is dropped, this is what is bothering me.

I could just stop using additional framerate caps, but just Vsync on it's own almost always causes constant judder from my experience, reducing pre rendered frames to 1 with Vsync and no cap gives me good results and no variable lag in a few games, but in most games it's not helping at all.
So I usually have the choice between constant tearing, Vsync with constant judder, or Vsync+RTSS without judder but variable input lag.
GeDoSaTo does not seem to work in 64 bit DX11 games at this time.
Is there any way to Vsync a game to either 30 or 60 without either judder and variable input lag?

@Glide What you suggest works well in a few games but in most it does not make a difference, there is still constant judder..

Even with a 970 there are quite a few games that I can't keep at consistent 60 even with lower settings (Batman, GTAV ect.) so I just cap them to 30 with higher settings,decently paced 30 FPS are "fine",or at least better than inconsistent 60 FPS to me.

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

Re: Framelimiting and Vsync introducing variable input lag?

Post by Glide » 30 Oct 2015, 13:01

John1975 wrote:Why have I bought a 144HZ monitor in the first place?
Because at the time I thought that this would fix the consistent judder/stuttering issues that plagued me ever since I started playing on the PC, I did not know anything about framepacing and half refresh Vsync and such things nor had I any clue how PCs worked at that time
G-Sync is the solution to that - though it still won't fix games where the engine is causing the stutters.
John1975 wrote:I probably still don't, but on recent consoles, Vsync Stutter/judder was almost never an issue (unless they drop frames) and I wanted a similar experience on PC.
It's a constant issue with console gaming in my experience.
John1975 wrote:I could just stop using additional framerate caps, but just Vsync on it's own almost always causes constant judder from my experience, reducing pre rendered frames to 1 with Vsync and no cap gives me good results and no variable lag in a few games, but in most games it's not helping at all.
Can you list some games? In almost everything that I have tested, this completely fixes any frame pacing issues when V-Sync is enabled.
Some of my testing is detailed here in this topic.

Are you running games in borderless windowed or fullscreen? You'll rarely ever get good frame-pacing in windowed mode. (though you might get erroneous results in a tool like Afterburner which makes it look like you have good frame-pacing on the graph)

And of course, with a fixed refresh rate, the only way to eliminate stutter is to ensure that your framerate never drops. If it's dropping at all, that's not a frame pacing issue but a performance issue instead.
John1975 wrote:Even with a 970 there are quite a few games that I can't keep at consistent 60 even with lower settings (Batman, GTAV ect.) so I just cap them to 30 with higher settings,decently paced 30 FPS are "fine",or at least better than inconsistent 60 FPS to me.
I understand preferring a solid 30 instead a fluctuating framerate.
I just don't find 30 acceptable and will turn everything down to achieve a solid 60.

John1975
Posts: 6
Joined: 29 Oct 2015, 17:06

Re: Framelimiting and Vsync introducing variable input lag?

Post by John1975 » 30 Oct 2015, 14:38

Some games I have installed where reducing pre rendered frames to 1 still produces judder (60 FPS regular driver Vsync, 30 FPS standard 1/2 Refresh Vsync):

The Witcher 3 At both 60FPS or 30 FPS constant judder
Sniper Elite 3 60 FPS slight judder
Dying Light 30 or 60 frames constant judder
Dishonored 60 FPS slight judder
Batman Arkham Knight 30 FPS constant judder
Divinity Original Sin Enhanced Edition 60 FPS constant judder


In all of the above mentioned games I can only eliminate the judder by capping the framerate with RTSS, but then theres these input lag changes at framedrops.

I always run in fullscreen, borderless window or window gives me plain stuttering.

I have adjusted my in-game settings so that my framerate never drops below it's target during gameplay, though brief drops during loading screens, menu transitions, checkpoints ect. I simply can't avoid.

I have my PS4 connected to my monitor ( I prefer it that way) and generally most games I have there are very smooth and responsive (as "responsive" as 30 gets), no sight of Vsync judder (Bloodborne has it though) or other anomalies so long as they hold the framerate of course, so no, I can't say I have these issues on PS4, though I noticed nasty framepacing issues in some old Xbox 360 games...

Trip
Posts: 157
Joined: 23 Apr 2014, 15:44

Re: Framelimiting and Vsync introducing variable input lag?

Post by Trip » 30 Oct 2015, 15:40

I would recommend you to put the refresh rate to the highest value. Put the pre rendered frame option to 1 and running fullscreen. That is pretty much the best way to reduce both input latency and judder with vsync. When you enable rtss its frame capping you only create more buffers and hence a smoother image at the cost of latency. If it still feels juddery or laggy it is probably the general performance of the game which can sometimes be improved by lowering image quality.
Mouse report rate can also be put to a 1000hz for a little more smoothness and responsiveness especially at higher frame rates.
But better I would just recommend you to turn off vsync altogether. Personally I prefer the frame rate as high as it can go with as high of a refresh rate you can get. That most of the time gives me the smoothest and most responsive gameplay. I don't get all the fuss about screen tearing really. It only looks really bad at lower framerates and when you enable vsync at those low framerates the lag will always be bad because the framerate is already too low.
Vsync is great for movies and games played with a controller atleast in its current state. Or maybe at the point where framerates are that high that you won't notice the lag at all but what is the point of vsync anyway at that frame rate since you won't notice the tearing anyway.
Gsync alleviates this problem a little bit but it still doesn't feel as responsive as without it.
Atleast that is how I feel about this whole thing. I bought an acer xb270hu solely for gsync hoping it would be the greatest thing ever allowing me to finally enjoy a tear free lag free image. But the thing I like more about this monitor in the end is its ulmb setting and the nice colours ips gives. That is after upgrading from a tn 120hz screen.

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

Re: Framelimiting and Vsync introducing variable input lag?

Post by Sparky » 30 Oct 2015, 17:17

John1975 wrote:I understand that Vsync introduces latency, that on it's own is not bothering me all that much, what I fail to understand is why the latency is changing every time a frame is dropped, this is what is bothering me.
Perhaps this is best explained with a graph:

Image

This is a graph of input latency over time. The framerate cap isn't perfectly synchronized with the refresh rate, so input latency will either drift up to the red line as the buffer fills(if the framerate is slightly above the refresh rate), or it will drift down until the buffer runs out and it drops a frame(if the framerate is slightly under refresh rate). When it drops a frame, the frame was still rendered, and still gets displayed, but it waits for the next refresh, and delays subsequent frames accordingly.

The 'fuzziness' is due to the random sample timing vs the refresh timing, nothing to do with the render chain.

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

Re: Framelimiting and Vsync introducing variable input lag?

Post by Glide » 30 Oct 2015, 20:25

John1975 wrote:The Witcher 3 At both 60FPS or 30 FPS constant judder
Ensure that you have the in-game FPS cap disabled. It is known to cause bad frame-pacing.
This makes me wonder what your testing method is for checking frame-pacing though.
On my 960 there are no frame-pacing issues at 60 FPS.

If you have a gamepad:
  • Open up the config file: %USERPROFILE%\Documents\The Witcher 3\user.settings
  • Change RightStickCameraSensitivity to something very low like 0.05
Now load up the game, stand in one spot, and hold the right stick in a direction to spin the camera.
Or better yet, map it to a button if you have software to remap your controller.

There is absolutely no judder whatsoever on my system as long as the Max Pre-Rendered Frames is set to 1, the in-game FPS cap is disabled, and the in-game V-Sync option is replaced with driver-based V-Sync.

Now the game itself may stutter as it's loading in things when you move around, since it's an open-world game, but that's not a frame-pacing issue.
I have not spent much time with the game, so I don't know whether that is common, if it's an I/O issue (whether a faster SSD, or loading it from a RAM Disk would help), or a general problem with that engine.
John1975 wrote:Dishonored 60 FPS slight judder
I'll have to download that again to test it, but I don't remember there being any problems with that game - and I played through it on a 570 at the time.
Those are the only two from your list that I own though.
John1975 wrote:In all of the above mentioned games I can only eliminate the judder by capping the framerate with RTSS, but then theres these input lag changes at framedrops.
Strange, because I've never seen RTSS improve frame-pacing as long as the maximum pre-rendered frames setting was at 1.
Implementing an RTSS cap usually results in similar behavior, because it seems to prevent the game from rendering those additional frames through a different method, but the way that it caps the framerate means that games are more likely to drop a frame and stutter every so often - even if I'm playing really old games that are not demanding at all.

And yes, I have noticed the variable input lag that you mention when using an RTSS cap - that's part of the reason that I don't use external framerate caps.
I would actually suggest using a game's own V-Sync implementation if it is good (i.e. no stutter) rather than driver-based V-Sync if your concern is variable input lag.
Trip wrote:I would recommend you to put the refresh rate to the highest value. Put the pre rendered frame option to 1 and running fullscreen. That is pretty much the best way to reduce both input latency and judder with vsync.
I have heard people say that using the "1/2 refresh V-Sync" option at 120Hz can be smoother than regular V-Sync at 60Hz, so it's certainly worth trying.
I wouldn't use 144Hz since that requires the games to run at 72 FPS.
Trip wrote:But better I would just recommend you to turn off vsync altogether. Personally I prefer the frame rate as high as it can go with as high of a refresh rate you can get. That most of the time gives me the smoothest and most responsive gameplay. I don't get all the fuss about screen tearing really. It only looks really bad at lower framerates and when you enable vsync at those low framerates the lag will always be bad because the framerate is already too low.
Screen tearing happens at any framerate, and I don't think it's that much better that 144Hz.
However you can't have smooth gameplay if V-Sync is off.
You can have high framerates, which will make the game very responsive, but you will get stuttering because the framerate is not being synchronized to the refresh rate.

Since you prefer ULMB and V-Sync off to G-Sync, I guess you just don't notice that sort of thing.

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

Re: Framelimiting and Vsync introducing variable input lag?

Post by Glide » 31 Oct 2015, 00:04

My download finished for Dishonored, and the game is perfectly smooth on my 960.
No stuttering at all, even with SGSSAA enabled - though that should be expected since it was locked to 60 FPS on my old 570.

Image
(spikes at the start are the loading screens)

If you're seeing issues with this game after setting the maximum pre-rendered frames to 1, I'd suggest that you're seeing something else that is not a frame-pacing issue.

Post Reply