diff --git a/docs/sdlamp2-fsd.md b/docs/sdlamp2-fsd.md index 152bcaf..ae09a0d 100644 --- a/docs/sdlamp2-fsd.md +++ b/docs/sdlamp2-fsd.md @@ -43,6 +43,10 @@ This document specifies the functional requirements for an SDL2 based media play ## 6. Changelog +### 2026-02-13 — Fix power button screen toggle regression + +- **Power button screen off stays off**: Fixed regression from fbd32d7 where short-pressing the power button to turn off the screen would instantly turn it back on. The generic wake logic (`any_activity`) was being triggered by power button events themselves. Moved `any_activity = True` below the power button handler's `continue` so power events are handled exclusively by the power button handler and don't trigger the wake path. + ### 2026-02-13 — Screen wake fixes and idle auto-shutdown - **D-pad wakes screen**: The screen monitor now wakes on any input event type (EV_ABS, EV_KEY, etc.), not just EV_KEY. This fixes d-pad presses (which generate EV_ABS hat events) not waking the screen. diff --git a/tools/rg35xx-screen-monitor.py b/tools/rg35xx-screen-monitor.py index 8cb04c3..5427176 100755 --- a/tools/rg35xx-screen-monitor.py +++ b/tools/rg35xx-screen-monitor.py @@ -198,8 +198,6 @@ def main(): if ev_type == EV_SYN: continue - any_activity = True - # Power button handling (EV_KEY only) if ev_type == EV_KEY and ev_code == KEY_POWER: if ev_value == 1: # press @@ -220,6 +218,8 @@ def main(): # Between SHORT and LONG threshold: ignore (release before 3s) continue + any_activity = True + # Any input activity resets idle shutdown timer if any_activity: last_active_time = time.monotonic()