Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

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

fix(native): suppress Mesa DRI loader warning during SDL3 probe

ac-native uses direct KMS/DRM modesetting, not GPU-accelerated
rendering. The SDL3 probe path triggers Mesa's GBM loader which
prints "failed to open dri" to stderr when DRI drivers are absent
from the initramfs. Redirect stderr to /dev/null during the probe.

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

+8
+8
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 + // Suppress Mesa DRI loader warnings during SDL3 probe. The SDL3/GBM 391 + // path triggers Mesa's loader which prints "failed to open dri" to 392 + // stderr when DRI drivers are absent from the initramfs. We redirect 393 + // stderr to /dev/null during the probe, then restore it. 394 + int saved_stderr = dup(STDERR_FILENO); 395 + int devnull = open("/dev/null", O_WRONLY); 396 + if (devnull >= 0) { dup2(devnull, STDERR_FILENO); close(devnull); } 390 397 ACDisplay *sdl = sdl_init(); 398 + if (saved_stderr >= 0) { dup2(saved_stderr, STDERR_FILENO); close(saved_stderr); } 391 399 if (sdl) return sdl; 392 400 ac_log("[drm] SDL3 failed, falling back to DRM dumb buffers\n"); 393 401