Skip to content

Stop installing the obsolete SPI keyboard DKMS package - #9880

Open
hudsonwa wants to merge 1 commit into
omacom:quattrofrom
hudsonwa:fix/9831-spi-keyboard-dkms
Open

Stop installing the obsolete SPI keyboard DKMS package#9880
hudsonwa wants to merge 1 commit into
omacom:quattrofrom
hudsonwa:fix/9831-spi-keyboard-dkms

Conversation

@hudsonwa

@hudsonwa hudsonwa commented Sep 2, 2026

Copy link
Copy Markdown

Fixes #9831

What broke

install/hardware/apple/fix-spi-keyboard.sh installs macbook12-spi-driver-dkms on every MacBook it matches. That package is obsolete: applespi is mainlined (it ships in the linux package), and the out-of-tree copy includes asm/unaligned.h, which was removed in kernel 6.12. The DKMS build therefore fails on every kernel update once linux-headers is present (reproduced in the issue with the full build log). The failure is currently invisible on stock installs only because Arch's DKMS hook finds no usr/lib/modules/*/build without headers; issue #8285 proposes installing linux-headers, which would surface this failed build on every matched MacBook.

The keyboard itself is unaffected: the script also writes /etc/mkinitcpio.conf.d/macbook_spi_modules.conf, which loads the in-tree applespi module into the initramfs. That half is load-bearing (LUKS passphrase entry), and the issue verifies removing only the package leaves the keyboard and touchpad working.

Fix

Drop the omarchy-pkg-add macbook12-spi-driver-dkms line and keep everything else, with a comment recording why the package no longer belongs. The initramfs drop-in is unchanged, so initramfs behavior is identical.

Why install/hardware

This is an install-time hardware leaf run via run_logged from install/hardware/all.sh. The package install belongs there (or nowhere), and the drop-in must stay there, so the fix is confined to the one file.

Tests

New test/shell.d/spi-keyboard-test.sh runs a sandboxed copy of the leaf (DMI path and mkinitcpio dir rewritten, stubbed omarchy-pkg-add/sudo):

  • Matched MacBook (MacBookPro14,1): the DKMS package is NOT requested, and the initramfs drop-in is still written with the SPI modules.
  • Unmatched machine (MacBookPro15,2): nothing happens at all.

All pass here; the test fails against the pre-fix leaf (RED to GREEN). Honest host note: this machine cannot run a real pre-T2 MacBook, so the model regex is covered by the sandbox rather than hardware; the match set itself is unchanged.

Not included

A migration that removes the package from already-installed machines was left out deliberately (machine-wide package removal is the maintainers' call; the script fix prevents new installs). Happy to add one if wanted. This also removes the regression #8285 would have surfaced.

applespi is mainlined, so macbook12-spi-driver-dkms cannot build on modern
kernels (its include was removed in 6.12) and its build fails on every
kernel update once linux-headers is present. The in-tree module is what the
initramfs drop-in loads, so only that needs to stay.
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.

fix-spi-keyboard.sh installs macbook12-spi-driver-dkms, which cannot build on kernels shipping applespi in-tree

1 participant