Is it possible to disable Vsync in Unreal Engine 4?

Hello,

I am having a hard time figuring out how to disable Vsync in UE4. I am very sensitive to input lag and I can definitely feel the imprecision of my input then Vsync is enabled.

I’ve tried following already:

Disabling smooth framerate:
Did not reduce input lag

Setting r.Vsync to 0:
Did not reduce input lag - screen tearing in the editor is still not present, implying that Vsync is still enabled

Setting r.VsyncEditor to 0:
Did not reduce input lag - screen tearing in the editor is still not present, implying that Vsync is still enabled

Override Vsync state for Unreal Editor executable in nVidia Control Panel
No effect, screen tearing is still not present, input has still some delay.

Disabling TXAA:
No effect, screen tearing is still not present, input has still some delay.

I am suspicious it may have something to do with 120FPS cap. Does anyone know how to remove the cap, or what else could I try? I am almost 100% sure there is still some vertical synchronization happening, because when it is not, I always get strong screen tearing on my 60Hz screen. And I can not observe any at all in the editor, and at the same time, I can constantly feel that very familiar Vsync input delay.

Thanks in advance.

try



t.MaxFPS 500


Altho it will not turn off vsync, it just remove the cap. Maybe it’s your VGA driver that puts up the sync options, check that out too.

Hey, thank you!

Believe or not, this actually fixed it. Seems like framerate capping is responsible for some of the mouse latency on its own. Thank you.

I believe! :slight_smile:

There are a couple of places in the rendering flow that cause latency, systemrs running in separate threads usually fall behind a frame or two of the renderer. Afaik the game thread is lagging behind a frame, and it is the one where the control inputs coming from so you can experience a little latency here. Higher the framerate, less the latency will be noticed. At 120fps it is equivalent of a half frame time at 60fps aka 8.3msec. That’s require some crazy reaction time.

Hi, sorry to necromance this thread. I am just watching this https://www.youtube.com/watch?v=hcxetY8g_fs video and the guy keeps stressing the importance of disabling Vsync for profiling. If I turn of Vsync in UE4, and run game in the standalone mode, my FPS is indeed not locked to my monitor refresh rate, but I still can’t tell that some sort of Vsync is in place, because no matter what I try, I can not get the horizontal screen tearing I expect to see when Vsync is off.

The only reason for this I can figure out is that UE4 would somehow have hardcoded “FastSync” in, which basically drops frames that are not drawn in time for next screen update and prevents tearing that way, but even if I go to nVidia control panel to make sure even FastSync is off, I am still not getting any screen tearing. Another suspicion is Windows’ double buffering, but that should go away as soon as the game runs fullscreen.

Any ideas?
Thanks in advance.

In Vulkan at least, and I’m sure DirectX as well, they have various modes for how to handle presentation of frames:

https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkPresentModeKHR.html

As you can see there are more than just vsync on and vsync off. I haven’t looked into the Unreal RHI internals, but with some presentation modes you can have a higher frame rate than refresh rate and still no tearing (for example it just presents the last frame posted at monitor refresh time, discarding old frames, presented or not, as new ones come in).

This is a 5 year old thread. I’ve learned a lot since. The input lag in UE5 is not just because of Vsync, but also other settings. Unreal Engine defaults prioritize performance smoothness over input latency minimization.

Here’s more info: Low Latency Frame Syncing | Unreal Engine 4.27 Documentation

Basically, there are a few Cvars you can, or have to tweak if you are making a game where input latency really matters (online competitive FPS for example).