Fix the mic on Asus ROG laptops

This commit is contained in:
David Heinemeier Hansson
2026-01-20 11:59:12 -04:00
parent 66daacb30d
commit c1bf6c4694
2 changed files with 20 additions and 0 deletions

View File

@@ -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

3
migrations/1768916735.sh Normal file
View File

@@ -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