Linux on Apple Silicon: USB-C to Lightning cable never reaches Pongo; USB-A cable needs two timed replugs

Aperta
#190 9 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
66/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
linux, python

Direzione di ricerca

Start by reading the host requirements and device bring-up documentation, then inspect the PortReset flow in apple/replug.py and the wait after checkm8. The report describes a reproducible J81 setup on Asahi Linux and offers to test changes. Done means documenting the USB-A cable and two replug timings, with any PortReset change checked on that host.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

On a Linux host on Apple Silicon (Asahi), booting an iPad Air 2 (J81) through checkm8 → Pongo depends on the cable:

  • Apple USB-C to Lightning cable, direct: never reaches Pongo. Every time the iPad drops its USB connection (the checkm8 reset, the Pongo boot), the Mac's Type-C controller reports a detach and Linux tears down the whole xHCI controller. After that, Pongo never shows up on USB, and the iPad boots iOS about 21 s after Booting PongoOS....
  • Apple Lightning to USB-A cable + a passive USB-A to USB-C adapter: works, but needs two physical replugs at the iPad end, each at the right moment.

Software port resets don't replace either replug. A note in the docs, and perhaps a different replug hint, would save other Linux users a lot of failed attempts.

Host

  • MacBook Air M2 (Mac14,2), Asahi (Arch Linux ARM), kernel 7.2.11, xhci_plat_hcd + dwc3_apple.
  • fwupd stopped and apple_mfi_fastcharge blacklisted (both otherwise grab the DFU device).
  • Device: iPad Air 2 Wi-Fi (J81), orchard launch from internal storage (#188), palera1n 2.4, released Pongo v0.3.1.

USB-C to Lightning cable

With this cable, each USB drop of the iPad shows up on the host as a Type-C event, and the controller is rebuilt:

macsmc 23e400000.smc: RTKit: syslog message: aceElec.cpp:1151: Elec: Elec Cause 0x0
xhci-hcd xhci-hcd.3.auto: remove, state 4
xhci-hcd xhci-hcd.3.auto: USB bus 1 deregistered
xhci-hcd xhci-hcd.3.auto: xHCI Host Controller
xhci-hcd xhci-hcd.3.auto: new USB bus registered, assigned bus number 1

This happens about 1.5 s after the Pongo upload too, without anyone touching the cable. Replugging at the iPad end then also rebuilds the controller, and Pongo never enumerated in any of these attempts. I saw this in both USB-C ports. Over the 90 minutes I used this cable there were 26 such events; with the USB-A cable and adapter there were none.

Lightning to USB-A cable with an adapter

Here the controller stays up, and this sequence works reliably:

  1. Replug after Checkmate!. The device does not return in download mode by itself.
  2. Replug about 13–20 s after Booting PongoOS....
    • Replugs at 0–10 s did nothing; Pongo did not appear.
    • Without a replug, or later than about 21 s, the iPad boots iOS.
    • In every successful attempt, PongoOS USB Device enumerated within a second or two of a replug in that window.

The existing hint ("If the Apple logo stays for about 15 seconds, reconnect the cable at the device once") matches step 2, but step 1 is needed too on this host.

Software resets don't help

  • Port reset during the Pongo phase: disabling and re-enabling the hub port (usb1-port1/disable, which apple/replug.py also uses) re-enumerates a connected iPad that is running iOS. During the Pongo phase it produces no USB activity at all: five resets in the 20 s window, nothing.
  • orchard's own PortReset after checkm8: on this host the iPad does not answer addressing for a while: device not accepting address N, error -62, twice, about 6 s each. The 5 s wait between resets is shorter than that, so a reset sometimes lands just as the device enumerates. palera1n then logs FoundDevice: Unable to fetch serial number. Download mode came back in the end, but only after a physical replug.
  • Unbinding dwc3-apple: this left the host without USB until a physical replug.
  • Reprobing the Type-C controller (tps6598x): this brought the host back, but the iPad still needed a replug to enumerate.

Suggestions

  • Docs (host requirements / device bring-up): on Apple Silicon Linux hosts, use a Lightning to USB-A cable with an adapter, not a USB-C to Lightning cable. Replug at the iPad end, after Checkmate! and again about 15 s after Booting PongoOS....
  • The PortReset wait could be longer than the host's address retries (about 13 s), or PortReset could be skipped where it does not help. I can only speak for this one host.

I can test changes on this host and J81.

🤖 Generated with Claude Code

Lingua principale
Python
Stelle
102
Fork
27
Merge medio
10h 43m
PR unite (30g)
293

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OrchardLinux/orchard

Tutte le issue di OrchardLinux/orchard

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.