Skip to content

Instantly share code, notes, and snippets.

View GeeLeonidas's full-sized avatar
🧐
reading another tech article

Guilherme Leoi GeeLeonidas

🧐
reading another tech article
  • UFABC - Campus Santo André
  • Santo André - SP, Brazil
  • 09:07 (UTC -03:00)
View GitHub Profile
@GeeLeonidas
GeeLeonidas / disable-agc-pipewire.sh
Last active February 6, 2024 08:19
Globally disables Auto Gain Control on PipeWire-based systems
#!/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)