-
-
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
Vulkan/Godot does not start on Ubuntu 20.04 using X11 (works with Wayland) #42348
Comments
You need to force Godot to run on the dedicated GPU as your integrated GPU doesn't fully support Vulkan. (Intel IGPs only fully support Vulkan from Broadwell onwards.) We should make Godot display an alert dialog when attempting to use Vulkan on an Intel Haswell IGP, since it claims to support Vulkan but is unusable in practice. |
It would also be a great addition to detect when mandatory validation layers are not available and that they should be donwloaded, that blocked me from using vulkan some time. |
Non of validation layers are mandatory, it will print errors (probably should be changed to warnings or even |
Sorry for my ignorance, but would you be able to give me general directions for how to force Godot to use my dedicated gpu? Is there a flag I need to pass when starting it? |
@chon-panic You can change the PRIME GPU in the NVIDIA Control Panel, but this requires you to log out and back in to make the change effective. Once you do this, the dedicated GPU will be used for everything, which decreases battery life significantly. Unfortunately, NVIDIA Optimus on Linux has never been as seamless as it is on Windows (where it's still far from ideal). |
@Calinou I was just looking at PRIME settings on Arch wiki. I think that is what I will have to do. Fortunately I am on a Desktop, so battery life is not a concern. Thank you for helping me. |
@chon-panic If you're on a desktop system, you're not using Optimus 🙂 If you have several displays and some of them are connected to the motherboard's video outputs, they will use the IGP instead of the dedicated graphics card. |
@Calinou I must be using IGP only then. I have one monitor plugged into my GPU via HDMI, and one monitor plugged into the motherboard via VGA. |
@chon-panic If you start Godot while the currently focused window is on the monitor connected to the dedicated GPU, it should use the dedicated GPU. At least, in theory… |
Is there any reason for this strange setup? Using IGP on desktop doesn't make much sense. |
@bruvzg It can be useful if you need to use more monitors than your dedicated GPU supports. That said, any modern graphics card supports 3 monitors (if not 4 or 5) already. |
Typical GTX-970 should have at least 4 ports, including DVI-I which can be converted to VGA with the passive adapter/cable. |
@bruvzg I have an old hand me down monitor and not VGA to DVI converters. I tried unplugging my secondary VGA monitor entirely, rebooting and starting Godot that way, but I still see the same issue. Granted, my CPU is a bit older.
It's not a super big deal, I get that my set up is not ideal. I'm not sure what sort of set up the core developers use but I take it it's not what I am using. :) |
I have found a temporary work around. I enabled Wayland, however since Wayland doesn't work with nvidia GPUs I just plugged both of my monitors into my motherboard and use onboard graphics. I know this is dumb, but I plan on upgrading my CPU/GPU at some point anyways. I will try an AMD GPU in the future and see if that helps. For what it's worth, my desktop is Windows 10/Ubuntu dual boot, and I did not run into these issues compiling and running Godot 4 for Windows 10 with my specs. |
It did not work, without the validation layers I had black screens. When I have installed them it worked very well. I tested even before running a vulcan game and it works properly, godot not. Only after adding the validation layers it worked. If that cannot be really a case then this would mean I have missed some graphics driver update between my tests, but I doubt there were any. Maybe also some changes on the nightly build has triggered that it works now? |
@trommlbomml Most likely whatever process you used to install the validation layers also installed Vulkan drivers. Validation layers have no impact on whether Vulkan works or not, they're debugging tools. |
Sorry, I think I have the same issue with an NVIDIA optimus setup on a laptop while the integrated GPU is being used and crashes. Despite the intuition on this thread in my case the problem is really that the current state of the vulkan implementation has a hard-coded physical device: This should be selectable in the command line, or via an envvar but for the time being this PR unblocks me and might do the same for other devs: |
This unblocks launching on Linux laptops that default to the integrated GPU which can not handle Vulkan in many instances. Ideally a manual device selection, or an option for the optimal selection strategy should be provided via CLI or config, but for the time being this will unblock the Linux devs. Partially addresses godotengine#42348 and godotengine#43714
This unblocks launching on Linux laptops that default to the integrated GPU which can not handle Vulkan in many instances. Ideally a manual device selection, or an option for the optimal selection strategy should be provided via CLI or config, but for the time being this will unblock the Linux devs. Partially addresses godotengine#42348 and godotengine#43714
I am having a similar issue on Linux laptop, but strangely, it ONLY runs on my AMD 7 5800H, or 'AMD Renoir'. It completely refuses to run on my gtx 1650 since it's vulkan drivers are apparently not supported(on X11 and Wayland). I am running Pop-OS 21.04 if it helps. |
I can reproduce the issue with Gentoo Linux amd64 (clang toolchain / musl libc) and kde plasma x11 user@user ~ $ glxinfo | egrep -i 'device|memory'
Device: Mesa Intel(R) HD Graphics 620 (KBL GT2) (0x5916)
Video memory: 7827MB
Unified memory: yes
GL_AMD_performance_monitor, GL_AMD_pinned_memory,
GL_EXT_framebuffer_object, GL_EXT_framebuffer_sRGB, GL_EXT_memory_object,
GL_EXT_memory_object_fd, GL_EXT_packed_depth_stencil, GL_EXT_packed_float,
GL_AMD_pinned_memory, GL_AMD_query_buffer_object,
GL_EXT_gpu_shader4, GL_EXT_memory_object, GL_EXT_memory_object_fd,
GL_EXT_memory_object, GL_EXT_memory_object_fd, GL_EXT_multi_draw_arrays,
user@user ~ $ kde plasma x11 session user@user ~ $ godot
Godot Engine v4.0.alpha.custom_build.950750fb9 - https://godotengine.org
WARNING: Error setting locale modifiers
at: DisplayServerX11 (platform/linuxbsd/display_server_x11.cpp:4636)
WARNING: XOpenIM failed
at: DisplayServerX11 (platform/linuxbsd/display_server_x11.cpp:4682)
WARNING: XCreateIC couldn't create wd.xic
at: _create_window (platform/linuxbsd/display_server_x11.cpp:4517)
Vulkan API 1.2.0 - Using Vulkan Device #0: Intel - Intel(R) HD Graphics 620 (KBL GT2)
X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
Major opcode of failed request: 148 ()
Minor opcode of failed request: 4
Resource id in failed request: 0x4000006
Serial number of failed request: 83
Current serial number in output stream: 89
ERROR: BUG: Unreferenced static string to 0: interface_added
at: unref (core/string/string_name.cpp:131)
user@user ~ $ works fine with kde plasma wayland session user@user ~ $ godot
Godot Engine v4.0.alpha.custom_build.950750fb9 - https://godotengine.org
WARNING: Error setting locale modifiers
at: DisplayServerX11 (platform/linuxbsd/display_server_x11.cpp:4636)
WARNING: XOpenIM failed
at: DisplayServerX11 (platform/linuxbsd/display_server_x11.cpp:4682)
WARNING: XCreateIC couldn't create wd.xic
at: _create_window (platform/linuxbsd/display_server_x11.cpp:4517)
Vulkan API 1.2.0 - Using Vulkan Device #0: Intel - Intel(R) HD Graphics 620 (KBL GT2)
ERROR: vmaCreateImage failed with error -2.
at: texture_create (drivers/vulkan/rendering_device_vulkan.cpp:1871)
|
Is this still reproducible in 4.0 RC 3 or later? |
Closing due to lack of response. Please comment if you can still reproduce this bug on the latest Godot version. |
Godot version:
Godot Engine v4.0.dev.custom_build.fea72f2a7
OS/device including version:
GPU info
Issue description:
Starting Godot from a terminal I get the following error:
Steps to reproduce:
sudo apt-get install nvidia-driver-450
Verify using X11 and then try to start Godot.
Solution
I was able to get Vulkan/Godot to work by instead installing and using Wayland instead.
https://askubuntu.com/a/1258280
sudo apt install gnome-session-wayland
/etc/gdm3/custom.conf
and ensureWaylandEnable=false
is commented./usr/lib/udev/rules.d/61-gdm.rules
and comment all lines.sudo systemctl restart gdm3
(may need to reboot entirely)echo $XDG_SESSION_TYPE
in order to confirm you are running Wayland (output should bewayland
).From what I understand, this is an issue with X11? Although I'm not really an expert.
The text was updated successfully, but these errors were encountered: