Skip to content

Instantly share code, notes, and snippets.

View GeeLeonidas's full-sized avatar
☁️
head in The Cloud

Guilherme Leoi GeeLeonidas

☁️
head in The Cloud
  • UFABC - Campus Santo André
  • Santo André - SP, Brazil
  • 04:35 (UTC -03:00)
View GitHub Profile
@GeeLeonidas
GeeLeonidas / disable-agc-pipewire.sh
Last active October 26, 2024 21:10
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)