Files
omarchy/install/config/hardware/fix-apple-spi-keyboard.sh
Joel Gaff, Jr. e018692e5e Macbook: enable internal keyboard at LUKS (#1313)
* macbook: enable internal keyboard at LUKS by loading applespi in initramfs

- Detect T1 models (MacBookPro13,2/13,3 and 14,2/14,3)
- Add mkinitcpio drop-in: MODULES+=(applespi intel_lpss_pci spi_pxa2xx_platform)
- Add HOOKS+=(keyboard) for early input
- Prefer in-kernel applespi; fallback to DKMS via AUR helper if needed

* macbook: expand SPI keyboard support to include 12-inch MacBook

- Add support for MacBook12,1 (12-inch MacBook 2015-2017) with SPI keyboards
- Rename configuration from T1-specific to SPI-keyboard-specific terminology
- Update mkinitcpio drop-in filename: omarchy-macbook-t1.conf -> omarchy-macbook-spi.conf
- Clarify that this fix targets SPI keyboard interface, not just T1 chip models
- Improved detection: covers all models with SPI keyboards needing applespi
- Update comments and messages to reflect broader hardware support scope

* Integrate MacBook SPI keyboard detection into limine-snapper.sh

- Move MacBook detection from separate hardware script into limine-snapper.sh
- Add comprehensive error handling with systemd journal logging
- Ensure persistent MacBook SPI module loading for every boot
- Remove redundant separate macbook-keyboard.sh file
- Consolidate terminal and log output using tee with process substitution

* Add support for MacbookPro13,1 and 14,1 models

* change log tags

from “omarchy” to “macbook” which is more appropriate.

* Slim down and rearrange code

* Unrelated change

* More specific naming and make sure its actually run

---------

Co-authored-by: Ryan Hughes <1630358+ryanrhughes@users.noreply.github.com>
Co-authored-by: David Heinemeier Hansson <david@hey.com>
2025-09-14 09:47:42 +02:00

8 lines
420 B
Bash

# Detect MacBook models that need SPI keyboard modules
if [[ "$(cat /sys/class/dmi/id/product_name 2>/dev/null)" =~ MacBook12,1|MacBookPro13,[123]|MacBookPro14,[123] ]]; then
echo "Detected MacBook with SPI keyboard"
sudo pacman -S --noconfirm --needed macbook12-spi-driver-dkms
echo "MODULES=(applespi intel_lpss_pci spi_pxa2xx_platform)" | sudo tee /etc/mkinitcpio.conf.d/macbook_spi_modules.conf >/dev/null
fi