SonixQMK / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
515 stars 409 forks source link

[Bug] Keychron C1 (White) can't wake computer from suspend #266

Closed Plombo closed 11 months ago

Plombo commented 2 years ago

Describe the Bug

With firmware built from the latest sn32_master branch, the Keychron C1 (white backlight version) can't wake my computer from a suspended state. The keyboard's backlight and LEDs also don't turn off like they should when the computer is suspended. Neither of these problems happens with precompiled firmware from here, based on an older revision, so it seems to be a regression. I can't bisect it, though, due to problems building working firmware from any git revisions older than a certain point.

System Information

Additional Context

Plombo commented 2 years ago

Since filing this bug, I've confirmed that the problem with the backlight and LEDs is unrelated to the problem with USB remote wakeup.

Plombo commented 2 years ago

The issue turned out to be some remote wakeup code trying to sleep for 2 milliseconds instead of busywaiting through that time. This ChibiOS-Contrib pull request fixes the bug.