Unable to launch Godot without elevating with sudo: Unable to initialize OpenGL video driver

Tested versions

  • Reproducible in Godot 4.2.2-1 stable

System information

CPU: quad core Intel Core i7-3820 (-MT MCP-)
Kernel: 6.9.3-3-MANJARO x86_64
Graphics:
Device-1: NVIDIA GM206 [GeForce GTX 960] driver: nvidia v: 550.90.07 Display: server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.0 driver: X: loaded: N/A failed: nvidia gpu: nvidia,nvidia-nvswitch resolution: 1: N/A 2: 1920x1080~60Hz API: EGL v: 1.5 drivers: kms_swrast,nvidia,swrast platforms: gbm,x11,surfaceless,device API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 550.90.07 renderer: NVIDIA GeForce GTX 960/PCIe/SSE2 API: Vulkan v: 1.3.279 drivers: nvidia surfaces: xcb,xlib

Issue description

Even though applications like glxgears are working correctly, I am unable to launch Godot with the following errors on launch:

Godot Engine v4.2.2.stable.arch_linux - https://godotengine.org
TextServer: Added interface "Dummy"
TextServer: Added interface "ICU / HarfBuzz / Graphite (Built-in)"
Xshape 1.1 detected.
Xinerama 1.1 detected.
Xrandr 1.6 detected.
Xrender 0.11 detected.
Xinput 2.2 detected.
XInput: Refreshing devices.
XInput: No touch devices found.
Detecting GPUs, set DRI_PRIME in the environment to override GPU detection logic.
XServer error: BadValue (integer parameter out of range for operation)
   Major opcode of failed request: 152
   Serial number of failed request: 34
   Current serial number in output stream: 31
XServer error: BadValue (integer parameter out of range for operation)
   Major opcode of failed request: 152
   Serial number of failed request: 34
   Current serial number in output stream: 31
Only one GPU found, using default.
ERROR: Condition "ctxErrorOccurred || !gl_display.context->glx_context" is true. Returning: ERR_UNCONFIGURED
   at: _create_context (platform/linuxbsd/x11/gl_manager_x11.cpp:183)
WARNING: Your video card drivers seem not to support the required OpenGL version, switching to OpenGLES.
     at: DisplayServerX11 (platform/linuxbsd/x11/display_server_x11.cpp:6102)
Loaded EGL 1.0
ERROR: EGL version is too old!
   at: initialize (drivers/egl/egl_manager.cpp:367)
ERROR: Could not initialize OpenGLES.
   at: DisplayServerX11 (platform/linuxbsd/x11/display_server_x11.cpp:6120)

(zenity:33): Gtk-WARNING **: 14:25:13.184: Unable to acquire session bus: Could not connect: Permission denied
Gsk-Message: 14:25:13.461: Failed to realize renderer of type 'GskNglRenderer' for surface 'GdkX11Toplevel': Unable to create a GL context

Gsk-Message: 14:25:13.461: Failed to realize renderer of type 'GskGLRenderer' for surface 'GdkX11Toplevel': Unable to create a GL context


(zenity:33): Gdk-CRITICAL **: 14:25:13.473: Vulkan: Loader Message: setup_loader_term_phys_devs:  Failed to detect any valid GPUs in the current config

(zenity:33): Gdk-CRITICAL **: 14:25:13.480: Vulkan: Loader Message: setup_loader_term_phys_devs:  Failed to detect any valid GPUs in the current config
Gsk-Message: 14:25:13.480: Failed to realize renderer of type 'GskVulkanRenderer' for surface 'GdkX11Toplevel': No Vulkan devices available.

ERROR: Unable to create DisplayServer, all display drivers failed.
   at: setup2 (main/main.cpp:2438)
ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools11BucketLargeE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools12BucketMediumE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools11BucketSmallE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
ERROR: BUG: Unreferenced static string to 0: TextServerDummy
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: IPUnix
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: ResourceFormatImporterSaver
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: MovieWriterMJPEG
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: interface_added
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: TextServerAdvanced
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: ImageFormatLoader
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: ResourceFormatSaver
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: GDScriptEditorTranslationParserPlugin
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: MovieWriterPNGWAV
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: ScriptLanguage
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: ResourceFormatLoader
   at: unref (core/string/string_name.cpp:129)

The Unable to acquire session bus: Could not connect: Permission denied message made me try running sudo godot, which got it up and running.
Downgrading the drivers to nvidia-470xx also got it working, but then most of my other applications throw errors.

Steps to reproduce

  1. Update drivers.
  2. Reboot system.
  3. Launch Godot.

please post the output of

echo $XDG_SESSION_TYPE && glxinfo | grep server

I’ve downloaded the official Godot binary which works, so there’s possibly something wrong with the package or how it links to the libraries on my system?

echo $XDG_SESSION_TYPE && glxinfo | grep server
x11
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:

okay then mark your topic as solved.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.