Stop adjusting my microphone!

How to prevent applications from secretly adjusting the gain (input volume) of your microphone while you’re in a voice call.

General solutions

The only general solution I’m aware of is for WirePlumber (the PipeWire session manager used in recent Linux distributions). I’ll update this page if I become aware of general solutions for any other environments.

WirePlumber

On a Linux system using WirePlumber, it’s possible to prevent arbitrary applications from adjusting levels by writing access rules:

~/.config/wireplumber/wireplumber.conf.d/90-prevent-adjusting.conf
access.rules = [
  {
    matches = [
      {
        application.process.binary = "electron"
      }
    ]
    actions = {
      update-props = {
        default_permissions = "rx"
      }
    }
  }
]

You can find the relevant binary name by running wpctl status | less, looking at the list of clients, and examining clients with wpctl inspect ID | less. You can also match on application.name or (presumably) other properties that the inspect command shows. Based on brief testing, it seems that a rule will be applied if any { … } section within **matches** is a match for the client, and I’m guessing that writing multiple conditions within one { … } section means that all of the conditions need to match. But this is all conjecture; I haven’t found any documentation about how the matching works. If you are aware of any documentation, please let me know.

Application-specific solutions

Google Chrome (and other Chromium-based browsers)

Chrome has a flag that can be used to disable this behavior: In a new tab, paste chrome://flags/#enable-webrtc-allow-input-volume-adjustment into the address bar. This should bring you to the flag titled “Allow WebRTC to adjust the input volume.” Use the drop-down to set it to Disabled.

This flag exists at time of writing, but if you’re reading this in the future and the flag has been removed, please let me know.

Discord

In Discord, open User Settings (gear icon), click on the Voice & Video tab, and scroll down to find the Automatic Gain Control setting. Turn this setting off.