SDL3 on linux only working with SDL_VIDEO_DRIVER=x11

When trying to run sdl3 based applications on linux you need to specify SDL_VIDEO_DRIVER=x11 for the application to present a window. If you do not specify x11 or instead specify wayland the application will behave as if a window has been created, but will not present that window at all. Also there will be no errors from sdl.

Tried this on a fedora 43 and ubuntu 25.04 install

I have other sdl applications that were created in c++ that are working without having to explicitly set the SDL_VIDEO_DRIVER env variable. Also the c++ applications will work with that variable set to x11 or wayland

In wayland you must commit a buffer in order for the window to be presented. Could it be that you’re waiting for events before drawing anything?

Thanks! - Answered

Required the call to sdl.RenderPresent(^Renderer)

The example I was working from Odin SDL3 GPU Tutorial: Part 1 - Basic Setup, A Red Triangle By nadako does not introduce this into the intro example and is still able to show a window.

SDL_VIDEO_DRIVER=x11 will present a window automatically
SDL_VIDEO_DRIVER=wayland will require an explicit call to sdl.RenderPresent(^Renderer) to present a window