The Hijacked Input
Ubuntu Linux utilizes advanced audio servers (like PulseAudio or PipeWire) to manage system sound. By default, these servers are configured to be “helpful.” Whenever you physically plug in a new USB device that contains a microphone—such as a webcam, a gaming headset, or even a specialized audio interface—Ubuntu instantly assumes you want to use it right now. It automatically changes your default audio input device to the new hardware. While this makes setting up a new headset easy, it is a nightmare for podcasters or streamers. If you plug in a cheap webcam just for video, Ubuntu will instantly mute your expensive studio microphone and start broadcasting the terrible webcam audio instead.
Securing the Audio Source
To maintain control over your recording setup and stop Ubuntu from automatically changing the default microphone when new devices are connected, you must disable the module responsible for hardware switching.
You cannot change this specific behavior via the graphical settings; you must edit a configuration file. Open your terminal by pressing Ctrl+Alt+T. Type: sudo nano /etc/pulse/default.pa and press Enter (provide your password). Use your arrow keys to carefully scroll down through the file. You are looking for a specific line that reads exactly: load-module module-switch-on-connect. This is the script that hijacks your audio. To disable it, place a hash symbol (#) at the very beginning of the line, so it becomes a comment: #load-module module-switch-on-connect. Press Ctrl+O then Enter to save, and Ctrl+X to exit. Finally, restart the sound server by typing pulseaudio -k. Ubuntu will now leave your selected microphone alone, no matter what else you plug in.