Bug#1123731: wesnoth-1.18: autopkgtest fails with sdl2-compat

Simon McVittie smcv at debian.org
Sat Dec 20 16:21:58 GMT 2025


Source: wesnoth-1.18
Severity: normal
Tags: patch
User: sdl2-compat at packages.debian.org
Usertags: regression

After discussion with SDL upstream, I'm looking into what needs to 
happen for Debian (and indirectly Ubuntu) to replace "classic" SDL2 with 
sdl2-compat, following in the footsteps of other distros like Arch and 
Fedora. sdl2-compat is a reimplementation of the SDL 2 API using SDL 3.

One issue that I've noticed is that the autopkgtest for wesnoth-1.18 has 
regressed. This seems to be because "classic" SDL2 will automatically 
use the `offscreen` video driver if neither X11 nor Wayland works, but 
there was an upstream change in SDL3 to make the `offscreen` video 
driver only work if explicitly requested, similar to the behaviour that 
the `dummy` video driver already had. The result is that on a CI system 
with no X11 display or Wayland compositor, this test fails to initialize 
SDL video when SDL is really sdl2-compat.

The upstream change seems reasonable to me - by default, games should 
only use video drivers that actually display some pixels to the user! - 
but I've opened https://github.com/libsdl-org/sdl2-compat/issues/561 to 
query whether sdl2-compat should be bug-for-bug compatible with 
"classic" SDL2 on this point. So I think this is really an issue in 
wesnoth-1.18, more than an issue in sdl2-compat.

A workaround that I have confirmed does work is to run the test with 
SDL_VIDEODRIVER="offscreen" (or "dummy" or "offscreen,dummy"), so in the 
short term please consider applying the attached patch.

The xauth and xvfb dependencies can probably also be dropped, although I 
haven't verified that.

In the longer term, for consideration upstream:

wesnoth --nogui still calls SDL_InitSubSystem(SDL_INIT_VIDEO), even 
though it has been asked not to have a GUI. Perhaps ideally it wouldn't? 
(But perhaps there's some feature of the video subsystem that it is 
relying on?)

Or perhaps wesnoth could call SDL_SetHint(SDL_HINT_VIDEODRIVER, "offscreen")
(or "dummy", or "offscreen,dummy") when invoked with --nogui or equivalent?

Thanks,
    smcv


More information about the Pkg-games-devel mailing list