6 Commits

Author SHA1 Message Date
f9fcb9f121 Fix goodbye.png not visible on idle auto-shutdown
The Allwinner /dev/disp driver resets brightness to 0 when the fd is
closed, so the screen monitor's SIGTERM brightness restore was undone
before the wrapper wrote goodbye.png. Restore brightness in the wrapper
itself, right before the framebuffer write.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 23:12:10 +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
06daec791e Move shutdown screen to wrapper, reuse stock firmware goodbye.png
The in-app shutdown visual didn't work because SDL cleanup wiped the
framebuffer. Instead of hacking around that, move the shutdown display
to the device wrapper where it belongs. The wrapper now decodes the
stock firmware's goodbye.png with Python3+PIL and writes raw BGRA
pixels directly to /dev/fb0 before calling poweroff.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 21:07:03 +01:00
3728e9499c Implement power button monitor, document device input devices
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 20:07:37 +01:00
0f653d4395 Handle SIGTERM/SIGINT for clean shutdown, add device wrapper script
sdlamp2 now catches SIGTERM and SIGINT via a sig_atomic_t flag checked
in the main loop, ensuring position and volume are saved before exit.
Previously, a kill signal would terminate instantly without saving.

New tools/rg35xx-wrapper.sh replaces sdlamp2 as the dmenu_ln CMD on
the RG35XX Plus. Skeleton includes placeholders for WiFi hotspot and
power button monitoring (TBD after on-device investigation).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 15:49:38 +01:00