mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
First swing at t2 support
This commit is contained in:
41
install/config/hardware/fix-apple-t2.sh
Normal file
41
install/config/hardware/fix-apple-t2.sh
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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"
|
||||
|
||||
echo "Installing T2 support packages..."
|
||||
sudo pacman -S --noconfirm --needed \
|
||||
linux-t2 \
|
||||
linux-t2-headers \
|
||||
apple-t2-audio-config \
|
||||
apple-bcm-firmware \
|
||||
t2fanrd \
|
||||
tiny-dfr
|
||||
|
||||
echo "Configuring apple-bce module..."
|
||||
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
|
||||
|
||||
# Configure Broadcom WiFi with disabled offloading features (fixes connectivity issues)
|
||||
cat <<EOF | sudo tee /etc/modprobe.d/brcmfmac.conf >/dev/null
|
||||
# Fix for T2 MacBook WiFi connectivity issues
|
||||
options brcmfmac feature_disable=0x82000
|
||||
EOF
|
||||
|
||||
echo "Adding T2 kernel parameters to Limine"
|
||||
sudo mkdir -p /etc/limine-entry-tool.d
|
||||
cat <<EOF | sudo tee /etc/limine-entry-tool.d/t2-mac.conf >/dev/null
|
||||
# Generated by Omarchy installer for T2 Mac support
|
||||
KERNEL_CMDLINE[default]+="intel_iommu=on iommu=pt pcie_ports=compat"
|
||||
EOF
|
||||
|
||||
echo "Enabling T2 fan control daemon..."
|
||||
sudo systemctl enable t2fanrd.service
|
||||
|
||||
echo "Enabling Touch Bar support..."
|
||||
sudo systemctl enable tiny-dfr.service
|
||||
fi
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
# 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
|
||||
echo "Adding T2 MacBook repository to pacman.conf..."
|
||||
cat <<EOF | sudo tee -a /etc/pacman.conf >/dev/null
|
||||
|
||||
[arch-mact2]
|
||||
Server = https://mirror.omarchy.org/\$repo/\$arch
|
||||
SigLevel = Never
|
||||
EOF
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user