Repository navigation
Conversation
The shared SPI HID controller logs "status message mismatch" once at boot and once on every s2idle cycle. The keyboard, the trackpad, and actuator 001C:05AC:0281 share that transport, so each line is one transfer. At boot the actuator probe sends feature report 0x21. The J313 SPI actuator descriptor has input 0x3f and output 0x53 only, and the controller answers 9c 17 e5 f8. Report 0x21 is the MTP host-mode switch. Skip it when the device has no such report. The SPI actuator powers up device-controlled, which is the state probe asks for. On suspend, input core turns lit LEDs off. NumLock is on, so that queues one output report on the non-freezable system workqueue. The SPI parent then cuts controller power and the late write reads 00 00 00 00. Flush the keyboard and trackpad LED workers while the controller is still up, refuse new transfers once it is down, and on resume wait for boot packet a0 80 00 00 before returning. spi-hid-apple-of.c is unchanged. Any other bad status word still warns. Signed-off-by: Lucas Goossen <lucas.goossen@hey.com>
ludagoo
force-pushed
the
fix/spi-hid-apple-status-wake
branch
from
October 26, 2026 18:15
38d4f08 to
cb0f94f
Compare
Member
|
Tested on a J313 (M1 Air): removes both status mismatches, at boot and around suspend, and input works straight after a real wake. No regressions found.
Real lid-close sleep (70 s, keypress wake): keyboard, pointer and trackpad click with haptic feedback all worked straight away. No mismatch or resume warnings were logged. How this was tested
|
ludagoo
marked this pull request as ready for review
October 26, 2026 23:06
ludagoo
requested review from
chriskearney,
maralcbr and
scottjones
as code owners
October 26, 2026 23:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stop two SPI HID status mismatches on the MacBook Air M1 2020 (J313).
The keyboard, trackpad, and actuator share one controller, so each mismatch is one transfer. At boot, actuator probe sends feature report 0x21, which this descriptor does not have (input 0x3f and output 0x53 only). The controller answers 9c 17 e5 f8. Skip that report when it is absent. The part already powers up device-controlled.
On suspend, NumLock-off is queued on the non-freezable system workqueue and races controller power-off, so the late write reads 00 00 00 00. Flush the keyboard and trackpad LED workers while the controller is still up, refuse new transfers once it is down, and on resume wait for boot packet a0 80 00 00 before returning.
spi-hid-apple-of.c is unchanged. Any other bad status word still warns.
Session build, Monday 26 Oct 2026 05:02 PM -03: linux-aurora 7.2.11-6-2-ARCH (package 7.2.11.aurora6-2), branch local/j313-test at 7638df0. makepkg exited 0. rustc 1.85.0, LLVM/clang 18.1.8. This machine is running that kernel. The stacked commit compiled in was 6d535f9. This pull request's head is cb0f94f, which is not the commit that was built.
Two real s2idle cycles on this kernel showed no spi-hid status mismatch. malik-na's J313 runs of an earlier identical diff (
38d4f0804ceb) logged neither the boot mismatch9c 17 e5 f8(0 of 8 boots) nor the suspend mismatch00 00 00 00(0 of 3). A real lid-close sleep had working keyboard, pointer, and trackpad click. The rebased headcb0f94f8429fwas not re-tested.