I've been using Linux on my desktop for nearly 30 years and i still don't understand how to get sound working properly and reliably.
Searching for some kind of distro-agnostic 2025 Linux audio general best practices guide... What should I be using (ALSA, jack, pulse, pipewire?), how can I configure multiple sound devices (onboard, HDMI, USB, Bluetooth), set my preferred inputs and outputs and levels on each, toggle between them properly, and have those settings persist after logout, reboot, or removal/addition of devices?
@pcyx If it can be of any comfort to you, audio and devices control is a mess on any system, including Windows, from time to time. I have continuously colleagues with problems in making even simple telcos. That said, for me it is quite stable using Gnome on Debian 12 and multiple devices (headphones, cameras, internal, BT).
@gisgeek Oh yeah, sadly I use windows at work all day every day and it's a mess. And god help you if you need to use MIDI or an application requiring ASIO4ALL drivers!
I've never used a MacOS device so I'm not sure if they have it any better in Apple world.
I've never actually tried to use Bluetooth audio in Linux either (or Bluetooth anything in Linux for that matter) but it's always one of the issues I read about from other people.
@pcyx FWIW I have had a good experience with Pipewire + whatever the sound control thing in KDE Plasma is called. Multiple outputs and inputs, switching between them works flawlessly, settings are retained just fine etc. Even things like outputting certain apps to certain output devices is effortless.
@krs I do use KDE, will definitely look into pipewire, it seems like the latest and greatest. I don't believe I have it installed at all right now.
@krs So, as it turns out, I am already using pipewire! I've definitely never touched the pipewire.conf or any of the other config files though. And all of my messing around with ALSA may not have helped...
Going to try to revert all my ALSA config to defaults and then explore the pipewire equivalents of alsactl, alsamixer etc.
@pcyx I don't usually mess around with those tools. I just use the volume control applet and audio settings in KDE to do what I want and let that handle things. What is it exactly that is going wrong? Maybe it's more of a hardware quirk than software?
@krs Thanks for your inspiration. I spent a couple hours really diving in and things seem to be all good for now.
The most irritating thing has always been recording, unsuccessfully. Audacity is my preferred tool for that and I suppose it's rather antiquated.
First, I read up about pipewire vs pulse vs jack vs alsa. My pipewire install did not have the pulse or jack compatibility layer installed and that probably wasn't helping. Fixed that!
Hooked up an external USB audio interface. (My onboard audio quality is terrible.) Opened settings panel in KDE which let me enable the USB and disable the onboard and HDMI devices. I could play sound on the external sound card!
Fired up Audacity to record from Line-In and... silence. KDE settings panel had no config for this, just a generic input which was not muted, and turned up, but still silence.
Ran pavucontrol to try to see if I could tell what was going on. Audacity seemingly has no direct pipewire (or pulseaudio?) support, apparently using PortAudio which i believe just talks directly to alsa.
Ran trusty old alsamixer and saw all the glorious inputs and outputs (digital, analog, mic, speaker, headphone, line, etc). Alsamixer let me choose which input to use as the active/default input and set levels of each independently. And... it works!
Then I tried to break it by unplugging the USB sound card, rebooting, plugging it back into a different port, etc. and everything is good so far.
At least I have a (little) more understanding of house it akk interacts beneath the surface. And more importantly, sound input and outputs are working. I have a lot of old records and cassettes I can digitize now. :)
Thanks
@pcyx Good to hear you got it working somewhat! Linux audio is still somewhat messy in this day and age. Pipewire at least tries to consolidate most of it, but underneath it all it still talks to ALSA.
In Audacity specifically I just use the "Audio Setup" drop-down in the app itself to configure inputs and outputs. That has worked fine for me but I don't have very exotic hardware. Checking now it seems that on my PC the "Host" setting is set to JACK rather than ALSA in Audacity. That would be the pipewire-jack compatibility layer. But it works with either or for me I'm pretty sure. It sounds to me that the USB interface messes something up for pipewire. Did you try rebooting after plugging it in?
You can also try pipewire tools like pw-cli and pw-top to see if anything shows up there. `pw-cli ls Device` would show all devices it's recognized for example. But if they show up there they should show up in KDE as well.