-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Godot 4: Stuttering on project startup. #71361
Comments
This is going to require some investigation. Typically we attribute stuttering issues like this to an issue with shader compilation. But that isn't what is going on here as the stutter happens randomly over a few frames and it's occurring in the Vulkan backend. |
Can you try enabling the profiler just after the project starts, then stop it once stuttering ends? Also try doing the same with the visual profiler. |
@Marigem Can you (or anyone else) still reproduce this bug in Godot 4.2.1 or any later release? If yes, please ensure that an up-to-date Minimal Reproduction Project (MRP) is included in this report (a MRP is a zipped Godot project with the minimal elements necessary to reliably trigger the bug). You can upload ZIP files in an issue comment with a drag and drop. |
I managed to narrow down the problem. The stuttering happens when I set the window mode to This happens on Linux, and setting to Here is an MRP: settings.gd is where the problem happens, upon pressing f11 to toggle fullscreen. A workaround currently is to check whether it's a linux machine or a windows one and not set exclusive fullscreen if its the linux one. |
I can't reproduce this on Linux (KDE X11, compositing disabled). Both modes show some unstability in frametimes with the MangoHud readout, but neither mode is more unstable than the other:1 Which window manager are you using? Are you on a X11 or Wayland session? Use Footnotes
|
It's X11, kde plasma desktop with kwin compositor. I found that un-ticking "Allow applications to block compositing" removes the stuttering. So it does seem to be a compositor issue. Leaving it ticked and the stuttering will occur when going into exclusive fullscreen. It is possible that the stuttering occurs because the machine can't keep up with the load of blocking the compositor. But I have no way of testing if that's the case. |
I find it very strange that you get stuttering without compositing, but no stuttering with compositing. For me, it's typically the opposite: compositing often makes it impossible to have a smooth, low-latency gaming experience on X11. I have compositing disabled system-wide for this reason… |
If the compositor is disabled outright, then no stuttering occurs. The stuttering occurs when the compositor is enabled, but "Allow applications to block compositing" is also enabled. So it seems that the act of blocking the compositor is what causes the stuttering, which lasts for around 3 sec. |
I am observing this exact issue on Ubuntu, Nvidia, x11 as well, Godot v4.3.stable.official [77dcf97]. and just the same, the stutter spike right after starting the game is gone with "Allow applications to block compositing" disabled, however, in its place I am getting constant, ongoing micro-stuttering (perhaps #84137) that is ultimately much worse UX than the one-time spike after startup. |
Godot version
Godot 4 beta 1 through 12
System information
Arch Linux, GeForce GTX 650, i3-3220
Issue description
Stuttering occurs in the first seconds after the project is ran. Switching to compatibility alleviates the problem a bit but not completely. I know it's an older PC, but I thought maybe there is a problem somewhere since the projects are smooth after that initial stuttering. Meanwhile Godot 3 is smooth as butter as though the PC is brand new (on 2D anyway, heh).
2023-01-13.23-14-30.mp4
Steps to reproduce
Running any project on my Linux machine with specs specified above.
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: