Skip to content

Fix: Don't allow an improper indefinite remote wakeup on RP2040 USB after PC suspend - #453

Open
swift502 wants to merge 1 commit into
ChibiOS:chibios-21.11.xfrom
swift502:chibios-21.11.x
Open

swift502 wants to merge 1 commit into
ChibiOS:chibios-21.11.xfrom
swift502:chibios-21.11.x

Conversation

@swift502

@swift502 swift502 commented Oct 2, 2026 •

Copy link
Copy Markdown

When the device asks the host to wake up, the driver can decide the host has answered even when it hasn't because of an obsolete SOF flag value. The device then switches to active and stays that way, although nothing is talking to it. This is easiest to see with a PC that is shut down but still powers its USB ports: pressing a key "wakes" the device, and it never returns to suspend.

This is a bug because this behavior doesn't conform to USB spec.

I confirmed this fixes the issue for my QMK keyboard.

@swift502

swift502 commented Oct 3, 2026

Copy link
Copy Markdown
Author

This also seems to be compatible with the intention behind e284aab by @KarlK90. It's been a long time, but just in case you had spare time to confirm or deny this is valid, I'm tagging.

@swift502 swift502 changed the title RP2040 USB: clear stale SOF flag before remote wakeup RP2040 USB: clear SOF flag before remote wakeup Oct 21, 2026
@swift502 swift502 changed the title RP2040 USB: clear SOF flag before remote wakeup Fix: Don't allow an improper indefinite remote wakeup on RP2040 USB after PC suspend Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant