SDL 2 fails in Wayland mode: Failed to create temporary window: unable to create an EGL window surface (call to eglCreateWindowSurface failed, reporting an error of EGL_BAD_MATCH)
When running dosbox-staging with SDL in Wayland mode (export SDL_VIDEODRIVER='wayland'
), it fails with such error:
2024-03-10 14:05:19.619 | SDL: Failed to create window: unable to create an EGL window surface (call to eglCreateWindowSurface failed, reporting an error of EGL_BAD_MATCH)
2024-03-10 14:05:19.619 | OPENGL: Could not create OpenGL window, using 'texture' output mode
2024-03-10 14:05:19.631 | SDL: Failed to create temporary window: unable to create an EGL window surface (call to eglCreateWindowSurface failed, reporting an error of EGL_BAD_MATCH)
Stack trace:
6 0x4d54de _start + 46
5 0x7fd3c2366785 __libc_start_main + 133
4 0x7fd3c23666ca /lib/x86_64-linux-gnu/libc.so.6(+0x276ca) [0x7fd3c23666ca]
3 0x77b3b0 sdl_main(int, char**) + 5632
2 0x98a1a6 Config::Init() const + 214
1 0x77879e dosbox() [0x77879e]
0 0x776c81 dosbox() [0x776c81]
2024-03-10 14:05:19.631 | ABORT: SDL: Could not initialize video: unable to create an EGL window surface (call to eglCreateWindowSurface failed, reporting an error of EGL_BAD_MATCH)
It started happening only recently in Mesa-main:
OpenGL renderer string: AMD Radeon RX 7900 XTX (radeonsi, navi31, LLVM 17.0.6, DRM 3.57, 6.8.0-rc7-dirty)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.1.0-devel (git-cc74a819e4)
OpenGL core profile shading language version string: 4.60
OpenGL version string: 4.6 (Compatibility Profile) Mesa 24.1.0-devel (git-cc74a819e4)
OpenGL shading language version string: 4.60
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 24.1.0-devel (git-cc74a819e4)
It works fine for example with slightly earlier one (I'll try to find the exact offending change). I.e. for instance this one works fine (which is Mesa from around Feb 24, 2024.
OpenGL renderer string: AMD Radeon RX 7900 XTX (radeonsi, navi31, LLVM 19.0.0, DRM 3.57, 6.8.0-rc7-dirty)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.1.0-devel (git-423add61e2)
OpenGL core profile shading language version string: 4.60
OpenGL version string: 4.6 (Compatibility Profile) Mesa 24.1.0-devel (git-423add61e2)
OpenGL shading language version string: 4.60
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 24.1.0-devel (git-423add61e2)
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
- SDL version: 2.30.0
- Dosbox Staging: 0.81.0
- KDE Plasma 5.27.10