mojira.dev

gad1ng

Assigned

No issues.

Reported

No issues.

Comments

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

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]