tmk / tmk_keyboard

Keyboard firmwares for Atmel AVR and Cortex-M
3.96k stars 1.7k forks source link

NeXT-USB: Wakeup problem on Mac and Remote Wakeup #753

Closed tmk closed 1 year ago

tmk commented 1 year ago

Found that NeXT-USB has two problems on suspend/wakeup.

1. Wakeup problem on Mac

reported by some user. The converter stops working after wakeup on Mac. On Windows 10 and Linux(Ubuntu 22.04.2 LTS) it has no problem.

I don't own Mac to test and could not look into.

without the build option below LUFA on atmega32u2 cannot provide suspend and wake event. This seems to lead wake problem on Mac.

Delay after RemoteWakeup on QMK

Also this 200ms delay would be interested if further wake/sleep issue still exists, but not tested by me.

https://github.com/spidey3/qmk_firmware/blob/cf51106cc61000b026c06e6162e5e671435d1bab/tmk_core/protocol/lufa/lufa.c#L1086-L1094

https://github.com/qmk/qmk_firmware/pull/11450

2. Remote Wakeup

The converter cannot RemoteWakeup computer by pressing a key at least on Windows 10 and Linux(Ubuntu 22.04.2 LTS).

Not tested on Mac.

Cause

Makefile in next_usb define variable MCU like: MCU ?= atmega32u2 # TMK converter in this case tmk_core/protocol/lufa.mk fails to define build option NO_LIMITED_CONTROLLER_CONNECT for LUFA.

This prevents RemoteWakeup on atmega32u2: https://github.com/tmk/tmk_keyboard/issues/361

tmk commented 1 year ago

Fixed 1. and 2. by the commit: https://github.com/tmk/tmk_keyboard/commit/b3d2f64bb3f3b3971f73aa11197be2445b07406f

As for 1. problem seems to be cured but is not completely tested.