-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
Vulkan: Game freezes if window vsync mode is set to/from mailbox during runtime #73922
Comments
I can't reproduce this on 4.0.rc adbabfb (Linux, GeForce RTX 4090 with NVIDIA 525.89.02), but I also get this warning anyway: I'm surprised the NVIDIA driver doesn't support mailbox V-Sync on Linux. I'm fairly sure it did at some point…
The OpenGL driver probably won't be able to support Adaptive and Mailbox modes (as these are not exposed in a standard fashion with that API), but it should support Enabled and Disabled already from my testing. |
I took some time to test swapping vsync modes on another computer I had running Windows 10 and an Nvidia GTX 765M, now that you brought nvidia cards to mind. |
Happens to me as well, also with an AMD GPU (6700 XT) on Linux. Changing to OpenGL (compatibility) fixes the problem. |
UPDATE: Out of curiosity I tried using Wayland instead of X11 to see if that affects the issue since wayland has gotten big updates recently. Instead of having garbage artifacts on screen like my screenshot, I got this exact warning message you received earlier. |
Wayland currently only supports vsync for... many reasons. IMMEDIATE support is coming though: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18268 This is intended behaviour and (perhaps surprisingly :P) not NVIDIA's fault. |
Ok, so this could be partially a driver and X11 issue since everything works more or less as intended on Wayland (by that of course I mean currently, V-Sync is always forced-on, which is incredibly stupid ) I don't expect this issue to be fixed for X11 since the project has hardly seen any maintenance these days and is probably gonna be abandoned soon. Whatever the case, I'll close this issue if upstream changes from either window manager fixes it, moderators might want to close this anyways if we can confirm for absolute sure the issue isn't one with the engine itself. EDIT: After updating some of the software on my system (Not any Godot update specifically, as far as I can tell), the freezing/garbled screen happens even in a wayland environment. Is it now using xwayland? was it supposed to use xwayland from the start? if so, how was I able to get different behavior out of it before? much to figure out |
Upon closer inspection, this no longer seems to be the case (probably never was, going back and checking version 4 RC3 from my original tests again). You either get the freeze+garbled screen or a crash shortly after launching the game. Should the title of this issue be edited accordingly to make it simpler? |
@BluesM18A1 for some reason I noticed your other message just now.
It's not incredibly stupid, it has its reasons, but once https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18268 is merged, Vulkan will report other modes as available transparently. AFAIK the protocol is meant primarily for drivers like mesa, not for clients.
The protocol got already accepted, the thing isn't at risk: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/65
Generally, we keep problems that might not be entirely the engine's fault but that still happen so that confused people still have a place in which to converge.
AFAIK, yes. Especially if you could set anything other than V-Sync, since I recall that proper XWayland support required the Xorg drivers.
No idea, if other people can replicate the original one but not the "new" one I think that it should stay like this. |
Godot version
4.0 RC3 (update: tested on 4.0.2 stable, still persists)
System information
EndeavourOS Linux, AMD Radeon 5700XT, Vulkan
Issue description
This may be considered a duplicate of #70837 or #65391 since they occur under similar circumstances, so feel free to close this if it's deemed too similar, but at any rate here is my experience:
Mailbox vsync appears to work just fine if set with the project settings and left alone.
However if you have vsync options available in-game, I find that all of them are able to be changed at runtime without a hitch, except if your project settings change from something else to mailbox, or if your project settings are set to mailbox and you change to something else.
The issue does not seem to occur when using the OpenGL (compatibility) renderer.
Steps to reproduce
-New scene (any type seems to work)
-Attach script to root node, GDscript or C# works (I am using GDscript for this example, C# script is available in the minimal reproduction project)
if you put the line
DisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_ENABLED)
in the _ready function, the game freezes at the splash screen.
If you do something like the following to get it to happen during _process...
Then you have a rapidly flickering and garbled screen like the following screenshot, and the following error message

Minimal reproduction project
BugTester.zip
The text was updated successfully, but these errors were encountered: