Просмотр исходного кода

Replace Plymouth with fim for SpoolBuddy boot splash

  Plymouth ran as a persistent daemon throughout boot, consuming memory
  and competing for framebuffer allocation. fim renders via DRM (Pi KMS
  doesn't expose a usable legacy framebuffer), displays the image, 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 месяцев назад
Родитель
Сommit
58b5e3ae09
2 измененных файлов с 13 добавлено и 16 удалено
  1. 1 1
      CHANGELOG.md
  2. 12 15
      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.
 - **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 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 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 via a single `apt purge` (avoids redundant initramfs rebuilds). A generator script (`generate_splash.py`) is included for easy customization.
+- **SpoolBuddy Boot Splash Overhaul** — Replaced Plymouth with fim for a lighter, faster boot splash. Plymouth ran as a persistent daemon throughout boot, consuming memory and competing for framebuffer allocation. fim renders via DRM, displays the image, 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
 ### 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.
 - **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.

+ 12 - 15
spoolbuddy/install/install.sh

@@ -853,7 +853,7 @@ strip_packages() {
 }
 }
 
 
 # ─────────────────────────────────────────────────────────────────────────────
 # ─────────────────────────────────────────────────────────────────────────────
-# Kiosk Setup (labwc + Chromium + Plymouth splash)
+# Kiosk Setup (labwc + Chromium + fbi splash)
 # ─────────────────────────────────────────────────────────────────────────────
 # ─────────────────────────────────────────────────────────────────────────────
 
 
 setup_kiosk() {
 setup_kiosk() {
@@ -878,7 +878,7 @@ setup_kiosk() {
     fi
     fi
 
 
     # ── Install kiosk packages ────────────────────────────────────────────
     # ── Install kiosk packages ────────────────────────────────────────────
-    run_with_progress "Installing kiosk packages" apt-get install -y labwc chromium fbi wlr-randr
+    run_with_progress "Installing kiosk packages" apt-get install -y labwc chromium fim wlr-randr
 
 
     # ── config.txt tweaks ─────────────────────────────────────────────────
     # ── config.txt tweaks ─────────────────────────────────────────────────
     local boot_config="/boot/firmware/config.txt"
     local boot_config="/boot/firmware/config.txt"
@@ -946,8 +946,8 @@ setup_kiosk() {
         success "Kernel cmdline updated"
         success "Kernel cmdline updated"
     fi
     fi
 
 
-    # ── fbi boot splash ──────────────────────────────────────────────────
-    info "Installing boot splash (fbi)..."
+    # ── fim boot splash ──────────────────────────────────────────────────
+    info "Installing boot splash (fim)..."
     local splash_dir="/usr/share/spoolbuddy"
     local splash_dir="/usr/share/spoolbuddy"
     mkdir -p "$splash_dir"
     mkdir -p "$splash_dir"
 
 
@@ -970,7 +970,7 @@ setup_kiosk() {
         apt-get purge -y plymouth plymouth-themes 2>/dev/null || true
         apt-get purge -y plymouth plymouth-themes 2>/dev/null || true
     fi
     fi
 
 
-    # Create systemd service that shows splash image on tty1 during boot
+    # Create systemd service that shows splash image via DRM during boot
     cat > /etc/systemd/system/spoolbuddy-splash.service << 'EOF'
     cat > /etc/systemd/system/spoolbuddy-splash.service << 'EOF'
 [Unit]
 [Unit]
 Description=SpoolBuddy Boot Splash
 Description=SpoolBuddy Boot Splash
@@ -981,11 +981,8 @@ Before=getty@tty1.service
 [Service]
 [Service]
 Type=oneshot
 Type=oneshot
 RemainAfterExit=yes
 RemainAfterExit=yes
-ExecStart=/usr/bin/fbi -T 1 -a --noverbose --norandom /usr/share/spoolbuddy/splash.png
-ExecStop=/usr/bin/killall -q fbi
-StandardInput=tty
-StandardOutput=tty
-TTYPath=/dev/tty1
+ExecStart=/usr/bin/fim --autozoom --quiet /usr/share/spoolbuddy/splash.png
+ExecStop=/usr/bin/killall -q fim
 
 
 [Install]
 [Install]
 WantedBy=sysinit.target
 WantedBy=sysinit.target
@@ -993,7 +990,7 @@ EOF
 
 
     systemctl daemon-reload
     systemctl daemon-reload
     systemctl enable spoolbuddy-splash.service
     systemctl enable spoolbuddy-splash.service
-    success "Boot splash installed (fbi)"
+    success "Boot splash installed (fim)"
 
 
     # ── Auto-login on tty1 ────────────────────────────────────────────────
     # ── Auto-login on tty1 ────────────────────────────────────────────────
     info "Configuring auto-login for $KIOSK_USER..."
     info "Configuring auto-login for $KIOSK_USER..."
@@ -1099,7 +1096,7 @@ EOF
         # ── labwc autostart ───────────────────────────────────────────────────
         # ── labwc autostart ───────────────────────────────────────────────────
         cat > "$labwc_dir/autostart" << EOF
         cat > "$labwc_dir/autostart" << EOF
 # Kill fbi boot splash now that the compositor is running
 # Kill fbi boot splash now that the compositor is running
-systemctl stop spoolbuddy-splash.service 2>/dev/null || killall -q fbi || true
+systemctl stop spoolbuddy-splash.service 2>/dev/null || killall -q fim || true
 
 
 # Force 1024x600 (panel doesn't advertise this natively)
 # Force 1024x600 (panel doesn't advertise this natively)
 wlr-randr --output HDMI-A-1 --custom-mode 1024x600@60 &
 wlr-randr --output HDMI-A-1 --custom-mode 1024x600@60 &
@@ -1393,7 +1390,7 @@ main() {
     download_spoolbuddy
     download_spoolbuddy
     echo ""
     echo ""
 
 
-    # ── Step 3b: Kiosk setup (labwc + Chromium + squeekboard + Plymouth) ──
+    # ── Step 3b: Kiosk setup (labwc + Chromium + fbi splash) ──
     setup_kiosk
     setup_kiosk
     echo ""
     echo ""
 
 
@@ -1445,7 +1442,7 @@ main() {
 
 
     if [[ "$INSTALL_MODE" == "full" ]]; then
     if [[ "$INSTALL_MODE" == "full" ]]; then
         echo -e "  ${BOLD}Next steps:${NC}"
         echo -e "  ${BOLD}Next steps:${NC}"
-        echo -e "    1. Reboot (required for kiosk, Plymouth splash, and hardware changes)"
+        echo -e "    1. Reboot (required for kiosk, boot splash, and hardware changes)"
         echo -e "    2. The touchscreen kiosk will start automatically after reboot"
         echo -e "    2. The touchscreen kiosk will start automatically after reboot"
         echo -e "    3. On another device, open ${CYAN}http://$ip_addr:$BAMBUDDY_PORT${NC}"
         echo -e "    3. On another device, open ${CYAN}http://$ip_addr:$BAMBUDDY_PORT${NC}"
         echo -e "    4. Go to Settings -> API Keys and create an API key"
         echo -e "    4. Go to Settings -> API Keys and create an API key"
@@ -1468,7 +1465,7 @@ main() {
     echo -e "  ${BOLD}Diagnostics:${NC}      ${CYAN}sudo $INSTALL_PATH/spoolbuddy/venv/bin/python $INSTALL_PATH/spoolbuddy/pn5180_diag.py${NC}"
     echo -e "  ${BOLD}Diagnostics:${NC}      ${CYAN}sudo $INSTALL_PATH/spoolbuddy/venv/bin/python $INSTALL_PATH/spoolbuddy/pn5180_diag.py${NC}"
     echo ""
     echo ""
 
 
-    echo -e "  ${YELLOW}A reboot is required to apply all changes (kiosk, Plymouth splash, hardware).${NC}"
+    echo -e "  ${YELLOW}A reboot is required to apply all changes (kiosk, boot splash, hardware).${NC}"
     echo ""
     echo ""
     if prompt_yes_no "Reboot now?" "y"; then
     if prompt_yes_no "Reboot now?" "y"; then
         reboot
         reboot