Last active
October 26, 2024 21:10
-
-
Save GeeLeonidas/48c839e1c7d839c294277715af9e79f1 to your computer and use it in GitHub Desktop.
Globally disables Auto Gain Control on PipeWire-based systems
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Backups the previous configuration (optional if you take system snapshots regularly) | |
BACKUP_PATH="/usr/share/alsa-card-profile/mixer/paths_backup" | |
[ ! -d $BACKUP_PATH ] && sudo cp -vR /usr/share/alsa-card-profile/mixer/paths $BACKUP_PATH | |
# The actual Perl script that disables AGC | |
sudo perl -pi -0 -e 's/(\[[A-Za-z ]*Mic Boost\][A-Za-z._=\s-]+volume *= *)merge/\1zero/g;' /usr/share/alsa-card-profile/mixer/paths/* | |
# Shows the changes made to the system (optional) | |
diff -r -C 5 $BACKUP_PATH /usr/share/alsa-card-profile/mixer/paths |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment