godot: Vulkan/Godot does not start on Ubuntu 20.04 using X11 (works with Wayland)
Godot version:
Godot Engine v4.0.dev.custom_build.fea72f2a7
OS/device including version:
timothy@Orion ~> cat /etc/*release
...
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
...
timothy@Orion ~> uname -a
Linux Orion 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
GPU info
Issue description: Starting Godot from a terminal I get the following error:
timothy@Orion:~/Desktop/Godot 4/godot/bin$ ./godot.linuxbsd.tools.64
Godot Engine v4.0.dev.custom_build.fea72f2a7 - https://godotengine.org
INTEL-MESA: warning: Haswell Vulkan support is incomplete
X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
Major opcode of failed request: 149 ()
Minor opcode of failed request: 4
Resource id in failed request: 0x6e00008
Serial number of failed request: 105
Current serial number in output stream: 111
Steps to reproduce:
- Clone and build the latest master branch
git clone git@github.com:godotengine/godot.git
cd godot
scons -j4 target=linuxbsd
- Install Ubuntu 20.04 Nvidia drivers
sudo apt-get install nvidia-driver-450
timothy@Orion ~> apt show nvidia-driver-450
Package: nvidia-driver-450
Version: 450.66-0ubuntu0.20.04.1
Priority: optional
Section: restricted/libs
Source: nvidia-graphics-drivers-450
Origin: Ubuntu
...
Description: NVIDIA driver metapackage
This metapackage depends on the NVIDIA binary driver and on all of its libraries,
to provide hardware acceleration for OpenGL/GLX/EGL/GLES/Vulkan
applications on either X11 or on Wayland.
Verify using X11 and then try to start Godot.
timothy@Orion ~> echo $XDG_SESSION_TYPE
x11
Solution I was able to get Vulkan/Godot to work by instead installing and using Wayland instead. https://askubuntu.com/a/1258280
- Install Wayland
sudo apt install gnome-session-wayland
- Open
/etc/gdm3/custom.conf
and ensureWaylandEnable=false
is commented. - Open
/usr/lib/udev/rules.d/61-gdm.rules
and comment all lines. - Execute
sudo systemctl restart gdm3
(may need to reboot entirely) - Click on the cogwheel and select GNOME or Ubuntu on Wayland.
- Execute
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.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 21 (13 by maintainers)
Commits related to this issue
- Prefer discrete GPU over integrated one 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... — committed to StateOff/godot by bfloch 3 years ago
- Prefer discrete GPU over integrated one 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, o... — committed to akien-mga/godot by bfloch 3 years ago
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.