From 772a75376e0884ee2d0853271636f0c46b7262e6 Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Sun, 14 Sep 2025 13:49:43 -0400 Subject: [PATCH] Add T2 MacBook support (#1657) * First swing at t2 support * Remove unnecessary enables * Trim up * Trim * Need to use official mirror until we have our own setup * Use GitHub mirror for now --------- Co-authored-by: David Heinemeier Hansson --- install/config/all.sh | 1 + install/config/hardware/fix-apple-t2.sh | 28 +++++++++++++++++++++++++ install/omarchy-other.packages | 8 +++++++ install/post-install/pacman.sh | 9 ++++++++ 4 files changed, 46 insertions(+) create mode 100644 install/config/hardware/fix-apple-t2.sh diff --git a/install/config/all.sh b/install/config/all.sh index fc84fb4..9c8b448 100644 --- a/install/config/all.sh +++ b/install/config/all.sh @@ -26,3 +26,4 @@ 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 +run_logged $OMARCHY_INSTALL/config/hardware/fix-apple-t2.sh diff --git a/install/config/hardware/fix-apple-t2.sh b/install/config/hardware/fix-apple-t2.sh new file mode 100644 index 0000000..51273f2 --- /dev/null +++ b/install/config/hardware/fix-apple-t2.sh @@ -0,0 +1,28 @@ +# Detect T2 MacBook models using PCI IDs +# Vendor: 106b (Apple), Device IDs: 1801 or 1802 (T2 Security Chip) +if lspci -nn | grep -q "106b:180[12]"; then + echo "Detected MacBook with T2 chip. Installing support items..." + + sudo pacman -S --noconfirm --needed \ + linux-t2 \ + linux-t2-headers \ + apple-t2-audio-config \ + apple-bcm-firmware \ + t2fanrd \ + tiny-dfr + + echo "apple-bce" | sudo tee /etc/modules-load.d/t2.conf >/dev/null + + echo "MODULES+=(apple-bce usbhid hid_apple hid_generic xhci_pci xhci_hcd)" | sudo tee /etc/mkinitcpio.conf.d/apple-t2.conf >/dev/null + + cat </dev/null +# Fix for T2 MacBook WiFi connectivity issues +options brcmfmac feature_disable=0x82000 +EOF + + sudo mkdir -p /etc/limine-entry-tool.d + cat </dev/null +# Generated by Omarchy installer for T2 Mac support +KERNEL_CMDLINE[default]+="intel_iommu=on iommu=pt pcie_ports=compat" +EOF +fi diff --git a/install/omarchy-other.packages b/install/omarchy-other.packages index d858a96..1ece3ca 100644 --- a/install/omarchy-other.packages +++ b/install/omarchy-other.packages @@ -43,3 +43,11 @@ webp-pixbuf-loader wget yay-debug zram-generator + +# T2 MacBook support packages +apple-bcm-firmware +apple-t2-audio-config +linux-t2 +linux-t2-headers +t2fanrd +tiny-dfr diff --git a/install/post-install/pacman.sh b/install/post-install/pacman.sh index 574c420..c91a2c9 100644 --- a/install/post-install/pacman.sh +++ b/install/post-install/pacman.sh @@ -1,3 +1,12 @@ # Configure pacman sudo cp -f ~/.local/share/omarchy/default/pacman/pacman.conf /etc/pacman.conf sudo cp -f ~/.local/share/omarchy/default/pacman/mirrorlist /etc/pacman.d/mirrorlist + +if lspci -nn | grep -q "106b:180[12]"; then + cat </dev/null + +[arch-mact2] +Server = https://github.com/NoaHimesaka1873/arch-mact2-mirror/releases/download/release +SigLevel = Never +EOF +fi