#!/bin/bash # Switch off boot-time services a headless robot does not use. They cost ~9 s of CPU and a few # seconds of wall time at every boot, competing with the face for the CPU and the SD card. # snapd: no snaps are installed. ModemManager: no modems. Run as root. Re-runnable; undo with # `systemctl unmask ... && systemctl enable ...`. set -euo pipefail systemctl disable --now snapd.service snapd.socket snapd.seeded.service snapd.apparmor.service 2>/dev/null || true systemctl mask snapd.service snapd.socket 2>/dev/null || true systemctl disable --now ModemManager.service 2>/dev/null || true echo "trimmed: snapd, ModemManager"