Page 1 of 2

How can I minimize input lag on fallout 4 ?

Posted: 11 May 2018, 09:46
by Modinstaller
Hi. My monitor is an acer G246HL (1920x1080 60hz 5ms with no gsync nor freesync).

The game I'm trying to make playable (fallout 4) has forced vsync. Disabling it breaks some aspects of the game, like other time-step engine games such as skyrim.

With vanilla settings, I experience noticeable input lag. I'm not sure how to go about testing exactly how much input lag it is, but I find it very unfun and on the brink of unplayable.

Disabling vsync makes it obvious that this is not just placebo, the game becomes playable again and I can finally aim at the baddies without feeling like a snail on ice.

Disabling vsync and capping at 60 with rtss introduces a near-stationary tearline. A bit less or a bit more makes the tearline mobile and as such more noticeable. Higher or lower values make the tearing less noticeable, but are less than ideal because of either broken physics or low fps.

Is there any better solution ? Would changing monitors be one ?

Thanks for taking the time to help :)

Re: How can I minimize input lag on fallout 4 ?

Posted: 11 May 2018, 10:12
by Chief Blur Buster
Disabling VSYNC + RTSS cap 60 (or near) + using Fast Sync (NVIDIA) or Enhanced Sync (AMD) can be a great solution.

See HOWTO: Low Lag VSYNC ON but using the FAQ in combination with Fast Sync or Enhanced Sync instead of VSYNC ON.

But yes, changing monitors have often helped too -- variable refresh rate displays are VERY good for these situations. VRR displays can produce a low-lag fixed-Hz that looks like VSYNC ON but without the lag of VSYNC ON. Especially with 144Hz and 240Hz VRR displays. Variable refresh rate displays also benefit fixed-framerate situations by massively reducing input lag of fixed-framerate and capped framerate situations (e.g. 60fps caps). A VRR display gives you the lowest-lag-possible "VSYNC ON" look.

As a bonus, it can eliminate stutters caused by floating framerates -- See simulated animation at http://www.testufo.com/vrr

Check out the GSYNC and FreeSync lists bbelow if you're looking for models.

Re: How can I minimize input lag on fallout 4 ?

Posted: 11 May 2018, 12:56
by RealNC
I used the low-lag vsync method for a long time in Fallout 4 prior to getting a g-sync monitor. It works very well. Not only does it get rid of lag, it also gets rid of stutter, since the game's own vsync support is broken and can stutter a lot. So make sure you disable the game's vsync.

Another setting that has a huge effect in this game is the "max pre-rendered frames" setting. Set it to 1 in the nvidia panel in order to get a big lag reduction in cases where the game falls below 60FPS.

Re: How can I minimize input lag on fallout 4 ?

Posted: 11 May 2018, 15:40
by Modinstaller
Wow, it works like a charm ! I can't notice anymore input lag than with vsync off.

I have a few more questions about all this if you don't mind :

1. Why should I cap the fps to 59.984 instead of 60 ? I don't see any difference but I probably haven't tried either for long enough to really notice.

2. If I don't cap the fps with rtss, it's not capped to 60. Isn't it supposed to be "capped" to 60 considering that fast sync is a type of vsync ? Or did I misunderstand something ?

3. I read that I should have at least twice my refresh rate (120 fps) constantly if I'm to use fast sync. Is this bs, or should I lower my settings a bit ?

4. It works so well that I'm wondering what reason I'd have to get a vrr monitor. What is gsync going to bring ? Does fast sync cause a hit on performance ? Would gsync work better ? Even smoother movement ? Less stuttering ?

5. Is setting max pre-rendered frames to 1 only useful for <60 fps cases ? I've never seen fps drop below 60 until now so in that case should I just keep it to default ?

6. Will this fast sync + rtts combination work for any game ? Now that I know about this, might as well make the best use of it. Less input lag can't hurt, even in games where it matters less.

In any case thanks to both of you ! The experience is much better now.

Re: How can I minimize input lag on fallout 4 ?

Posted: 11 May 2018, 19:40
by RealNC
Modinstaller wrote:1. Why should I cap the fps to 59.984 instead of 60 ? I don't see any difference but I probably haven't tried either for long enough to really notice.
Capping below the refresh rate ensures that the game does not send more frames to be displayed while a previous frame is currently still being held in a buffer and waiting for the monitor to finish displaying the current frame.

Keeping the frame buffers empty ensures the least amount of input lag possible with vsync, and it's the main reason why the "low latency vsync" method exists. On a 60Hz monitor, every additional frame that gets stuck in a buffer waiting for vsync increases input lag by 16.7ms.
2. If I don't cap the fps with rtss, it's not capped to 60. Isn't it supposed to be "capped" to 60 considering that fast sync is a type of vsync ? Or did I misunderstand something ?
Fast sync runs the game uncapped, or capped at a multiple of the refresh rate. The game is not synced to the monitor. The driver then picks the latest available frame the game has rendered and displays it with vsync.

In other words, with fast sync, the game runs without vsync and renders as fast as possible, but the driver doesn't display the frames. It throws them away and only picks the latest one. This is why fast sync has some micro stutter that normal vsync doesn't have.
3. I read that I should have at least twice my refresh rate (120 fps) constantly if I'm to use fast sync. Is this bs, or should I lower my settings a bit ?
That's correct. In fact, for fast sync to be really good (least amount of micro stutter,) you need 300+ FPS. However, this is not recommended with Fallout 4 (or any of the Bethesda RPGs.) 60FPS is the limit if you don't want physics to bug out.

Fast sync can still be used with 60FPS, but there might be some more micro stutter.
4. It works so well that I'm wondering what reason I'd have to get a vrr monitor. What is gsync going to bring ? Does fast sync cause a hit on performance ? Would gsync work better ? Even smoother movement ? Less stuttering ?
Fast sync needs insanely high FPS to work well (300+). Also, it doesn't do anything if the game's FPS falls below the refresh rate. On 60Hz for example, if the game can't reach 60FPS, fast sync will stutter just like vsync. With g-sync, there is no stutter. You can view a simulation of this here:

https://www.testufo.com/gsync
5. Is setting max pre-rendered frames to 1 only useful for <60 fps cases ? I've never seen fps drop below 60 until now so in that case should I just keep it to default ?
If the game always gets frame limited (meaning it reached the FPS you've capped it to,) it doesn't matter what you set it to. The frame cap prevents the game from preparing more frames in advance, no matter how high you set this setting.

For Fallout 4, setting it to 1 seemed best for me. For some other games, 2 fixes some stutter issues for some people.
6. Will this fast sync + rtts combination work for any game ? Now that I know about this, might as well make the best use of it. Less input lag can't hurt, even in games where it matters less.
In my experience, fast sync with this method doesn't have any advantage over vsync. In fact, it can result in more "hiccups" in animations. Are you sure fast sync gives you lower latency here than vsync?

But to answer you question: yes. Fast sync works with the majority of games out there.

Re: How can I minimize input lag on fallout 4 ?

Posted: 12 May 2018, 03:56
by Modinstaller
Aaah. So it seems the real hero here is the 59.984 cap. The difference between cap and no cap with vsync is like night and day.

And you're right, the difference between vsync and fast sync with the cap is nearly imperceptible. I think I have a bit less input lag with fast sync, but honestly it may very well be placebo and either is fine. I do have some rare random stutters with fast sync though, so I think I'll be going with vsync.

It's amazing that more people don't know about this. I mean vsync is infamously known for its input lag, but the cap makes the problem magically disappear ! Vsync in all games and drivers should automatically cap the fps like rtss does, or at worst notify the user about this trick. How come it's not common knowledge ? Does it have any downside ?

On question if I may ... I'm trying to understand this correctly. Why does capping 0.01s below the monitor's refresh rate improve vsync's input lag so much ? Does it reduce input lag by 16.6 ms at best ? Because I feel the difference to be quite big.

Edit : capping at 60 with rtss also reduces input lag for vsync. I feel no real difference compared to capping to 59.984. So rtss is just black magic that reduces vsync input lag, for some reason. I'm really confused here !

Re: How can I minimize input lag on fallout 4 ?

Posted: 12 May 2018, 04:36
by RealNC
Modinstaller wrote:On question if I may ... I'm trying to understand this correctly. Why does capping 0.01s below the monitor's refresh rate improve vsync's input lag so much ? Does it reduce input lag by 16.6 ms at best ? Because I feel the difference to be quite big.
As already mentioned, it prevents the game from rendering frames while the current frame has not finished displaying yet. The monitor needs time (16.7ms in 60Hz mode) to scan out a frame. During that time, the game is actually free to render more frames (vsync does not cap the frame rate - it bottlenecks the frame rate.) Those frames can't be displayed, but they are stored in a buffer for later use. Vsync input lag is nothing more but the accumulation of those frames. If this buffer can be kept empty, the lag goes away. Using a frame limiter keeps that buffer empty.

It also prevents the game from preparing yet-to-be-rendered frames. Normally, how many frames are being prepared is controlled by the "max pre-rendered frames" setting in the nvidia panel. Even when set to 1, there's at least one such frame. A frame limiter prevents the game from preparing even a single frame too soon, and thus lowers input lag further.

In total, using frame-limited vsync can reduce latency by 3 frames, which is a whooping 50ms. This is the best-case latency reduction. In reality, you are cycling between 2 and 3 frames of reduced latency. The latency is not actually as good as VRR (g-sync or freesync). But much better than nothing, obviously.

Re: How can I minimize input lag on fallout 4 ?

Posted: 12 May 2018, 05:10
by Modinstaller
Thanks for the explanation !

Still pretty confused why this method isn't more common. If I were nvidia or amd I'd have already made something to apply this fix automatically to vsync after detecting the monitor's real refresh rate. That is if it doesn't have any added downside of course.

In any case, it works and I learned a bit more about monitors, so I'm really glad I posted here. Pretty awesome forum you've got here :)

Re: How can I minimize input lag on fallout 4 ?

Posted: 12 May 2018, 09:42
by KKNDT
RealNC wrote: As already mentioned, it prevents the game from rendering frames while the current frame has not finished displaying yet. The monitor needs time (16.7ms in 60Hz mode) to scan out a frame. During that time, the game is actually free to render more frames (vsync does not cap the frame rate - it bottlenecks the frame rate.) Those frames can't be displayed, but they are stored in a buffer for later use. Vsync input lag is nothing more but the accumulation of those frames. If this buffer can be kept empty, the lag goes away. Using a frame limiter keeps that buffer empty.

It also prevents the game from preparing yet-to-be-rendered frames. Normally, how many frames are being prepared is controlled by the "max pre-rendered frames" setting in the nvidia panel. Even when set to 1, there's at least one such frame. A frame limiter prevents the game from preparing even a single frame too soon, and thus lowers input lag further.

In total, using frame-limited vsync can reduce latency by 3 frames, which is a whooping 50ms. This is the best-case latency reduction. In reality, you are cycling between 2 and 3 frames of reduced latency. The latency is not actually as good as VRR (g-sync or freesync). But much better than nothing, obviously.
I have read the low-lag VSYNC method and learnt how lag is caused by buffer pile up from many of your posts. Thanks a lot.

But I still have a question. Wouldn't it cut the frame rate to half of the refresh rate due to the frame time being longer than a refresh cycle(Assuming the system is very powerful) ?

Re: How can I minimize input lag on fallout 4 ?

Posted: 12 May 2018, 10:13
by RealNC
KKNDT wrote:But I still have a question. Wouldn't it cut the frame rate to half of the refresh rate due to the frame time being longer than a refresh cycle(Assuming the system is very powerful) ?
Nope. This only happens when the game takes longer than 16.7ms (with 60Hz vsync) to actually render the frame. The FPS halving only occurs when render times are too long, not when frame presention times are too long. An FPS limiter controls frame presentation times.

In other words, a game that is susceptible to this would experience FPS halving if it would, say, run at 50FPS uncapped. But if it would run with 60FPS or higher when uncapped but you use a frame limiter to artificially cap it to 50FPS, then there will not be any FPS halving; the game will simply run at 50FPS instead of 30, even with vsync ON.

This is because when using a frame limiter, the back buffer (the buffer that holds the frame to be displayed next) actually contains a frame that is ready. It's just being held back by the frame limiter. When the game is unable to reach the frame rate cap however, that means the back buffer is NOT ready yet - the game is taking too long to render the next frame and put it into that buffer. So since there's no frame in the back buffer, there's nothing to send to the monitor when the vsync signal occurs, and instead the front buffer is sent again to the monitor. That means the frames are displayed twice, and thus FPS is halved.