Hardware EGL not working on Wayland (libEGL warning: egl: failed to create dri2 screen)

With 535.86.05 driver on Fedora 38 hardware EGL is not working on Wayland and EGL falls back to software:

$ eglinfo
--snip--
X11 platform:
libEGL warning: egl: failed to create dri2 screen
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES 
EGL driver name: swrast
EGL extensions string:
    EGL_ANGLE_sync_control_rate EGL_EXT_create_context_robustness
    EGL_KHR_cl_event2 EGL_KHR_config_attribs
    EGL_KHR_context_flush_control EGL_KHR_create_context
    EGL_KHR_create_context_no_error EGL_KHR_fence_sync
    EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace
    EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image
    EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image
    EGL_KHR_image_base EGL_KHR_no_config_context EGL_KHR_reusable_sync
    EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float
    EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image
    EGL_MESA_query_driver

Readme mentions that EGL_EXT_platform_x11 is unsupported. Is falling back to software rendering the manifestation of that? Or is it a separate problem? Thanks.

1 Like

Reproduction instructions:

  1. build bgfx: Building — bgfx 1.121.8531 documentation with the following change:
diff --git a/makefile b/makefile
index 06e6573e1..ce0d58706 100644
--- a/makefile
+++ b/makefile
@@ -113,7 +113,7 @@ wasm-release: .build/projects/gmake-wasm ## Build - Emscripten Release
 wasm: wasm-debug wasm-release ## Build - Emscripten Debug and Release
 
 .build/projects/gmake-linux:
-       $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=linux-gcc gmake
+       $(GENIE) --with-tools --with-combined-examples --with-shared-lib --with-sdl --with-wayland --gcc=linux-gcc gmake
 linux-debug64: .build/projects/gmake-linux ## Build - Linux x64 Debug
        $(MAKE) -R -C .build/projects/gmake-linux config=debug64
 linux-release64: .build/projects/gmake-linux ## Build - Linux x64 Release

  1. cd examples/runtime
  2. SDL_VIDEODRIVER=x11 ../../.build/linux64_gcc/bin/examplesDebug --gl
  3. pick 14-shadowvolumes

Under XWayland, due to software rendering, the scene is rendered at around 23-24 FPS. Under native X11, with VSync turned off (with F7), I am getting around 350 FPS with my 2070.

Readme mentions that EGL_EXT_platform_x11 is unsupported. Is falling back to software rendering the manifestation of that?

Indeed it is. For what it’s worth, this feature is being actively worked on right now.

1 Like

This seems to be fixed in 545.29.02, is this expected?

same problem with NVIDIA-SMI 560.35.03

is it normal? shouldnt’t be fixed with those new versions?

(base) ferran@z590i:~$ flatpak run com.jeffser.Alpaca
F: Not sharing "/usr/share" with sandbox: Path "/usr" is reserved by Flatpak
F: Not sharing "/usr/share/themes" with sandbox: Path "/usr" is reserved by Flatpak
INFO	[main.py | main] Alpaca version: 1.1.1
ERROR	[window.py | verify_connection] HTTPConnectionPool(host='127.0.0.1', port=11434): Max retries exceeded with url: /api/tags (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x751b596b9b50>: Failed to establish a new connection: [Errno 111] Connection refused'))
ERROR	[window.py | connection_error] Connection error
libEGL warning: egl: failed to create dri2 screen

With 555 driver failure to create dri2 screen is normal. With 560 there is no failure to create dri screen, but at least bgfx examples crash:

../../../src/glcontext_egl.cpp (231): BGFX EGL info:
../../../src/glcontext_egl.cpp (233): BGFX    APIs: OpenGL_ES OpenGL
../../../src/glcontext_egl.cpp (236): BGFX  Vendor: NVIDIA
--snip--
../../../src/glcontext_egl.cpp (349): BGFX FATAL 0x00000002: Failed to create surface.
Abgebrochen (Speicherabzug geschrieben)

nvidia-bug-report.log.gz (722 KB)