From fb6cc648f382171388f374c0d364cc037cdfa076 Mon Sep 17 00:00:00 2001 From: Josh Hudson <313875020+hudsonwa@users.noreply.github.com> Date: Thu, 3 Sep 2026 03:30:26 +0800 Subject: [PATCH 1/5] Stop installing the obsolete SPI keyboard DKMS package 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. --- install/hardware/apple/fix-spi-keyboard.sh | 6 ++- test/shell.d/spi-keyboard-test.sh | 61 ++++++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100755 test/shell.d/spi-keyboard-test.sh diff --git a/install/hardware/apple/fix-spi-keyboard.sh b/install/hardware/apple/fix-spi-keyboard.sh index 330081b76318..19e5254224bd 100644 --- a/install/hardware/apple/fix-spi-keyboard.sh +++ b/install/hardware/apple/fix-spi-keyboard.sh @@ -3,7 +3,11 @@ product_name="$(cat /sys/class/dmi/id/product_name 2>/dev/null)" if [[ $product_name =~ MacBook[89],1|MacBook1[02],1|MacBookPro13,[123]|MacBookPro14,[123] ]]; then echo "Detected MacBook with SPI keyboard" - omarchy-pkg-add macbook12-spi-driver-dkms + # macbook12-spi-driver-dkms is obsolete: applespi is mainlined (it ships in + # the linux package, and its header that the out-of-tree copy needs was + # removed in 6.12), so the DKMS build fails on every kernel update once + # linux-headers is present. Only the initramfs drop-in below is needed to + # get the in-tree module into the initramfs (load-bearing for LUKS roots). sudo mkdir -p /etc/mkinitcpio.conf.d if [[ $product_name == "MacBook8,1" ]]; then echo "MODULES=(applespi spi_pxa2xx_platform spi_pxa2xx_pci)" | \ diff --git a/test/shell.d/spi-keyboard-test.sh b/test/shell.d/spi-keyboard-test.sh new file mode 100755 index 000000000000..789a37db1beb --- /dev/null +++ b/test/shell.d/spi-keyboard-test.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +set -euo pipefail + +source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh" + +tmp_dir=$(mktemp -d) +trap 'rm -rf "$tmp_dir"' EXIT + +# The leaf reads /sys/class/dmi/id/product_name and writes under +# /etc/mkinitcpio.conf.d, so a sandboxed copy with those paths rewritten is +# used, like the other install/hardware tests. +leaf="$tmp_dir/leaf.sh" +sed -e "s|/sys/class/dmi/id/product_name|$tmp_dir/product_name|g" \ + -e "s|/etc/mkinitcpio.conf.d|$tmp_dir/mkinitcpio.conf.d|g" \ + "$ROOT/install/hardware/apple/fix-spi-keyboard.sh" >"$leaf" +chmod +x "$leaf" + +mkdir -p "$tmp_dir/bin" +cat >"$tmp_dir/bin/omarchy-pkg-add" <<'EOF' +#!/bin/bash +printf '%s\n' "$*" >>"$PKG_ADD_LOG" +EOF +cat >"$tmp_dir/bin/sudo" <<'EOF' +#!/bin/bash +exec "$@" +EOF +chmod +x "$tmp_dir/bin"/* + +run_leaf() { + printf '%s\n' "$1" >"$tmp_dir/product_name" + : >"$tmp_dir/pkg-add.log" + PKG_ADD_LOG="$tmp_dir/pkg-add.log" \ + PATH="$tmp_dir/bin:$PATH" \ + bash "$leaf" +} + +# A matched MacBook: the initramfs drop-in has to keep the SPI modules (this +# is what makes the keyboard work at the LUKS prompt), but the DKMS package is +# obsolete — applespi is in-tree and the out-of-tree copy cannot build on +# modern kernels — so it must not be installed anymore. +run_leaf "MacBookPro14,1" +[[ -s $tmp_dir/pkg-add.log ]] && + fail "a matched MacBook no longer installs the obsolete DKMS package" \ + "$(cat "$tmp_dir/pkg-add.log")" +grep -q '^MODULES=(applespi intel_lpss_pci spi_pxa2xx_platform)$' \ + "$tmp_dir/mkinitcpio.conf.d/macbook_spi_modules.conf" || + fail "the SPI initramfs drop-in is still written" \ + "$(cat "$tmp_dir/mkinitcpio.conf.d/macbook_spi_modules.conf" 2>/dev/null || echo missing)" +pass "matched MacBook keeps the initramfs drop-in and skips the DKMS package" + +# An unmatched machine must be left completely alone. +rm -rf "$tmp_dir/mkinitcpio.conf.d" +run_leaf "MacBookPro15,2" +[[ -s $tmp_dir/pkg-add.log ]] && + fail "an unmatched machine does not install the DKMS package" +[[ -e $tmp_dir/mkinitcpio.conf.d ]] && + fail "an unmatched machine does not write the drop-in" +pass "unmatched hardware is untouched" + +pass "SPI keyboard detection writes only the needed initramfs drop-in" From 9605c7a134aab0f27ebcfc55b4782d185cdfe09d Mon Sep 17 00:00:00 2001 From: omarchybot Date: Thu, 3 Sep 2026 05:26:44 -0700 Subject: [PATCH 2/5] Stop caching the obsolete DKMS package in the ISO install/omarchy-other.packages exists so the ISO holds the packages install scripts reach for. Nothing reaches for this one now, so the entry only pins an AUR package that cannot build, the way the T2 change dropped tiny-dfr. Co-Authored-By: Claude Opus 5 (1M context) --- install/omarchy-other.packages | 1 - test/shell.d/spi-keyboard-test.sh | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/install/omarchy-other.packages b/install/omarchy-other.packages index e5d56d566fe8..b78d9ad6c4ed 100644 --- a/install/omarchy-other.packages +++ b/install/omarchy-other.packages @@ -25,7 +25,6 @@ linux-firmware linux-headers linux-ptl linux-ptl-headers -macbook12-spi-driver-dkms nvidia-580xx-dkms nvidia-dkms nvidia-open-dkms diff --git a/test/shell.d/spi-keyboard-test.sh b/test/shell.d/spi-keyboard-test.sh index 789a37db1beb..766427c34019 100755 --- a/test/shell.d/spi-keyboard-test.sh +++ b/test/shell.d/spi-keyboard-test.sh @@ -58,4 +58,9 @@ run_leaf "MacBookPro15,2" fail "an unmatched machine does not write the drop-in" pass "unmatched hardware is untouched" +# Nothing installs the package now, so the ISO has no reason to cache it. +! grep -qx 'macbook12-spi-driver-dkms' "$ROOT/install/omarchy-other.packages" || + fail "the ISO no longer caches macbook12-spi-driver-dkms" +pass "the obsolete DKMS package is gone from the ISO package cache list" + pass "SPI keyboard detection writes only the needed initramfs drop-in" From 2d49be5e65c514f029ba3a99b8ebaf9ec5da0147 Mon Sep 17 00:00:00 2001 From: Josh Hudson <313875020+hudsonwa@users.noreply.github.com> Date: Thu, 3 Sep 2026 23:34:43 +0800 Subject: [PATCH 3/5] Drop the obsolete SPI keyboard DKMS package from installed machines fix-spi-keyboard.sh no longer installs it and the ISO no longer caches it, but every MacBook that ran the old installer still carries a package whose build fails on every kernel update once linux-headers is present. The migration removes it idempotently, as the tiny-dfr migration does. --- migrations/1788476400.sh | 12 ++++++++++++ test/shell.d/spi-keyboard-test.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 migrations/1788476400.sh diff --git a/migrations/1788476400.sh b/migrations/1788476400.sh new file mode 100644 index 000000000000..77dc0f0799f8 --- /dev/null +++ b/migrations/1788476400.sh @@ -0,0 +1,12 @@ +echo "Remove the obsolete MacBook SPI keyboard DKMS package" + +# applespi is mainlined (it ships with the linux package), so the out-of-tree +# driver cannot build on current kernels: its include was removed in kernel +# 6.12 and the DKMS build fails on every kernel update once linux-headers is +# present. The initramfs drop-in written by +# install/hardware/apple/fix-spi-keyboard.sh loads the in-tree module instead, +# so the package is pure failure surface. Idempotent: nothing happens when the +# package is not installed. +if omarchy-pkg-present macbook12-spi-driver-dkms; then + omarchy-pkg-drop macbook12-spi-driver-dkms +fi diff --git a/test/shell.d/spi-keyboard-test.sh b/test/shell.d/spi-keyboard-test.sh index 766427c34019..750aff120ebf 100755 --- a/test/shell.d/spi-keyboard-test.sh +++ b/test/shell.d/spi-keyboard-test.sh @@ -63,4 +63,34 @@ pass "unmatched hardware is untouched" fail "the ISO no longer caches macbook12-spi-driver-dkms" pass "the obsolete DKMS package is gone from the ISO package cache list" +# The install script no longer adds the package, but machines that ran the +# old installer still carry one that fails to build on every kernel update +# once linux-headers is present. The migration drops it idempotently, +# following the tiny-dfr precedent. +cat >"$tmp_dir/bin/omarchy-pkg-present" <<'EOF' +#!/bin/bash +[[ -e $PKG_STATE ]] && [[ ${1:-} == macbook12-spi-driver-dkms ]] +EOF +cat >"$tmp_dir/bin/omarchy-pkg-drop" <<'EOF' +#!/bin/bash +printf '%s\n' "$*" >>"$PKG_DROP_LOG" +rm -f "$PKG_STATE" +EOF +chmod +x "$tmp_dir/bin/omarchy-pkg-present" "$tmp_dir/bin/omarchy-pkg-drop" + +migration="$ROOT/migrations/1788476400.sh" +: >"$tmp_dir/pkg.installed" +: >"$tmp_dir/pkg-drop.log" +PKG_STATE="$tmp_dir/pkg.installed" PKG_DROP_LOG="$tmp_dir/pkg-drop.log" \ + PATH="$tmp_dir/bin:$PATH" HOME="$tmp_dir" bash "$migration" +grep -qx macbook12-spi-driver-dkms "$tmp_dir/pkg-drop.log" || + fail "the migration drops the obsolete DKMS package" \ + "$(cat "$tmp_dir/pkg-drop.log")" +drops_before=$(wc -l <"$tmp_dir/pkg-drop.log") +PKG_STATE="$tmp_dir/pkg.installed" PKG_DROP_LOG="$tmp_dir/pkg-drop.log" \ + PATH="$tmp_dir/bin:$PATH" HOME="$tmp_dir" bash "$migration" +(( $(wc -l <"$tmp_dir/pkg-drop.log") == drops_before )) || + fail "the migration only drops the package once" "$(cat "$tmp_dir/pkg-drop.log")" +pass "installed machines get the obsolete DKMS package removed once" + pass "SPI keyboard detection writes only the needed initramfs drop-in" From 724ab2dbfb7e97de388d072ee7744ca702676ccf Mon Sep 17 00:00:00 2001 From: Omarchybot <317366263+omarchybot@users.noreply.github.com> Date: Fri, 2 Oct 2026 02:57:58 +0200 Subject: [PATCH 4/5] Say applespi ships with the kernel, not the linux package quattro's default kernel is now linux-omarchy, which carries applespi as a module (CONFIG_KEYBOARD_APPLESPI=m), so naming the linux package was no longer true of most machines. Co-Authored-By: Claude Opus 5.5 --- install/hardware/apple/fix-spi-keyboard.sh | 2 +- migrations/1788476400.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install/hardware/apple/fix-spi-keyboard.sh b/install/hardware/apple/fix-spi-keyboard.sh index 19e5254224bd..0fb5d8d226eb 100644 --- a/install/hardware/apple/fix-spi-keyboard.sh +++ b/install/hardware/apple/fix-spi-keyboard.sh @@ -4,7 +4,7 @@ if [[ $product_name =~ MacBook[89],1|MacBook1[02],1|MacBookPro13,[123]|MacBookPr echo "Detected MacBook with SPI keyboard" # macbook12-spi-driver-dkms is obsolete: applespi is mainlined (it ships in - # the linux package, and its header that the out-of-tree copy needs was + # the kernel package, and its header that the out-of-tree copy needs was # removed in 6.12), so the DKMS build fails on every kernel update once # linux-headers is present. Only the initramfs drop-in below is needed to # get the in-tree module into the initramfs (load-bearing for LUKS roots). diff --git a/migrations/1788476400.sh b/migrations/1788476400.sh index 77dc0f0799f8..1d46c068404d 100644 --- a/migrations/1788476400.sh +++ b/migrations/1788476400.sh @@ -1,6 +1,6 @@ echo "Remove the obsolete MacBook SPI keyboard DKMS package" -# applespi is mainlined (it ships with the linux package), so the out-of-tree +# applespi is mainlined (it ships with the kernel package), so the out-of-tree # driver cannot build on current kernels: its include was removed in kernel # 6.12 and the DKMS build fails on every kernel update once linux-headers is # present. The initramfs drop-in written by From 2b324b8ad273ccec552e52b2a3432581131d2be6 Mon Sep 17 00:00:00 2001 From: Omarchybot <317366263+omarchybot@users.noreply.github.com> Date: Sun, 1 Nov 2026 02:48:00 +0100 Subject: [PATCH 5/5] Drop the redundant presence check from the DKMS removal migration omarchy-pkg-drop already ignores packages that are not installed, and AGENTS.md asks for the drop helper alone where it suffices. Co-Authored-By: Claude Opus 5.5 --- migrations/1788476400.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/migrations/1788476400.sh b/migrations/1788476400.sh index 1d46c068404d..3886647894e3 100644 --- a/migrations/1788476400.sh +++ b/migrations/1788476400.sh @@ -5,8 +5,5 @@ echo "Remove the obsolete MacBook SPI keyboard DKMS package" # 6.12 and the DKMS build fails on every kernel update once linux-headers is # present. The initramfs drop-in written by # install/hardware/apple/fix-spi-keyboard.sh loads the in-tree module instead, -# so the package is pure failure surface. Idempotent: nothing happens when the -# package is not installed. -if omarchy-pkg-present macbook12-spi-driver-dkms; then - omarchy-pkg-drop macbook12-spi-driver-dkms -fi +# so the package is pure failure surface. +omarchy-pkg-drop macbook12-spi-driver-dkms