Godot: GUI unresponsive on Godot 4 (regression from the NVIDIA Linux 450.66 driver and later)

Created on 30 Aug 2020  路  22Comments  路  Source: godotengine/godot

Workaround: Enable Single Window Mode in the Editor Settings, or use the --single-window command line argument and open a project directly by specifying the path to its project.godot file.

If you can't get to the checkbox, open $HOME/.config/godot/editor_settings-4.tres and add this line:

interface/editor/single_window_mode = true

Godot version: v4.0 Git commit f10c3810bb0abfa18b1a579ee927f460bf191b6d

OS: Archlinux latest (NVIDIA GTX 1060, 64 GB RAM, Intel Core i7)

Issue description: When initialize godot UI modals remains unresponsive

Steps to reproduce:

  • Compile godot
  • Open godot
  • Create a new project
  • Specify directory
  • UI remains unresponsive
    Godot bug UI unresponsive
bug confirmed high priority linuxbsd regression rendering thirdparty

Most helpful comment

I can confirm that vkcube indeed freezes momentarily, by simply moving the mouse in and out of the program window (not using PRIME, screen is directly hooked to NVIDIA card).

All 22 comments

Maybe related to #41574?

Yeah, its related with that @Riteo. It's the same bug.

That's not i3wm like in #41574, is this KDE Plasma?

For the reference, I don't get this issue with a build from the current master branch on Mageia 8 with KDE Plasma 5 / KWin running on X11.

@akien-mga what version of the NVidia driver do you have installed?

I'm #TeamAMD :)

Dual graphics Intel HD 630 / AMD Radeon RX Vega M both running on Mesa 20.1.6.

@DavidNexuss could replicate this issue on all the WMs he tried.
They also run Arch Linux with an NVIDIA card, so, I believe that this may be a duplicate of #41574.

@Riteo I can't reproduce it with the recommended nvidia drivers (version 440) on Ubuntu 20.04.1 with Gnome or KDE (but I can reproduce it when using i3). I tried to install nvidia drivers version 450.66 but it caused all application windows to be either black or full of graphical glitches so it doesn't seem compatible with my configuration.

I'll try and see if I can install Arch Linux separately to reproduce the issue.

I can confirm this issue exists on Arch Linux + NVidia + KDE. Godot 4 is unusable due to this issue at the moment.

The issue persists with --single-window, so it doesn't appear to be tied to multiple windows.

@seadra did you start godot with only --single-window? IIRC after opening a project from the project manager, the editor is started without that flag.

Indeed! The problem disappears when editing a project directly with -e (and --single-window)!

This is indeed an issue related to multiple windows.

I'd like to confirm this issue is similar to #41574. Could someone run these tests on ArchLinux with an nvidia card:

  1. Simple vulkan test
    -Install vulkan-tools
    -Run vkcube
    -Does it freeze when you focus in and out of the window?

  2. Disable PRIME synchronization
    -Create file /etc/modprobe.d/nvidia-graphics-drivers.conf
    -Add line options nvidia-drm modeset=0
    -Run sudo update-initramfs -u
    -Reboot
    -Check if the problem persists in Godot (multi-window mode) and vkcube

I can confirm that vkcube indeed freezes momentarily, by simply moving the mouse in and out of the program window (not using PRIME, screen is directly hooked to NVIDIA card).

Thanks @seadra, that confirms a general issue with the nvidia drivers and not just in godot. In your case it might work better by switching the drivers version to 450.57 (apart from the workaround with --single-window).

@pouleyKetchoupp in my case, after rolling back to 450.57 vkcube still freezes briefly after focusing and unfocusing its window, but Godot 4.0 doesn't freeze the X11 server.

@Riteo Could you please try and run nvidia-bug-report.sh with 450.66 drivers enabled and provide me with the generated nvidia-bug-report.log.gz file when you have some time?
Instructions are here: https://forums.developer.nvidia.com/t/if-you-have-a-problem-please-read-this-first/27131

I'm opening a ticket on the nvidia developer forum and it could help to provide more information. Unfortunately I still have issues with these drivers and they don't work at all for me :/

@pouleyKetchoupp I too tought about making a ticket, but didn't because I thought that without a minimal Vulkan repo project we wouldn't get that far. I'll run that script as soon as I downgrade to 450.66! I tried to run the latest 455.23 beta and the issue persists, though there might be some fix that might be useful to you, since it mentions PRIME synchronization. Here's the changelog just for reference:

    Added support for the following GPUs:
        GeForce RTX 3080
        GeForce RTX 3090
        GeForce MX450
    Fixed a bug that prevented 8K displays from being used in portrait orientation on Pascal and earlier GPUs.
    Fixed a bug which caused excessive CPU usage in Vulkan applications which create a large number of VkFence objects. This was particularly prevalent in the Steam Play title Red Dead Redemption 2.
    Added support for a new device-local VkMemoryType which is host-coherent and host-visible. This may result in improved performance in some applications. Applications which are known to benefit from this new VkMemoryType include: DXVK Title DiRT Rally 2.0, Steam Play Title DOOM: Eternal, and DXVK title World of Warcraft.
    Fixed a bug that caused WebKit-based applications to crash when running on Wayland.
    Fixed a bug that led to display corruption at some resolutions when using an NVIDIA-driven display as a PRIME Display Offload sink.
    Fixed a bug in a SPIR-V optimization that may cause conditional blocks to not execute.
    Fixed a bug where calls to vkGetRandROutputDisplayEXT with unexpected inputs would generate X11 protocol errors. (https://bugs.winehq.org/show_bug.cgi?id=49407)
    Fixed a small memory leak during exit of the NVIDIA EGL driver.
    Implemented support for the NVIDIA NGX Updater. See the "NGX" chapter in the README for information on how to configure this feature.
    Removed support for the SLI modes "SFR", "AFR", and "AA".  SLI Mosaic, Base Mosaic, GL_NV_gpu_multicast, and GLX_NV_multigpu_context are still supported.
    Updated Base Mosaic support on GeForce to allow a maximum of five simultaneous displays, rather than three.
    Fixed several synchronization bugs that could momentarily lock up the X server when moving/resizing/focusing OpenGL and Vulkan windows when PRIME Sync was enabled.
    Added NVIDIA VDPAU driver support for decoding VP9 10- and 12-bit bitstreams. Note that VDPAU's presentation pipeline and OpenGL-VDPAU interop does not support 10- and 12-bit video surfaces yet. See the "VDPAU Support" appendix in the README for supported decoder profiles.
    Fixed a bug that could cause dual-link DVI to be driven over a connector that only supports single-link DVI, when "NoMaxPClkCheck" is specified in the "ModeValidation" X configuration option.  Note this fix may cause behavioral changes for configurations using this option.
    Fixed a regression that allowed displays to enter DPMS mode even when DPMS is disabled in the X server settings.
    Updated nvidia-settings to allow continued interaction with other pages and help content while editing application profiles.

Edit: Made the comment a little bit clearer on what I was talking about.

Ok, done.
What I did and what happened:

  • Start the X server with the flag -logverbose 6
  • Run Godot
  • Open a project with a window in it
  • The new window got created where i put my mouse. It didn't freeze, so I unfocused it and it froze for a few seconds.
  • Once unfrozen, waited a bit and it froze again for a few seconds.
  • Killed it from another terminal, froze again.
  • Dumped everything right away, here's the file: nvidia-bug-report.log.gz

Issue persists in the current release 455.23.04

Thanks both of you! I've updated the ticket upstream.

I've been having the same problem with my GTX 1070, driver is 450.66-0ubuntu0.20.04.1.

Workaround because nobody has mentioned it yet: Enable "Single window mode" and it seems to work fine. If you can't get to the checkbox, open editor_settings-4.tres and add this line:

interface/editor/single_window_mode = true
Was this page helpful?
0 / 5 - 0 ratings

Related issues

bojidar-bg picture bojidar-bg  路  3Comments

SleepProgger picture SleepProgger  路  3Comments

RebelliousX picture RebelliousX  路  3Comments

ducdetronquito picture ducdetronquito  路  3Comments

n-pigeon picture n-pigeon  路  3Comments