Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

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

init: early USB logging + wait for any DRM card + 5s timeout

- Mount USB early in init so we get logs even when ac-native fails
- Wait for card0 OR card1 (simpledrm may use card1)
- Extend wait to 5s for slower GPU probes
- Log available devices for debugging

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

+29 -4
+29 -4
fedac/native/initramfs/init
··· 13 13 mount -t debugfs debugfs /sys/kernel/debug 2>/dev/null 14 14 mount -t efivarfs efivarfs /sys/firmware/efi/efivars 2>/dev/null 15 15 16 + # Early USB mount for init logging (before ac-native starts) 17 + INIT_LOG="" 18 + for usbdev in /dev/sda1 /dev/sdb1 /dev/sdc1; do 19 + if [ -b "$usbdev" ]; then 20 + mkdir -p /mnt/usb 21 + mount -o rw "$usbdev" /mnt/usb 2>/dev/null && { 22 + INIT_LOG="/mnt/usb/ac-init.log" 23 + echo "=== AC Init $(date 2>/dev/null || echo 'boot') ===" > "$INIT_LOG" 24 + break 25 + } 26 + fi 27 + done 28 + # Log helper — writes to USB if mounted, always to kmsg 29 + ilog() { 30 + echo "[init] $*" 31 + [ -n "$INIT_LOG" ] && echo "[init] $*" >> "$INIT_LOG" 32 + } 33 + ilog "devtmpfs mounted, USB=${usbdev:-none}" 34 + ilog "devices: $(ls /dev/dri/ 2>/dev/null || echo 'no /dev/dri')" 35 + ilog "fb: $(ls /dev/fb* 2>/dev/null || echo 'no fb')" 36 + ilog "pci gpu: $(cat /sys/bus/pci/devices/*/class 2>/dev/null | grep -c '0x03' || echo 0) devices" 37 + 16 38 # Restore baked credentials from initramfs rootfs (before tmpfs hid them) 17 39 # The build bakes Claude creds at /tmp/.claude/ but tmpfs mount hides them. 18 40 # Copy from the initramfs backup location instead. ··· 65 87 66 88 # Wait for DRM device (GPU driver may not be ready yet) 67 89 WAIT=0 68 - while [ ! -e /dev/dri/card0 ] && [ $WAIT -lt 30 ]; do 90 + while [ ! -e /dev/dri/card0 ] && [ ! -e /dev/dri/card1 ] && [ $WAIT -lt 50 ]; do 69 91 sleep 0.1 70 92 WAIT=$((WAIT + 1)) 71 93 done 72 - if [ -e /dev/dri/card0 ]; then 73 - ilog "drm ready after ${WAIT}00ms" 94 + if [ -e /dev/dri/card0 ] || [ -e /dev/dri/card1 ]; then 95 + DRM_DEV=$(ls /dev/dri/card* 2>/dev/null | head -1) 96 + ilog "drm ready: ${DRM_DEV} after ${WAIT}00ms" 74 97 else 75 - ilog "WARNING: /dev/dri/card0 not found after 3s" 98 + ilog "WARNING: no /dev/dri/card* found after 5s — trying framebuffer" 99 + # List what devices exist for debugging 100 + ls /dev/dri/ /dev/fb* 2>/dev/null | while read f; do ilog " dev: $f"; done 76 101 fi 77 102 78 103 ilog "starting ac-native"