Files
Button/webconfig/buttontask.service
T
GrigoandClaude Opus 5.5 d71fa812da 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>
2026-11-10 07:10:10 +00:00

34 lines
1.2 KiB
Desktop File

[Unit]
Description=ButtonTask Qt5 UI
After=NetworkManager.service
Wants=NetworkManager.service
# Never give up restarting; restart storms are escalated to a reboot by
# buttontask-displaywatch (bt-displaywatch), with a daily cap.
StartLimitIntervalSec=0
[Service]
Type=simple
# GUI watchdog: the binary enables it itself (WATCHDOG_USEC=30s after the
# first rendered frame) and pings once per real frame. No WatchdogSec= here,
# so older binaries without the ping still run under this unit.
NotifyAccess=main
# On a watchdog timeout systemd sends SIGABRT; if the process does not die
# within 10 s (stopped / stuck), SIGKILL instead of the default 90 s wait.
TimeoutAbortSec=10s
User=buttontask
Group=buttontask
SupplementaryGroups=video render input
WorkingDirectory=/opt/buttontask/current
Environment=BUTTONTASK_ROOT=/opt/buttontask
Environment=BUTTONTASK_CONFIG=/opt/buttontask/config/config.json
Environment=QT_QPA_PLATFORM=eglfs
Environment=QT_QPA_EGLFS_INTEGRATION=eglfs_kms
Environment=QT_QPA_EGLFS_HIDECURSOR=1
Environment=XDG_RUNTIME_DIR=/tmp/runtime-buttontask
ExecStart=/opt/buttontask/current/ButtonTask --config /opt/buttontask/config/config.json
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target