Prevent applications from changing microphone gain

j.ace.svg

New Member
Joined
Aug 20, 2022
Messages
1
Reaction score
0
Credits
16
I use discord but when I switch my input device it automatically adjusts my device gain settings. I have automatic gain adjustment disabled, but like I've seen in other posts elsewhere it doesn't seem to matter. I've found this askubuntu post which covers how to prevent applications from automatically adjusting gain altogether - which I've settled on as the best solution, especially since I've developed a precise setup of a low mic gain leading into a background noise filtering application that is amplified - but it uses pulseaudio whereas Pop!_OS uses pipewire. The alsa config for wireplumber seems to differ from that of pulseaudio, so is there any way in pipewire to get this same result?
 


YES... yes, there IS!!! I stopped Ferdium clients from adjusting the microphone, it should be easy to adapt to other clients
The basics:
  • Create this folder $HOME/.config/wireplumber/main.lua.d
  • Create file named 99-stop-microphone-auto-adjust.lua in that folder
  • Put this content in the file;
    Code:
    table.insert (default_access.rules,{
        matches = {
            {
                { "application.process.binary", "=", "ferdium" }
            }
        },
        default_permissions = "rx",
    })
  • Restart pipewire and wireplumber etc:
    systemctl --user restart wireplumber pipewire pipewire-pulse
And, after literally months of searching, finally the microphone is not adjusted

This was done on PopOS 22.04 and WirePlumber is a bit of a moving target, so I don't know if this will remain stable.

There are many other matches you can try - the wpctl tool is a great help in finding clients and then finding properties that can be matched against.
 

Members online


Latest posts

Top