VulkanMod icon indicating copy to clipboard operation
VulkanMod copied to clipboard

Unstable frametime with VSync enabled

Open rsxrwscjpzdzwpxaujrr opened this issue 2 years ago • 4 comments

Unstable frametime with VSync enabled

I have a 75 Hz refresh rate monitor. With VSYNC enabled, I should have had a stable 13 ms frame time, like in vanilla. Instead, I'm getting a repeating pattern of one very fast frame, two 13 ms frames, and one ~26 ms frame.

Here's a screenshot with the bug: 2024-11-20_01 42 39

Here's vanilla for the comparison: 2024-11-20_01 45 22

Steps to reproduce

  1. Change render distance and simulation settings to the minimum
  2. Enable VSync
  3. Disable FPS limit
  4. Create a superflat world
  5. Look straight down
  6. You get unstable frametimes

Log files

2024-11-20-2.log

rsxrwscjpzdzwpxaujrr avatar Nov 19 '24 22:11 rsxrwscjpzdzwpxaujrr

Seems like it's reproducible only on X11. On wayland (with patched glfw) it's fine. 2024-11-25_23 28 41

rsxrwscjpzdzwpxaujrr avatar Nov 26 '24 16:11 rsxrwscjpzdzwpxaujrr

This is a very old Nvidia-specific bug that effects all VulkanMod versions, driver versions and platforms, including Windows (My GTX 1080 Ti has broken VSync on both Windows and X11 as well)

Wayland, Nvidia Optimus devices, and windowed mode on Windows are the only exceptions to my knowledge As iirc they prevent screen tearing, which seems to suppress the stutter (When VSync is Enabled) (i.e. like the in-game FPS Limiter)

ATM i'm currently working with Collateral on a experimental fix for this

If the fix works and doesn't cause any problems/bugs of its own, it should hopefully be included in either 0.5.2 or a later VulkanMod version at some point

thr3343 avatar Nov 30 '24 17:11 thr3343

Wayland, Nvidia Optimus devices, and windowed mode on Windows are the only exceptions to my knowledge As iirc they prevent screen tearing, which seems to suppress the stutter (i.e. like the in-game FPS Limiter)

Actually, Wayland doesn't limit the framerate if I disable VSync. 2024-12-09_02 10 50

rsxrwscjpzdzwpxaujrr avatar Dec 08 '24 22:12 rsxrwscjpzdzwpxaujrr

@rsxrwscjpzdzwpxaujrr Is it still an issue? Else this can be closed

Versatile-One avatar Jun 02 '26 17:06 Versatile-One