Browse Source

Replace Plymouth with fbi for SpoolBuddy boot splash

  Plymouth ran as a persistent daemon throughout boot, consuming memory
  and competing for framebuffer allocation. fbi writes pixels directly
  to the framebuffer and exits — zero ongoing resource cost.

  New splash image shows only the SpoolBuddy logo with baked-in glow,
  radial gradient, light rays, and vignette effects (66KB vs 205KB).
  Install script auto-purges Plymouth on existing installs in a single
  pass to avoid redundant initramfs rebuilds.
maziggy 2 months ago
parent
commit
387aafaee4
2 changed files with 6 additions and 5 deletions
  1. 1 1
      CHANGELOG.md
  2. 5 4
      spoolbuddy/install/install.sh

+ 1 - 1
CHANGELOG.md

@@ -25,7 +25,7 @@ All notable changes to Bambuddy will be documented in this file.
 - **Removed Diagnostic Buttons from Write Tag Page** — Removed the "NFC Diag" and "Scale Diag" buttons from the NFC status panel on the Write Tag page. These diagnostics are accessible from the Settings page and don't belong on the tag writing flow.
 - **SpoolBuddy Assign Spool Modal No Longer Clips Display** — The shared Assign Spool modal overflowed off-screen on the small SpoolBuddy touchscreen, hiding the footer buttons. Added scoped CSS in the SpoolBuddy AMS page that caps the modal at 90vh with a scrollable spool list, without affecting the main Bambuddy frontend.
 - **SpoolBuddy System Tab** — Added a "System" tab to SpoolBuddy Settings showing live OS stats from the Raspberry Pi: CPU temperature, core count, load average, memory usage, disk usage, OS distro/kernel/architecture, Python version, and system uptime. Stats are collected by the daemon every heartbeat (10s) using stdlib-only reads from `/proc` and `/sys` — no additional dependencies required. Usage bars turn amber at 70% and red at 90%; CPU temperature is color-coded green/amber/red.
-- **SpoolBuddy Boot Splash Overhaul** — Replaced Plymouth with fbi for a lighter, faster boot splash. Plymouth ran as a persistent daemon throughout boot, consuming memory and competing for framebuffer allocation. fbi writes pixels directly to the framebuffer and exits — zero ongoing resource cost. The new splash displays only the SpoolBuddy logo with polished glow effects, radial gradient background, light rays, and vignette (66KB vs 205KB). Plymouth is automatically removed on upgrade. A generator script (`generate_splash.py`) is included for easy customization.
+- **SpoolBuddy Boot Splash Overhaul** — Replaced Plymouth with fbi for a lighter, faster boot splash. Plymouth ran as a persistent daemon throughout boot, consuming memory and competing for framebuffer allocation. fbi writes pixels directly to the framebuffer and exits — zero ongoing resource cost. The new splash displays only the SpoolBuddy logo with polished glow effects, radial gradient background, light rays, and vignette (66KB vs 205KB). Plymouth is automatically removed on upgrade via a single `apt purge` (avoids redundant initramfs rebuilds). A generator script (`generate_splash.py`) is included for easy customization.
 
 ### Fixed
 - **SpoolBuddy Read Tag Diagnostic Fails on NTAG Tags** — The `read_tag.py` diagnostic script had five issues preventing NTAG reads: (1) SAK `0x04` (MIFARE Ultralight family) was rejected as "unsupported tag type" — now accepts both `0x00` and `0x04`. (2) `ntag_read_pages` had TX CRC off (should be on per NTAG spec), no Crypto1 clear, and no IDLE→TRANSCEIVE state reset. (3) The PN5180 enters an unrecoverable state after an NTAG READ command — added full GPIO hardware reset between each 4-page batch. (4) Reading past the end of smaller tags (MIFARE Ultralight has 16 pages vs NTAG's 44+) caused a hard failure — now returns partial data gracefully. (5) `ntag_write_page`/`ntag_write_pages` had the same stale CRC/state issues plus unreliable ACK checking and post-write verification — synced with daemon.

+ 5 - 4
spoolbuddy/install/install.sh

@@ -962,11 +962,12 @@ setup_kiosk() {
         warn "splash.png not found — boot splash will not display an image"
     fi
 
-    # Remove Plymouth if present (replaced by fbi)
-    if dpkg -l plymouth &>/dev/null; then
+    # Remove Plymouth if present (replaced by fbi).
+    # Use --purge directly (skips separate purge pass) to avoid double
+    # update-initramfs runs from apt post-removal hooks.
+    if dpkg -l plymouth 2>/dev/null | grep -q '^ii'; then
         info "Removing Plymouth (replaced by lightweight fbi splash)..."
-        apt-get remove -y --purge plymouth plymouth-themes 2>/dev/null || true
-        update-initramfs -u 2>/dev/null || true
+        apt-get purge -y plymouth plymouth-themes 2>/dev/null || true
     fi
 
     # Create systemd service that shows splash image on tty1 during boot