Why can't I change the default output sound device on Ubuntu 20.10?

Today I struggled with an annoying issue concerning the sound system on my Dell XPS 13 7390. Ignoring whatever output sound device I selected, Ubuntu would instead play the audio directly through the built-in speakers. To quote what I regularly hear from my users, “it worked yesterday, and I didn’t change a thing!”

To salvage the day, I immediately went to my battle-tested “fix everything wrong with Ubuntu” solution and rebooted the system. Unfortunately, the problem persisted, and black metal kept crackling out through the built-in speakers at max volume.

Ubuntu sound settings

I’ll admit that I find these modern days GNU/Linux distributions that long ago abandoned the UNIX philosophy to be overly complicated. Thus I always try to keep away from digging below the surface if possible. However, clicking them pretty buttons would get me nowhere.

A few manual pages later, and the pactl info command taught me that the default sink was permanently stuck with the built-in speakers. Regardless of what I chose from the sound settings, the default sink would always point to analog-stereo.

The typical sink represents an output sound device, e.g. headphones connected to a sound card line output or on a Bluetooth headset. PulseAudio automatically creates a sink for every detected output device. Source: gavv.github.io

After identifying the problem, the fix was simply to delete my PulseAudio configuration files and restarting the PulseAudio sound system.

rm ~/.config/pulse/*
systemctl --user restart pulseaudio

And with that, sound devices were once more configurable from the sound settings. Now then, let’s try to get my Bluetooth headset working again with Microsoft Teams ;-)