-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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 editor hangs on opening a menu on Linux using wayland #78487
Comments
Sounds like YAXI (Yet Another XWayland Issue). Notice that we don't have a native backend yet (see #57025), so you're actually using XWayland, which is known to have issues with Godot. I'm working on a backend myself but there are a few annoying blockers which are slowly getting solved, especially HiDPI. I'm currently refactoring the whole thing and trying to implement multiple windows again with a new approach. In the meantime, either switch to an X11 client or use single window mode, which is accessible from the editor's settings or by running the godot binary from the terminal with the |
I bisected my way to find that commit 81c3864 (merged #78235) introduced this. It seems to be related to the Vulkan API version or the mesa/AMD vulkan driver. On my system I could try three driver/renderer combinations, only the vulkan with the mesa driver case has the issue:
I tested with a AMD Radeon RX 5600 XT on sway, Arch Linux (linux-zen 6.3.9). Note: You can select vulkan drivers using the Note: you can run the editor using opengl (by starting the editor with |
@quinnyo Can you please test out a build with the following diff?
|
@clayjohn I tried it, no change. I set a breakpoint on that line (1820) and it never triggered. Ed: some additional notes/observations:
|
Running with --gpu-validation, I get the following error/s when the issue occurs
The full log for reference: Complete log``` Godot Engine v4.1.rc.custom_build.950f4c3b4 - https://godotengine.org
TextServer: Primary interface set to: "ICU / HarfBuzz / Graphite (Built-in)".
|
Just adding a note to make it unambiguous that I have only tested/reproduced this on a system configured as I described above. That is to say I have not confirmed that this is (or is not) wayland/xwayland specific, as I have not tested it on e.g. Xorg. |
Are you saying the issue is relating to creating a swapchain with null extents? Because that part of the codebase didn't change in 81c3864. The only difference with 81c3864 is that we skip the call to @quinnyo Thanks for testing. Can you try again with the following diff instead?
|
Not idea. I've seen that you sent a patch changing that part of the code though and wanted to let you know that it will never be called. |
@clayjohn with the ed: can confirm I am seeing no Vulkan validation errors without the patch on c83f912 (except for when opening a menu, as mentioned previously) Initial errors when editor opensERROR: VALIDATION - Message Id Number: 1629488792 | Message Id Name: VUID-vkAcquireNextImageKHR-semaphore-parameter Validation Error: [ VUID-vkAcquireNextImageKHR-semaphore-parameter ] Object 0: handle = 0x563fd309d570, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x61200698 | Invalid VkSemaphore Object 0x563fd309d570. The Vulkan spec states: If semaphore is not VK_NULL_HANDLE, semaphore must be a valid VkSemaphore handle (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-semaphore-parameter) Objects - 1 Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 94832123565424 at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:267) ERROR: VALIDATION - Message Id Number: 1567320034 | Message Id Name: UNASSIGNED-Threading-Info Validation Error: [ UNASSIGNED-Threading-Info ] Object 0: handle = 0x563fd309d570, type = VK_OBJECT_TYPE_SEMAPHORE; | MessageID = 0x5d6b67e2 | Couldn't find VkSemaphore Object 0x563fd309d570. This should not happen and may indicate a bug in the application. Objects - 1 Object[0] - VK_OBJECT_TYPE_SEMAPHORE, Handle 94832123565424 at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:267) ERROR: [snip - duplicate of prev]
[snip - shader hashes, pulseaudio, etc.]
ERROR: VALIDATION - Message Id Number: -1391585802 | Message Id Name: VUID-vkAcquireNextImageKHR-surface-07783
[snip - godot --verbose is verbose godot]
ERROR: VALIDATION - Message Id Number: -370888023 | Message Id Name: VUID-vkAcquireNextImageKHR-semaphore-01286 ERROR: VALIDATION - Message Id Number: -370888023 | Message Id Name: VUID-vkAcquireNextImageKHR-semaphore-01286 Validation Error: [ VUID-vkAcquireNextImageKHR-semaphore-01286 ] Object 0: handle = 0xd175b40000000013, type = VK_OBJECT_TYPE_SEMAPHORE; | MessageID = 0xe9e4b2a9 | vkAcquireNextImageKHR: Semaphore must not be currently signaled. The Vulkan spec states: If semaphore is not VK_NULL_HANDLE it must be unsignaled (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-semaphore-01286) Objects - 1 Object[0] - VK_OBJECT_TYPE_SEMAPHORE, Handle -3353576435414466541 at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:267) ERROR: VALIDATION - Message Id Number: -1391585802 | Message Id Name: VUID-vkAcquireNextImageKHR-surface-07783 Validation Error: [ VUID-vkAcquireNextImageKHR-surface-07783 ] Object 0: handle = 0xa962d0000003b2a, type = VK_OBJECT_TYPE_SWAPCHAIN_KHR; | MessageID = 0xad0e15f6 | vkAcquireNextImageKHR: Application has already previously acquired 1 image from swapchain. Only 1 is available to be acquired using a timeout of UINT64_MAX (given the swapchain has 3, and VkSurfaceCapabilitiesKHR::minImageCount is 3). The Vulkan spec states: If forward progress cannot be guaranteed for the surface used to create the swapchain member of pAcquireInfo, the timeout member of pAcquireInfo must not be UINT64_MAX (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-surface-07783) Objects - 1 Object[0] - VK_OBJECT_TYPE_SWAPCHAIN_KHR, Handle 762846664909142826 at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:267) endless error (repeats forever)ERROR: VALIDATION - Message Id Number: -1391585802 | Message Id Name: VUID-vkAcquireNextImageKHR-surface-07783 Validation Error: [ VUID-vkAcquireNextImageKHR-surface-07783 ] Object 0: handle = 0xa962d0000003b2a, type = VK_OBJECT_TYPE_SWAPCHAIN_KHR; | MessageID = 0xad0e15f6 | vkAcquireNextImageKHR: Application has already previously acquired 1 image from swapchain. Only 1 is available to be acquired using a timeout of UINT64_MAX (given the swapchain has 3, and VkSurfaceCapabilitiesKHR::minImageCount is 3). The Vulkan spec states: If forward progress cannot be guaranteed for the surface used to create the swapchain member of pAcquireInfo, the timeout member of pAcquireInfo must not be UINT64_MAX (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-surface-07783) Objects - 1 Object[0] - VK_OBJECT_TYPE_SWAPCHAIN_KHR, Handle 762846664909142826 at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:267) errors when opening a menuERROR: VALIDATION - Message Id Number: 1629488792 | Message Id Name: VUID-vkAcquireNextImageKHR-semaphore-parameter Validation Error: [ VUID-vkAcquireNextImageKHR-semaphore-parameter ] Object 0: handle = 0x563fd309d570, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x61200698 | Invalid VkSemaphore Object 0xa058ddff50c8d300. The Vulkan spec states: If semaphore is not VK_NULL_HANDLE, semaphore must be a valid VkSemaphore handle (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-semaphore-parameter) Objects - 1 Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 94832123565424 at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:267) ERROR: VALIDATION - Message Id Number: 1567320034 | Message Id Name: UNASSIGNED-Threading-Info Validation Error: [ UNASSIGNED-Threading-Info ] Object 0: handle = 0xa058ddff50c8d300, type = VK_OBJECT_TYPE_SEMAPHORE; | MessageID = 0x5d6b67e2 | Couldn't find VkSemaphore Object 0xa058ddff50c8d300. This should not happen and may indicate a bug in the application. Objects - 1 Object[0] - VK_OBJECT_TYPE_SEMAPHORE, Handle -6892515141048806656 at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:267) ERROR: VALIDATION - Message Id Number: 1567320034 | Message Id Name: UNASSIGNED-Threading-Info Validation Error: [ UNASSIGNED-Threading-Info ] Object 0: handle = 0xa058ddff50c8d300, type = VK_OBJECT_TYPE_SEMAPHORE; | MessageID = 0x5d6b67e2 | Couldn't find VkSemaphore Object 0xa058ddff50c8d300. This should not happen and may indicate a bug in the application. Objects - 1 Object[0] - VK_OBJECT_TYPE_SEMAPHORE, Handle -6892515141048806656 at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:267) |
Okay, so my working theory is that when using Wayland, the first image in the swapchain does not have an id of (0). Accordingly, after recreating the swap chain we have to call That being said, on Windows, we can't call Therefore, I suggest we go with a solution suggested by @jpcerrone earlier and just return a different error in the case that we choose not to recreate the swapchain because it has 0 size. Then, if that is the case, we return and skip the call to The diff for that:
@quinnyo Do you mind trying out another diff? I will test this on Windows to ensure it does not cause a regression edit: tested on PopOS with X11 and it works fine. Tested on Windows and I can confirm that the diff does not reintroduce #77790 |
@clayjohn with that one it behaves correctly from user point of view, but with one vulkan validation error every time a menu is first focussed:
Let me know if there's anything else I can do! |
Moving to 4.2 milestone as we won't have time to finalize and properly test a bugfix before the 4.1 release. But this stays high on the priority list and should be fixed shortly after release for the 4.1.1 patch release. |
When I try and load my project from 4.1 in a fresh build of 4.2 master, on Xubuuntu, with the voxel tools plugin, after confirming that I want to update the project from 4.1 to 4.2, the editor crashes, giving me:
And when I searched that error in the issues, this issue came up, so I'm posting it here in hopes that it's relevant. Edit: I get the same behavior trying to open other projects - except the line about the invalid pipeline is actually very unreliable, shows up like one time in 10 maybe. :/ |
Caching shaders of a Godot 3.5 on the Steamdeck also results alot of lag. However, on the Steamdeck, the results does not seem like that, even when the game has seen various materials earlier, it still has to lag everytime new element arrives into the scene, or when player simply just runs around . The game is exported as Linux and transfered to the Steamdeck as Devmode. I came here via this #80054 |
I didn't experience this problem before but I do have it now every once in a while on v4.3.official.stable(on Ubuntu 24.04.1), Every once in a while when I save my scene it gets stuck at the saving thumbnail part. |
me too, Fedora 41 on Gnome/AMD/Wayland, both Flatpak and official repo, bump to reopen, any directions on how to help fixing this? |
Godot version
v4.1.beta.custom_build [d7af287]
System information
EndeavourOS Linux, KDE plasma Wayland
Issue description
When opening any menu or hovering above nodes or properties the editor just freezes. The console doesn't print anything when this happens. On X11 works fine. It doesn't matter if its a new project or an old one. On the beta 2 also works as normal, so it's a regression between beta 2 and now.
Steps to reproduce
Using Wayland, create a new project and open any menu and the editor freezes.
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: