From e018692e5e8d5fc0bc12422073e2ef5d65a5ec8c Mon Sep 17 00:00:00 2001 From: "Joel Gaff, Jr." <89562898+joelgaff@users.noreply.github.com> Date: Sun, 14 Sep 2025 00:47:42 -0700 Subject: [PATCH] Macbook: enable internal keyboard at LUKS (#1313) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- install/config/all.sh | 1 + install/config/hardware/fix-apple-spi-keyboard.sh | 7 +++++++ install/omarchy-other.packages | 1 + 3 files changed, 9 insertions(+) create mode 100644 install/config/hardware/fix-apple-spi-keyboard.sh diff --git a/install/config/all.sh b/install/config/all.sh index 8a44517..4118e40 100644 --- a/install/config/all.sh +++ b/install/config/all.sh @@ -24,3 +24,4 @@ run_logged $OMARCHY_INSTALL/config/hardware/ignore-power-button.sh run_logged $OMARCHY_INSTALL/config/hardware/nvidia.sh run_logged $OMARCHY_INSTALL/config/hardware/fix-f13-amd-audio-input.sh run_logged $OMARCHY_INSTALL/config/hardware/fix-apple-bcm4360.sh +run_logged $OMARCHY_INSTALL/config/hardware/fix-apple-spi-keyboard.sh diff --git a/install/config/hardware/fix-apple-spi-keyboard.sh b/install/config/hardware/fix-apple-spi-keyboard.sh new file mode 100644 index 0000000..f549669 --- /dev/null +++ b/install/config/hardware/fix-apple-spi-keyboard.sh @@ -0,0 +1,7 @@ +# 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 diff --git a/install/omarchy-other.packages b/install/omarchy-other.packages index a648453..d858a96 100644 --- a/install/omarchy-other.packages +++ b/install/omarchy-other.packages @@ -26,6 +26,7 @@ limine-snapper-sync linux linux-firmware linux-headers +macbook12-spi-driver-dkms nvidia-dkms nvidia-open-dkms nvidia-utils