install: split and harden hardware config scripts
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
# This should be removed when Intel fixes the firmware/driver.
|
||||
|
||||
if lspci -nn | grep -qE '\[8086:(e440|272b)\]'; then
|
||||
sudo tee /etc/modprobe.d/iwlwifi-disable-eht.conf <<'EOF'
|
||||
mkdir -p /etc/modprobe.d
|
||||
cat > /etc/modprobe.d/iwlwifi-disable-eht.conf <<'EOF'
|
||||
# Temporary fix Dell XPS 14/16 on Panther lake
|
||||
# Disable WiFi 7 (EHT) on Intel BE200/BE211 — broken RX rate adaptation
|
||||
# Remove this file when fixes land in the iwlwifi EHT data path
|
||||
|
||||
@@ -4,15 +4,15 @@ DROP_IN="/etc/limine-entry-tool.d/intel-panther-lake-fred.conf"
|
||||
DEFAULT_LIMINE="/etc/default/limine"
|
||||
|
||||
if omarchy-hw-intel-ptl; then
|
||||
if [[ ! -f $DROP_IN ]] || ! grep -q 'fred=on' "$DROP_IN"; then
|
||||
sudo mkdir -p /etc/limine-entry-tool.d
|
||||
cat <<EOF | sudo tee "$DROP_IN" >/dev/null
|
||||
if [[ ! -f "$DROP_IN" ]] || ! grep -q 'fred=on' "$DROP_IN"; then
|
||||
mkdir -p /etc/limine-entry-tool.d
|
||||
cat > "$DROP_IN" <<EOF
|
||||
# Intel Panther Lake FRED support
|
||||
KERNEL_CMDLINE[default]+=" fred=on"
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [[ -f $DEFAULT_LIMINE ]] && ! grep -q 'fred=on' "$DEFAULT_LIMINE"; then
|
||||
sudo tee -a "$DEFAULT_LIMINE" < "$DROP_IN" >/dev/null
|
||||
if [[ -f "$DEFAULT_LIMINE" ]] && ! grep -q 'fred=on' "$DEFAULT_LIMINE"; then
|
||||
cat "$DROP_IN" >> "$DEFAULT_LIMINE"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -6,6 +6,6 @@ if omarchy-hw-intel && omarchy-battery-present; then
|
||||
cpu_model=$(grep -m1 "^model\s*:" /proc/cpuinfo 2>/dev/null | cut -d: -f2 | tr -d ' ')
|
||||
if [[ "$cpu_model" =~ ^(151|154|170|172|183|186|189|191|204)$ ]]; then
|
||||
omarchy-pkg-add intel-lpmd
|
||||
sudo systemctl enable intel_lpmd.service
|
||||
systemctl enable intel_lpmd.service
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -5,12 +5,10 @@ if omarchy-hw-match "XPS" && omarchy-hw-intel-ptl; then
|
||||
echo "Detected Dell XPS Panther Lake, installing PTL kernel..."
|
||||
|
||||
omarchy-pkg-add linux-ptl linux-ptl-headers
|
||||
for pkg in linux linux-headers; do
|
||||
sudo pacman -Rdd --noconfirm "$pkg" 2>/dev/null || true
|
||||
done
|
||||
pacman -Rdd --noconfirm linux linux-headers 2>/dev/null || true
|
||||
|
||||
sudo mkdir -p /etc/limine-entry-tool.d
|
||||
cat <<EOF | sudo tee /etc/limine-entry-tool.d/dell-xps-panther-lake.conf >/dev/null
|
||||
mkdir -p /etc/limine-entry-tool.d
|
||||
cat > /etc/limine-entry-tool.d/dell-xps-panther-lake.conf <<'EOF'
|
||||
# Only show Panther Lake kernel in boot menu on Dell XPS Panther Lake
|
||||
BOOT_ORDER="linux-ptl*, *fallback, Snapshots"
|
||||
EOF
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
if omarchy-hw-intel; then
|
||||
# Check if Sandy Bridge or newer (model >= 42). Sandy Bridge: model 42 (mobile), 45 (desktop)
|
||||
cpu_model=$(grep -m1 "^model\s*:" /proc/cpuinfo 2>/dev/null | cut -d: -f2 | tr -d ' ')
|
||||
cpu_model=${cpu_model:-0}
|
||||
if ((cpu_model >= 42)) && omarchy-battery-present; then
|
||||
omarchy-pkg-add thermald
|
||||
sudo systemctl enable thermald
|
||||
systemctl enable thermald.service
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user