Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unstable frametime with VSync enabled #543

Open
rsxrwscjpzdzwpxaujrr opened this issue Nov 19, 2024 · 3 comments
Open

Unstable frametime with VSync enabled #543

rsxrwscjpzdzwpxaujrr opened this issue Nov 19, 2024 · 3 comments

Comments

@rsxrwscjpzdzwpxaujrr
Copy link

rsxrwscjpzdzwpxaujrr commented Nov 19, 2024

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
Copy link
Author

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

@thr3343
Copy link
Contributor

thr3343 commented Nov 30, 2024

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

@rsxrwscjpzdzwpxaujrr
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants