TEMP: route live diag to serial via sudo (revert after)
All checks were successful
Mirror to GitHub / mirror (push) Successful in 10s

This commit is contained in:
Breadway 2026-06-14 19:17:46 +08:00
parent 356cc08dfe
commit 122cd39cb1
2 changed files with 20 additions and 18 deletions

View file

@ -1,19 +1,21 @@
#!/bin/bash #!/bin/bash
# TEMPORARY live-session diagnostic. Reports why the bread desktop components # TEMPORARY live-session diagnostic. Reports why the bread desktop components
# do/don't start, to the serial port (/dev/ttyS0) so it can be read on the VM # do/don't start. Runs as liveuser (Hyprland exec-once, so it has the Wayland
# host. Launched as a Hyprland exec-once, so it inherits the Wayland env. # env), and writes the report to the serial port via sudo (the port is
exec >/dev/ttyS0 2>&1 # root-only) so it can be read on the VM host.
sleep 7 sleep 7
echo "================ BOS LIVE DIAG ================" {
echo "user=$(id -un) WAYLAND_DISPLAY=$WAYLAND_DISPLAY XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR" echo "================ BOS LIVE DIAG ================"
echo "--- which bread bins ---" echo "user=$(id -un) WAYLAND_DISPLAY=$WAYLAND_DISPLAY XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR"
for b in breadd breadbar breadbox breadbox-sync breadcrumbs breadpad bos-settings; do echo "--- which bread bins ---"
printf '%s: ' "$b"; command -v "$b" || echo MISSING for b in breadd breadbar breadbox breadbox-sync breadcrumbs breadpad bos-settings; do
done printf '%s: ' "$b"; command -v "$b" || echo MISSING
echo "--- running bread procs ---"; pgrep -a bread || echo "(none running)" done
echo "--- ldd breadbar (missing libs) ---" echo "--- running bread procs ---"; pgrep -a bread || echo "(none running)"
ldd "$(command -v breadbar 2>/dev/null)" 2>&1 | grep -i "not found" || echo "(all libs resolved)" echo "--- ldd breadbar (missing libs) ---"
echo "--- breadbar foreground test (6s) ---"; timeout 6 breadbar; echo "breadbar rc=$?" ldd "$(command -v breadbar 2>/dev/null)" 2>&1 | grep -i "not found" || echo "(all libs resolved)"
echo "--- breadd foreground test (4s) ---"; timeout 4 breadd; echo "breadd rc=$?" echo "--- breadbar foreground test (6s) ---"; timeout 6 breadbar 2>&1; echo "breadbar rc=$?"
echo "--- tail hyprland-live.log ---"; tail -50 /tmp/hyprland-live.log 2>/dev/null echo "--- breadd foreground test (4s) ---"; timeout 4 breadd 2>&1; echo "breadd rc=$?"
echo "================ END DIAG ================" echo "--- tail hyprland-live.log ---"; tail -60 /tmp/hyprland-live.log 2>/dev/null
echo "================ END DIAG ================"
} 2>&1 | sudo tee /dev/ttyS0 >/dev/null

View file

@ -41,8 +41,8 @@ if [[ "$(tty)" == /dev/tty1 ]] && [[ -z "$WAYLAND_DISPLAY" ]]; then
export WLR_NO_HARDWARE_CURSORS=1 export WLR_NO_HARDWARE_CURSORS=1
# Log to a user-writable path (/var/log is root-only; redirecting there # Log to a user-writable path (/var/log is root-only; redirecting there
# would fail and silently keep the compositor from ever launching). # would fail and silently keep the compositor from ever launching).
Hyprland &>/tmp/hyprland-live.log Hyprland 2>&1 | sudo tee /tmp/hyprland-live.log /dev/ttyS0 >/dev/null
echo "Hyprland exited (rc=$?). Log: /tmp/hyprland-live.log" echo "Hyprland exited. Log: /tmp/hyprland-live.log" | sudo tee /dev/ttyS0
exec bash -i exec bash -i
fi fi
EOF EOF