Repository navigation
Force SPI PIO on MacBook8,1 so the built-in keyboard works - #9735
jeissonneira wants to merge 5 commits into
Conversation
The installer already loads applespi for this model, but DesignWare DMA on 00:15.0 never completes GSPI transfers, so the keyboard and trackpad time out with -110. Blacklist the builtin dw_dmac_pci initcall so spi-pxa2xx uses PIO, and default sleep to s2idle because deep/S3 wedges the same device until reboot.
|
Independent confirmation on a second MacBook8,1, plus some register-level measurements of why the DMA path is dead — in case they help the review or the upstream quirk. Setup: MacBook8,1 (A1534), Omarchy 4.0.0.alpha, kernel Result after cold boot: What the failure looks like at the register level (driver bound, applespi retrying, read from a small probe module):
Upstream is converging on the same answer: fourdollars' series "spi: pxa2xx: MacBook8,1 quirk, runtime PM, and LPSS S3 resume state fixes" (v14, 2026-07-18) adds the DMI quirk in-kernel. Until that reaches Arch's |
|
I can confirm the fix worked on my Macbook 8,1 ( Macbbok 12-inch 2015) |
|
Confirming on another MacBook8,1 (Omarchy 4.0.4, |
|
Reviewed at What ran, on a disposable Omarchy worker:
Second opinion: Codex Medium reviewed the diff. It found the change proportionate and scoped by exact equality to
It also noted that the PR's own test checks for strings rather than behaviour. The reproduction above covers the behaviour. What it waits on: a confirmation on MacBook8,1 hardware at this exact commit. The confirmations here and on #1954 back the parameter itself. For the fix to count as verified, though, it has to be confirmed at this commit by the account that reported the bug. @jpumfrey, you opened #1954. Could you run this commit's migration on your MacBook8,1? If you still have matthiasjg's parameter in curl -fsSL https://raw.githubusercontent.com/jeissonneira/omarchy/abba2c44f500717fe1e28f9efd7e3873c94c9b73/migrations/1788318101.sh -o /tmp/1788318101.sh
bash -euo pipefail /tmp/1788318101.sh
rebootAfter the reboot, please report whether the built-in keyboard works at the LUKS prompt and after a lid close, along with the output of: cat /proc/cmdline
journalctl -k -b | grep -E 'pxa2xx|applespi'#12685, a draft roll-up of the Intel Mac work, carries this same change with extra handling for customised config. It describes itself as not yet merge-ready. #9880 and #12684 also edit |
|
I confirm that installing Omarchy from scratch with curl -fsSL https://raw.githubusercontent.com/jeissonneira/omarchy/abba2c44f500717fe1e28f9efd7e3873c94c9b73/migrations/1788318101.sh -o /tmp/1788318101.sh
bash -euo pipefail /tmp/1788318101.sh
rebootMakes the trackpad and keyboard work on my Intel MacBook. $ cat /proc/cmdline
journalctl -k -b | grep -E 'pxa2xx|applespi'
cryptdevice=PARTUUID=18bd5c35-ac59-411e-8166-81eb04cd85c2:root root=/dev/mapper/root zswap.enabled=0 rootflags=subvol=@ rw rootfstype=btrfs resume=/dev/mapper/root resume_offset=1972633 systemd.tty.term.console=dumb initramfs_async=0 quiet splash loglevel=0 systemd.show_status=false rd.udev.log_level=0 vt.global_cursor_default=0 initcall_blacklist=dw_pci_driver_init mem_sleep_default=s2idle
Oct 18 18:08:36 potato kernel: pxa2xx_spi_pci 0000:00:15.4: no DMA channels available, using PIO
Oct 18 18:08:36 potato kernel: applespi spi-APP000D:00: Received corrupted packet (crc mismatch)
Oct 18 18:08:36 potato kernel: applespi spi-APP000D:00: modeswitch done. |
|
Checked again at What else was checked: What it waits on: marking a hardware fix as verified takes a confirmation at this commit from the person who reported the bug, @jpumfrey on #1954, or from a maintainer. #1954 is closed now, so that confirmation may never come. Until it does, the call is the maintainer's, with gpakosz's confirmation and the earlier ones in front of them. |
|
Apologies for the delay. Tested abba2c4 on my MacBook8,1 (Omarchy 4.0.6, kernel 7.2.8) with my own workarounds removed. The migration wrote macbook81-spi-pio.conf. The controller now uses PIO with no -110 timeouts, and the built-in keyboard works at LUKS, after login and after s2idle suspend. Confirmed fixed, thanks @jeissonneira! |
|
Checked again at What else was checked: current Why it is not marked verified yet: omabot records a reporter's confirmation only when the comment names the full commit, because a short prefix can be matched by another commit made on purpose. The comment says What it waits on: that reply, or the maintainer, who has the confirmations from @jpumfrey, @gpakosz, @Jackwwg83, @ken3yang and @roydq in front of them. |
|
This is a success story |
limine-mkinitcpio reports a kernel it could not rebuild and still exits 0. The migration then wrote its machine-wide marker, so a boot image still missing the PIO parameter was never rebuilt again and the keyboard stayed dead. Check the rebuild output as quattro's other rebuild migrations do, and fail without the marker so it retries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
quattro's table-driven quirks test records every file the SPI keyboard leaf writes, and the MacBook8,1 row predates the PIO drop-in this branch adds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I pushed three commits to this branch. The head is now What was wrong: The branch also needed current What was checked: on a disposable Omarchy worker, @MahdiBND, thanks for the report. It is one more MacBook8,1 where the PIO parameter fixes the keyboard. The installer's boot entry is in the ISO repository, not here, so that part would be a separate change there. What it waits on: the maintainer. A worker cannot run MacBook8,1 hardware, so this is not labelled verified. Running the migration again on a machine that already has the fix would not run the changed code, so I am not asking anyone to retest. When a rebuild succeeds, the new head does exactly what |
[Medium impact] The PR appears safe to merge; both previous findings are addressed and no new actionable issues were found. SummaryAdds a MacBook8,1-only boot setting to force SPI PIO and default sleep to
No new actionable issues were found in the changes since the previous review. Tests were not run. Reviews (2) · Last reviewed commit: "Drop the MacBook8,1 test file in favour ..." · Reviewed by Greptile |
|
MacBook8,1 (Early 2015 / Core M-5Y31) hardware validation on Omarchy edge,
Integration PoC and implementation for review: https://github.com/geeknees/omarchy/tree/macbook81/poc-2026-11 I intend to submit the S3 LPSS recovery as a separate opt-in change, rather than duplicate this PR's PIO fix. Thanks for your work on the root cause and the minimal PIO workaround. |
AGENTS.md asks for the area's existing test file to be extended rather than a new *-test.sh added, and docs/testing.md gives migrations no suite test. hardware-quirks-test.sh already runs fix-spi-keyboard.sh on MacBook8,1 and expects the PIO drop-in there, and on MacBookPro13,2 and MacBookPro15,1 expects it absent, so the separate file only repeated that and tested the frozen migration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I pushed one commit to this branch. The head is now What changed: Greptile raised two points on What was checked: on a disposable Omarchy worker, Second opinion: Codex Medium and muse-wonder (via pi, thinking high) reviewed the commit. Both agreed that Greptile's points hold and that deleting the file is the proportionate answer. They had seen my reasoning first, so that agreement is not independent. Both also suggested two things I have left alone:
@geeknees, thanks for the MacBook8,1 report. What it waits on: the maintainer. Since @jpumfrey's confirmation at |
Summary
On MacBook8,1 (12-inch Early 2015) the installer already loads
applespiand the PXA SPI modules. That is not enough. The GSPI controller (00:15.4) does transfers through the companion DesignWare DMA engine (00:15.0), and on this board those DMA transfers never complete.applespitimes out with-110, IRQ 21 stays at zero, and the built-in keyboard and trackpad never work. #1954.Force the controller into PIO and it probes immediately.
dw_dmac_pciis builtin, so the switch is a kernel parameter:Deep/S3 then wedges the same SPI device until reboot, so sleep defaults to
s2idle.Same shape as the ASUS Panther Lake backlight leaf: detect the machine, write a Limine drop-in. No new package. No vendored C.
Changes
install/hardware/apple/fix-spi-keyboard.sh— on MacBook8,1 only, write/etc/limine-entry-tool.d/macbook81-spi-pio.conf. Other SPI MacBooks are unchanged.1788318101.shfor existing installs. Idempotent. Rebuilds the UKI. No-ops on anything that is not MacBook8,1.test/shell.d/macbook81-spi-pio-test.shTested
MacBook8,1 (A1534, Early 2015), Core M-5Y31, Omarchy 4.0.2, kernel 7.1.9-arch1-2. Keyboard and trackpad work at LUKS, at the login screen, and after lid close.
The same PIO cmdline is what matthiasjg documented on #1954; the original reporter and two other MacBook8,1s confirmed it.
Speakers, camera, and Bluetooth stay out of this PR.
Fixes #1954