Repository navigation
input: apple_mtp_kbd: leave the J604's MTP to Linux - #44
Merged
Merged
Conversation
On the J604 (MacBook Pro 14-inch, M4) iBoot hands the MTP over halted and Linux cold-starts it. U-Boot starts it first: stdio_add_devices() probes every keyboard, the MTP keyboard's probe boots the RTKit helper, and with no live handoff for this board the helper is taken to QUIESCED and stopped at OS entry. The firmware does not survive a second start: Linux's RTKit boot crashes it a few milliseconds in (data abort in the IOReport path), and the internal keyboard and trackpad are gone. The firmware's mailbox history in the crash log shows both sessions, U-Boot's ending in the QUIESCED request, then Linux's. Refuse the keyboard on the J604, as for the J813. U-Boot and GRUB then have no internal keyboard there, and Linux gets a firmware nobody ran. Tested on a J604 (Mac16,1, 26.6.2 stub, aura 1.0.0b8 Stage 1) installed with the Aurora installer: before, "RTKit: co-processor has crashed" on every boot; with this change "MTP Says Hello" and working keyboard and trackpad. Assisted-by: LLM Signed-off-by: Friedrich <[email protected]>
This was referenced Nov 10, 2026
This was referenced Nov 19, 2026
This was referenced Nov 22, 2026
Merged
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.
Summary
On a J604 (MacBook Pro 14-inch, M4) installed with the Aurora installer, the internal keyboard and trackpad never work
in Linux:
rtkit-helper 394600000.mtp: RTKit: co-processor has crasheda few milliseconds after the RTKit init, on everyboot. The same kernel and device tree start the MTP fine when aura boots the kernel directly, without U-Boot.
The J604's iBoot hands the MTP over halted and Linux cold-starts it (aura #137, linux #1367). U-Boot gets there first:
stdio_add_devices()probes every keyboard,apple_mtp_kbd's probe boots the RTKit helper, and since only the J713 andJ614s have a live handoff,
rtkit_helper_stop()takes the firmware to QUIESCED and clears the run bit at OS entry. Thefirmware does not survive a second start. (
start_keyboard = falseinboard_late_init()would not help here either:it only skips
mtpkbd start, the stdio probe has already run.)The firmware's mailbox history in the Linux crash log shows both sessions:
0x103d7530000, U-Boot's heap), AP power 0x20, the 13 syslog lines from "MTP Says Hello" on, oslog0x3ffffffc000), IOReport, syslog init, oslog, then the crash (data abort, PC0x1037c6c, before the first syslog line)This is the J604's version of what #37 describes for the T8140: a firmware that has run cannot be started again, and one
nobody ran starts fine.
This PR adds the J604 to the boards whose keyboard probe returns
-ENODEV, next to the J813. The helper is then neverprobed. The cost is that U-Boot and GRUB have no internal keyboard on the J604; the default entry boots by
itself. A live handoff like the J713's would keep the keyboard, and I'm happy to
test one on the J604 if you prefer that direction.
Testing
J604 (Mac16,1), 26.6.2 stub, aura 1.0.0b8 Stage 1, installed with installer alpha.19. Stage 2 = aura main + #137 + #139
integration/aurora+ #1367 + #1389.mtpkbd startskipped for the J604 in
board_late_init().Hello" (AppleMTPFirmwareMac-5340.61.4); "Apple MTP keyboard" and "Apple MTP multi-touch" register, and I logged in
with the internal keyboard both times. An earlier build with the same effect (helper refused at bind) gave the same
result on 1 boot.
apple_m1_defconfigbuilds without warnings (GCC, aarch64);test_apple_helper_handoff.pyandtest_apple_mtp_keyboard.pypass (9 tests).I can only test the J604. The J715 is not in the J713's handoff either and may behave the same; I left it alone.
Assisted-by: LLM