Skip to content

input: apple_mtp_kbd: Leave the J704 MTP to Linux - #66

Closed
term-guy wants to merge 1 commit into
aurora-silicon:aurora-wipfrom
term-guy:j704-mtp-untouched
Closed

term-guy wants to merge 1 commit into
aurora-silicon:aurora-wipfrom
term-guy:j704-mtp-untouched

Conversation

@term-guy

Copy link
Copy Markdown

The J704 (MacBook Pro 14-inch, M5) has the J813's problem: once U-Boot touches its MTP, Linux finds the coprocessor crashed and there is no internal keyboard or trackpad. Probing the keyboard binds the MTP helper, and the helper's DART probe clears every TCR/TTBR under the MTP that iBoot left running; the MTP takes a data abort (same PC every boot), and Linux logs the RTKit crash dump, then Failed to wake up coprocessor and 394b30000.input: deferred probe pending. On an encrypted Fedora install the disk password prompt then cannot be typed at all.

This adds apple,j704 next to apple,j813 and apple,j604 in apple_mtp_kbd_probe(), so U-Boot has no MTP keyboard on the J704 and the MTP stays as iBoot left it. The J815 (15-inch M5 Air) shares the SoC and probably needs the same; I can't test it.

Testing (J704, macOS 27.0 stub firmware, aura -> U-Boot 2026.07 -> GRUB -> Fedora KDE on the SSD): the same effect made in the U-Boot of the fedora-kde payload (its MTP helper and DockChannel HID matches disabled) gives a working internal keyboard at the LUKS prompt and in the desktop on every boot; before, every boot had the crash dump. This patch itself on aurora-wip (apple_m1_defconfig), as the ESP Stage 2 payload after aura: U-Boot 2026.07-g37baf8f7 finds the SSD, boots GRUB and Fedora, the internal keyboard comes up at 1.6 s and the password is typed at the LUKS prompt; no MTP crash dump.

AI-assisted (Assisted-by: LLM), reviewed and tested by me on the hardware.

The J704 (MacBook Pro 14-inch, M5) cannot restart its MTP either once
U-Boot has touched it. Probing the keyboard binds the MTP helper, whose
DART probe clears every TCR and TTBR under the MTP that iBoot left
running; the coprocessor then takes a data abort, and Linux finds it
crashed ("Failed to wake up coprocessor") with no internal keyboard or
trackpad. With an encrypted root the disk password cannot be typed.

Treat the J704 like the J813, which shares its T8142 SoC: no keyboard
in U-Boot, and the MTP stays as iBoot left it.

Tested on J704 (macOS 27.0 stub firmware, aura -> U-Boot 2026.07 ->
GRUB -> Fedora) with the equivalent change made to the U-Boot of the
Aurora fedora-kde payload (its MTP helper and DockChannel HID matches
disabled): the internal keyboard works at the LUKS password prompt and
in the desktop, where every boot before showed the MTP crash dump.
This patch itself builds (apple_m1_defconfig) and still needs a boot
on the J704.

Assisted-by: LLM
Signed-off-by: termg <[email protected]>
@term-guy

Copy link
Copy Markdown
Author

Control run on the J704: the same aurora-wip U-Boot (37baf8f) without this change, as the ESP Stage 2 payload after aura, leaves no keyboard at the LUKS prompt; the initramfs log shows rtkit-helper 394600000.mtp: RTKit: co-processor has crashed, Failed to wake up coprocessor and 394b30000.input: deferred probe pending. With this change the keyboard works at the prompt.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for tracking this down, and for the clear before/after on the J704: the crash dump and the dead keyboard at the LUKS prompt make the failure unambiguous.

We'd rather not grow the board list in apple_mtp_kbd_probe(), though. The J704's MTP node is apple,t8142-mtp, the same block as the J813 and J815, and #55 already chooses the handoff from that compatible: every apple,t8142-mtp is left to the OS, rtkit_helper_bind() refuses the helper, so neither the helper nor its DART is probed, and the per-board list in the keyboard probe goes away. That covers the J704 (and the J815 from #51) without naming either board.

So this PR would be superseded by #55. The most useful thing would be your J704 run on #55's head: one-shot U-Boot, then in Linux no RTKit crash dump, the internal keyboard registered, and the password typed at the LUKS prompt. If you can post that on #55, it is the J704 row that PR needs, and this one can be closed in its favour.

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.

2 participants