From 13d523a31ce0fad822241e27586f48064f1f5b71 Mon Sep 17 00:00:00 2001 From: Jonathon Kennemer Date: Sat, 14 Feb 2026 10:45:35 -0600 Subject: [PATCH] Fix keyboard not responding after USB wake from sleep When the host computer suspends, usb_remote_wakeup() calls suspend_power_down() to put the keyboard into a low-power state. However, when the host resumes and USB transitions out of SUSPENDED state, suspend_wakeup_init() is never called, leaving keyboard subsystems (matrix scanning, etc.) in a shut-down state. This requires the user to physically unplug and replug the USB cable. Add a `suspended` flag to track whether suspend_power_down() was called, and call suspend_wakeup_init() when USB returns to active state. This mirrors the pattern used in the USB_REMOTE_USE_QMK code path and in QMK's own suspend handling. Co-Authored-By: Claude Opus 4.6 --- tide75/linker/wireless/transport.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tide75/linker/wireless/transport.c b/tide75/linker/wireless/transport.c index 83e30c7..79590b7 100644 --- a/tide75/linker/wireless/transport.c +++ b/tide75/linker/wireless/transport.c @@ -120,15 +120,21 @@ void usb_remote_wakeup(void) { } #else static uint32_t suspend_timer = 0x00; + static bool suspended = false; if ((USB_DRIVER.state == USB_SUSPENDED)) { if (!suspend_timer) suspend_timer = sync_timer_read32(); if (sync_timer_elapsed32(suspend_timer) >= USB_POWER_DOWN_DELAY) { suspend_timer = 0x00; + suspended = true; suspend_power_down(); } } else { suspend_timer = 0x00; + if (suspended) { + suspended = false; + suspend_wakeup_init(); + } } #endif }