mojira.dev
MC-311954

The OpenGL rendering backend can't be used when running under XWayland

Short description of the issue

When Minecraft is running under XWayland, the game can’t use the OpenGL rendering backend, and instead uses Vulkan.

This issue does not occur on an Xorg session or when Minecraft is running as a native Wayland window.

Steps to reproduce the issue

  1. Change “Graphics API” to “Prefer OpenGL”

  2. Close the game

  3. Start the game on XWayland (this is the default on Wayland compositors that don’t support the fifo-v1 protocol; on those that do support it, this can be forced by running the launcher with the command SDL_VIDEO_DRIVER=x11 minecraft-launcher

  4. Press F3

Expected result

F3 debug screen should show “OpenGL”

Actual result

F3 debug screen shows “Vulkan”

Description of attachments

  1. (2026-09-19_01.21.56.png) Minecraft 26.2 under XWayland; OpenGL backend loads successfully

  2. (2026-09-19_01.24.00.png) Minecraft 26.3 under XWayland (SDL falls back to XWayland as fifo-v1 isn’t available); OpenGL backend fails to load and the game falls back to Vulkan

  3. (2026-09-19_01.25.38.png) Minecraft 26.3 under Wayland (forced with SDL_VIDEO_DRIVER=wayland minecraft-launcher); OpenGL backend loads successfully

  4. (2026-09-19_01.27.27.png) Minecraft 26.3 under Xorg; OpenGL backend loads successfully

  5. (latest.log) The game log for run 2 above, containing the following error:

    com.mojang.renderpearl.api.device.BackendCreationException: OpenGL is not supported: Could not retrieve OpenGL functions
    	at com.mojang.renderpearl.backend.opengl.GlBackend.loadLibrary(GlBackend.java:36)
    	at net.minecraft.client.Minecraft.<init>(Minecraft.java:530)
    	at net.minecraft.client.main.Main.main(Main.java:278)

Environment

OS: Linux (Ubuntu 24.04), GPU: AMD Radeon RX 7600 XT

Linked issues

Attachments

Comments 5

Thank you for helping us improve Minecraft! We saved your files:

[media][media][media][media][media]

I’m seeing essentially this same issue on a Chromebook, although the symptom is that the screen never even appears! I only know the game is running in the background because I can hear the game music. Here are my details for this issue:

Environment

  • Minecraft Java 26.3 (official launcher), LWJGL 3.4.3+4, SDL 3.4.14

  • ChromeOS 154 (HP Pro c640, Intel UHD CML GT2), Linux container (Crostini), Debian 12

  • Mesa 25.0.7 virgl; glxinfo -B reports OpenGL 4.3 core via virgl on X11

Steps to reproduce

  1. Launch 26.3 from the official launcher in the ChromeOS Linux container.

Expected: Game window appears.

Actual: No window appears; game audio plays. The log shows:

  • SDL [VIDEO]: This compositor lacks support for the fifo-v1 protocol; falling back to XWayland

  • BackendCreationException: OpenGL is not supported: Could not retrieve OpenGL functions at GlBackend.loadLibrary

  • Vulkan fallback then repeats SurfaceException: VK_ERROR_INITIALIZATION_FAILED: Failed to create Swapchain several times per second.

Workaround: SDL_VIDEO_DRIVER=wayland minecraft-launcher renders normally. 26.2 (GLFW) also works without changes. The X11/XWayland OpenGL path fails even though GLX works for other apps (glxinfo, virgl).

Also affects NVIDIA on native Wayland, not only XWayland

This looks like the same failure reported in MC-312623 (NVIDIA, native Wayland, EGL_BAD_DISPLAY), which was closed as a duplicate of this ticket (MC-311954). However, the original report here says OpenGL works as a native Wayland window, while on NVIDIA it fails on native Wayland too.

Could the team check whether the NVIDIA native-Wayland case shares the XWayland root cause or needs separate tracking?

Environment

  • Minecraft Java 26.3, launched via Prism Launcher 11.1.1 (Flatpak and AppImage)

  • Fedora 44, kernel 7.2.10-200.fc44.x86_64, native Wayland session

  • Intel UHD Graphics 620 + NVIDIA GeForce MX130 (PRIME offload)

  • NVIDIA proprietary driver 580.178.04 (nvidia_drm modeset=Y), Mesa 26.2.4, Java 25.0.1

Native Wayland with NVIDIA offload (reproduces on vanilla, no mods)

Failed to create backend OpenGL
BackendCreationException: Failed to create window for OpenGL after creating
context: Couldn’t find matching EGL config (call to eglChooseConfig failed,
reporting an error of EGL_BAD_DISPLAY)
at GlDevice.<init>(GlDevice.java:109)

The game then falls back to Vulkan, which works.

Other behavior on the same machine

  • 1.21.8 (GLFW) runs OpenGL on the NVIDIA GPU without problems.

  • 26.3 on Mesa (Intel GPU, native Wayland) runs OpenGL without problems.

  • 26.3 with the Vulkan backend on NVIDIA works.

  • Forcing XWayland (SDL_VIDEODRIVER=x11) gives OpenGL is not supported: Could not retrieve OpenGL functions, as described in this ticket.

Diagnostics (the XWayland and system-SDL tests were run with Fabric and Sodium installed)

  • Replacing the bundled SDL with the system SDL 3.4.18 gives the identical error, so it is not the bundled SDL build.

  • A minimal SDL3 test program on the same machine creates a core OpenGL context on the NVIDIA GPU under native Wayland. eglChooseConfig on the display from eglGetCurrentDisplay() returns 1 config with no error. So SDL3 and NVIDIA's EGL work on this hardware outside the game.

  • With SDL_VIDEO_FORCE_EGL=1 under X11, the same test program fails with Could not create GLES window surface.

  • EGL_PLATFORM=wayland makes no difference.

  • Workaround: Mesa Zink with EGL pinned to Mesa's vendor file.

latest.log from the vanilla run is attached (can be accessed on https://mclo.gs/CQC7bbM too ).

Highlight from latest.log:

> grep -E "SDL revision|Failed to create backend|BackendCreationException|Using graphics|video driver" latest.log
[17:40:58] [Render thread/INFO]: SDL [SYSTEM]: SDL revision: SDL-3.4.14--128-NOTFOUND
[17:40:58] [Render thread/ERROR]: Failed to create backend OpenGL
com.mojang.renderpearl.api.device.BackendCreationException: Failed to create window for OpenGL after creating context: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_BAD_DISPLAY)
[17:40:58] [Render thread/INFO]: Using graphics backend Vulkan, using drivers: 1.4.312 NVIDIA 580.178.04
[17:40:58] [Render thread/INFO]: Using graphics device: NVIDIA GeForce MX130 (NVIDIA)
[17:40:58] [Render thread/INFO]: Using graphics device extensions: VK_EXT_calibrated_timestamps (D), VK_KHR_synchronization2 (D), VK_KHR_wayland_surface (I), VK_EXT_multi_draw (D), VK_AMD_buffer_marker (D), VK_EXT_vertex_attribute_divisor (D), VK_KHR_swapchain (D), VK_KHR_surface (I), VK_KHR_push_descriptor (D), VK_EXT_debug_utils (I), VK_KHR_dynamic_rendering (D)
[17:40:59] [Render thread/INFO]: Created window using SDL video driver: wayland
[media]

@gad1ng Nvidia native wayland was tracked at MC-310331

@RogueLogix ah I see, thank you. also thanks to the Mojang team for solving this issue 😄

Galactikoopa

(Unassigned)

Community Consensus

26.3

26.4 Snapshot 7

Retrieved