4 Commits

Author SHA1 Message Date
1ea1490e60 Fix power button screen toggle instantly turning back on
Power button events were setting any_activity before the power handler's
continue, causing the generic wake logic to immediately re-enable the screen.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 23:18:42 +01:00
fbd32d7fb8 Fix screen wake for d-pad, grab inputs while screen off, auto-shutdown on idle
- Broaden wake events beyond EV_KEY so d-pad (EV_ABS) wakes the screen
- Use EVIOCGRAB for exclusive input while screen is off, preventing the
  wake button press from also acting in sdlamp2
- Auto-shutdown after 10 minutes of no input and no audio playback,
  detected by monitoring the audio file's read position via /proc fdinfo

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 22:47:47 +01:00
3fcae8ea5e Fix power button shutdown by consolidating input handling in screen monitor
Both the evtest-based power monitor and the Python screen monitor were
reading /dev/input/event0 simultaneously, causing missed events on the
device's Linux 4.9 kernel. Moved long-press shutdown into the screen
monitor (which already reads event0 directly) and removed the evtest
dependency entirely.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 21:47:48 +01:00
2142ed7629 Add screen idle timeout and power button screen toggle
New Python screen monitor uses Allwinner /dev/disp ioctls to turn off
the display after 15s of no input and toggle it with a short power
button press. Launched by the wrapper alongside sdlamp2.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 21:34:43 +01:00