From c1bf6c46945c811bd7b46c3b7c7d04b6f71cc1ab Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 20 Jan 2026 11:59:12 -0400 Subject: [PATCH] Fix the mic on Asus ROG laptops --- install/config/hardware/fix-asus-rog-mic.sh | 17 +++++++++++++++++ migrations/1768916735.sh | 3 +++ 2 files changed, 20 insertions(+) create mode 100644 install/config/hardware/fix-asus-rog-mic.sh create mode 100644 migrations/1768916735.sh diff --git a/install/config/hardware/fix-asus-rog-mic.sh b/install/config/hardware/fix-asus-rog-mic.sh new file mode 100644 index 00000000..b7391a2c --- /dev/null +++ b/install/config/hardware/fix-asus-rog-mic.sh @@ -0,0 +1,17 @@ +# Fix internal mic gain on ASUS ROG laptops with Realtek ALC285. +# The mic boost is way too high by default, causing clipping. +# Sets levels and stores ALSA state so it persists across reboots. + +if [[ "$(cat /sys/class/dmi/id/sys_vendor 2>/dev/null)" == "ASUSTeK COMPUTER INC." ]] && + grep -q "ROG" /sys/class/dmi/id/product_family 2>/dev/null; then + + for card in /proc/asound/card*/codec*; do + if grep -q "ALC285" "$card" 2>/dev/null; then + cardnum=$(echo "$card" | grep -oP 'card\K\d+') + amixer -c "$cardnum" set 'Internal Mic Boost' 0 >/dev/null 2>&1 || true + amixer -c "$cardnum" set 'Capture' 70% >/dev/null 2>&1 || true + sudo alsactl store "$cardnum" 2>/dev/null || true + break + fi + done +fi diff --git a/migrations/1768916735.sh b/migrations/1768916735.sh new file mode 100644 index 00000000..2cbeea44 --- /dev/null +++ b/migrations/1768916735.sh @@ -0,0 +1,3 @@ +echo "Fix microphone gain on Asus ROG laptops with ALC285 Realtek" + +$OMARCHY_PATH/install/config/hardware/fix-asus-rog-mic.sh