Display/GUI watchdog for the "backlight on, no picture" failure

On PoE sites the MIPI-DSI panel can lose its init on a supply dip while the
RK3566 keeps running; the UI may also hang or exit. Three layers:

- hardware watchdog: systemd RuntimeWatchdogSec=20s (system.conf.d)
- GUI: SdWatchdog pings systemd per swapped frame (WATCHDOG_USEC=30s, enabled
  by the binary so older versions run under the same unit) and writes
  run/qt.frame; buttontask.service gets Restart=always, NotifyAccess=main,
  TimeoutAbortSec=10s
- bt-displaywatch (root, buttontask-displaywatch.service): kernel DRM/DSI
  timeouts, eth link down->up (PoE dip hint), stale UI frames, restart storms
  -> panel re-init (stop UI, fb0 blank 4->0, start UI), repeated -> reboot
  (max 3/day, never during OTA); incident log in /var/log/buttontask/

Manual recovery: hold one finger 10 s in the bottom-left corner (panels are
single-touch). Delivered by OTA via bt-update sync_system; the web service
runs `bt-update sync-system` at start for devices updated by an older
bt-update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-10 07:10:10 +00:00
co-authored by Claude Opus 5.5
parent 115879ab67
commit d71fa812da
18 changed files with 940 additions and 5 deletions
+4 -1
View File
@@ -20,7 +20,8 @@ from config_store import list_icons, load_config
from network import network_bp
from rest_api import rest_bp
from sensors import sensors_bp
from system_info import apply_saved_brightness, record_request, system_bp
from system_info import (apply_saved_brightness, record_request, sync_system_units,
system_bp)
from updater import current_version, updater_bp
@@ -44,6 +45,8 @@ def create_app():
# Restore LCD brightness from config (best-effort; needs bt-brightness + sudoers).
apply_saved_brightness()
# Install watchdog units if an older bt-update skipped them (idempotent).
sync_system_units()
@app.before_request
def _request_start():