Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

native: skip SDL3 path by default — opt in via AC_USE_SDL=1

SDL3 was always-attempted at boot with crash-recovery fallback. The
dlopen + Mesa DRI loader + SDL_Init + window/renderer creation costs
real time on every cold boot and offers no measurable visual benefit
on the hardware we ship — DRM dumb buffers do the same thing faster
and don't pull a GLES context full of failure modes (the partial-init
state when SDL starts but Mesa's renderer doesn't was almost certainly
the source of the "garbled chars on boot" the user reported).

Now opt-in via AC_USE_SDL=1. Default = straight to DRM. The whole SDL3
loader code path is preserved (sdl_init/sdl_load/crash handler) for
when we want it back; it just doesn't run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

+15 -3
+15 -3
fedac/native/src/drm-display.c
··· 387 387 ACDisplay *drm_init(void) { 388 388 extern void ac_log(const char *fmt, ...); 389 389 ac_log("[drm] drm_init() start\n"); 390 - ACDisplay *sdl = sdl_init(); 391 - if (sdl) return sdl; 392 - ac_log("[drm] SDL3 failed, falling back to DRM dumb buffers\n"); 390 + // SDL3 is now opt-in (was always-attempt with crash-recovery). The 391 + // dlopen + Mesa DRI load + SDL_Init + window/renderer creation take 392 + // 100s-of-ms even on cached cold-boot, with no measurable visual 393 + // benefit on the supported hardware. Skip it unless AC_USE_SDL=1 394 + // explicitly. Going straight to DRM dumb buffers shaves real time 395 + // off boot and removes a class of partial-init "garbled char" bugs 396 + // that surface when SDL3 starts but Mesa's GLES context doesn't. 397 + const char *use_sdl = getenv("AC_USE_SDL"); 398 + if (use_sdl && use_sdl[0] == '1') { 399 + ACDisplay *sdl = sdl_init(); 400 + if (sdl) return sdl; 401 + ac_log("[drm] SDL3 failed, falling back to DRM dumb buffers\n"); 402 + } else { 403 + ac_log("[drm] SDL3 path skipped (set AC_USE_SDL=1 to enable)\n"); 404 + } 393 405 394 406 ACDisplay *d = calloc(1, sizeof(ACDisplay)); 395 407 if (!d) { ac_log("[drm] calloc failed\n"); return NULL; }