Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

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

ac-native: enable KMS for direct-boot SDL3, log SDL3 to ac_log

- Remove `nomodeset` from kernel cmdline so i915 KMS works when
booting the kernel directly as BOOTX64.EFI (no systemd-boot).
This was preventing SDL3 KMSDRM backend from initializing.
- Change loglevel=7 to loglevel=3 quiet for clean direct-boot.
- Route all SDL3 init/probe messages through ac_log() instead of
fprintf(stderr) so they persist in /mnt/ac-native.log.
- Fix MAC partition sizing in flash-helper (STAGE_MB*2+128) to
fit both boot.efi and BOOTX64.EFI copies of the kernel.

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

+16 -14
+1 -1
fedac/native/kernel/config-minimal
··· 424 424 CONFIG_LEGACY_VSYSCALL_XONLY=y 425 425 # CONFIG_LEGACY_VSYSCALL_NONE is not set 426 426 CONFIG_CMDLINE_BOOL=y 427 - CONFIG_CMDLINE="console=tty0 loglevel=7 vt.global_cursor_default=0 init=/init mitigations=off snd_intel_dspcfg.dsp_driver=0 snd_hda_intel.power_save=0 nmi_watchdog=0 tsc=reliable no_timer_check acpi_backlight=native thinkpad_acpi.brightness_enable=1 i8042.reset i8042.nomux nomodeset efi=noruntime" 427 + CONFIG_CMDLINE="console=tty0 quiet loglevel=3 vt.global_cursor_default=0 init=/init mitigations=off snd_intel_dspcfg.dsp_driver=0 snd_hda_intel.power_save=0 nmi_watchdog=0 tsc=reliable no_timer_check acpi_backlight=native thinkpad_acpi.brightness_enable=1 i8042.reset i8042.nomux efi=noruntime" 428 428 # CONFIG_CMDLINE_OVERRIDE is not set 429 429 CONFIG_MODIFY_LDT_SYSCALL=y 430 430 # CONFIG_STRICT_SIGALTSTACK_SIZE is not set
+15 -13
fedac/native/src/drm-display.c
··· 19 19 #include <signal.h> 20 20 #include <sys/wait.h> 21 21 22 + extern void ac_log(const char *fmt, ...); 23 + 22 24 // Probe whether SDL3 can init without crashing (runs in a child process) 23 25 static int sdl_probe_safe(void) { 24 26 pid_t pid = fork(); ··· 35 37 int status = 0; 36 38 waitpid(pid, &status, 0); 37 39 if (WIFSIGNALED(status)) { 38 - fprintf(stderr, "[sdl3] Probe crashed (signal %d) — skipping SDL3\n", 39 - WTERMSIG(status)); 40 + ac_log("[sdl3] Probe crashed (signal %d) — skipping SDL3\n", 41 + WTERMSIG(status)); 40 42 return 0; 41 43 } 42 44 if (WIFEXITED(status) && WEXITSTATUS(status) == 0) { 43 45 return 1; 44 46 } 45 - fprintf(stderr, "[sdl3] Probe failed (exit %d) — skipping SDL3\n", 46 - WIFEXITED(status) ? WEXITSTATUS(status) : -1); 47 + ac_log("[sdl3] Probe failed (exit %d) — skipping SDL3\n", 48 + WIFEXITED(status) ? WEXITSTATUS(status) : -1); 47 49 return 0; 48 50 } 49 51 ··· 53 55 if (!sdl_lib) { 54 56 sdl_lib = dlopen("libSDL3.so.0", RTLD_LAZY); 55 57 if (!sdl_lib) { 56 - fprintf(stderr, "[sdl3] libSDL3.so.0 not found — skipping\n"); 58 + ac_log("[sdl3] libSDL3.so.0 not found — skipping\n"); 57 59 return NULL; 58 60 } 59 61 } ··· 68 70 } 69 71 70 72 if (!SDL_Init(SDL_INIT_VIDEO)) { 71 - fprintf(stderr, "[sdl3] SDL_Init failed: %s\n", SDL_GetError()); 73 + ac_log("[sdl3] SDL_Init failed: %s\n", SDL_GetError()); 72 74 return NULL; 73 75 } 74 76 75 77 // Get primary display and its mode 76 78 SDL_DisplayID primary = SDL_GetPrimaryDisplay(); 77 79 if (!primary) { 78 - fprintf(stderr, "[sdl3] No primary display: %s\n", SDL_GetError()); 80 + ac_log("[sdl3] No primary display: %s\n", SDL_GetError()); 79 81 SDL_Quit(); 80 82 return NULL; 81 83 } 82 84 const SDL_DisplayMode *dm = SDL_GetDesktopDisplayMode(primary); 83 85 if (!dm) { 84 - fprintf(stderr, "[sdl3] GetDesktopDisplayMode failed: %s\n", SDL_GetError()); 86 + ac_log("[sdl3] GetDesktopDisplayMode failed: %s\n", SDL_GetError()); 85 87 SDL_Quit(); 86 88 return NULL; 87 89 } ··· 89 91 SDL_Window *win = SDL_CreateWindow("ac-native", dm->w, dm->h, 90 92 SDL_WINDOW_FULLSCREEN); 91 93 if (!win) { 92 - fprintf(stderr, "[sdl3] CreateWindow failed: %s\n", SDL_GetError()); 94 + ac_log("[sdl3] CreateWindow failed: %s\n", SDL_GetError()); 93 95 SDL_Quit(); 94 96 return NULL; 95 97 } ··· 98 100 99 101 SDL_Renderer *ren = SDL_CreateRenderer(win, NULL); 100 102 if (!ren) { 101 - fprintf(stderr, "[sdl3] CreateRenderer failed: %s\n", SDL_GetError()); 103 + ac_log("[sdl3] CreateRenderer failed: %s\n", SDL_GetError()); 102 104 SDL_DestroyWindow(win); 103 105 SDL_Quit(); 104 106 return NULL; ··· 109 111 110 112 // Log renderer info 111 113 const char *ren_name = SDL_GetRendererName(ren); 112 - fprintf(stderr, "[sdl3] Renderer: %s\n", ren_name ? ren_name : "unknown"); 114 + ac_log("[sdl3] Renderer: %s\n", ren_name ? ren_name : "unknown"); 113 115 114 116 ACDisplay *d = calloc(1, sizeof(ACDisplay)); 115 117 d->fd = -1; ··· 125 127 snprintf(d->sdl_renderer_name, sizeof(d->sdl_renderer_name), "%s", 126 128 ren_name ? ren_name : "unknown"); 127 129 128 - fprintf(stderr, "[sdl3] Ready (%dx%d)\n", d->width, d->height); 130 + ac_log("[sdl3] Ready (%dx%d)\n", d->width, d->height); 129 131 return d; 130 132 } 131 133 #endif /* USE_SDL */ ··· 303 305 #ifdef USE_SDL 304 306 ACDisplay *sdl = sdl_init(); 305 307 if (sdl) return sdl; 306 - fprintf(stderr, "[drm] SDL3 failed, falling back to DRM dumb buffers\n"); 308 + ac_log("[drm] SDL3 failed, falling back to DRM dumb buffers\n"); 307 309 #endif 308 310 309 311 ACDisplay *d = calloc(1, sizeof(ACDisplay));