Audio is the weakest link of the linux desktop experience
In the spirit of all the recent Linux posts, I feel like sharing my thoughts too. I've been using Fedora on my laptop for about ~1.5 years, and I've just began using Arch about 5 days ago. I moved to Arch because of all the Windows 11 shenanigans, and I really enjoyed the workflow of i3 on my laptop - the only thing I was unsure of was gaming. But I decided to take the dive anyway.
I installed Arch using the wiki, and it truly felt awesome being able to choose what exactly you want in your system and what you don't. After following the guide, I installed a tiling manger (hyprland), waybar, and a launcher (wofi). It was much easier than I expected (granted I had experience with Linux), after hearing all the Arch boogeyman stories. Though I did accidentally break my system by foolishly doing a `sudo pacman -Rcns ....'. But my configs were still all there and I just had to install everything back, which did not take long at all.
Everything just worked after installing, except for audio. My audio experience was bad, it was crackling and popping all the time. The Arch wiki didn't really have info on this problem, so I took to other avenues. I found a guide that said to change the 'quantums' for pipewire, to some values that I didn't really understand (nor want to tbh). But that fixed it for the most part!
My next problem was discord not picking up on audio for certain applications at all - I narrowed it down to apps that were using ALSA as the backend. So, some apps like Plexamp and Firefox wouldn't get picked up by discord. I changed the backend of Firefox to ALSA due to a longstanding bug which resets the per-app volume level of Firefox every now and then. Setting the backend to ALSA is a workaround, but I didn't know it'd prevent discord from picking up audio. I can't find a solution except to revert to the normal backend - if anyone knows a fix the tech support would be welcome haha
Also the different backends for audio (pipewire/pulseaudio/alsa) make it confusing at times. To me, this is a big hurdle to overcome before the "year of the linux desktop" ever becomes reality - I've had so many issues, even on my laptop. Other than that, the experience is really quite fantastic, the modularity and customization is nuts. I've had quite a bunch of fun tailoring my experience and creating scripts to make the system do exactly what I want.
I'm gonna be honest: this is the least relatable of the canonical Linux desktop complaints to me. I have literally never had a problem¹ with sound.
(Two things that I think help with that are 1. buying boring hardware—e.g. Dell and Thinkpad laptops, built-in motherboard audio which is almost all HD Audio and well supported; and 2. never using PulseAudio. [Protip: your life will be a lot better if you avoid, to the maximum extent possible, anything Lennart Poettering has ever touched.] Number 2 is a slightly unusual path, but hardly extraordinary; if you weren't using a DE, avoiding PA was pretty straightforward, and the exhortations against it were constant and vehement.)
Now, graphics, on the other hand, was a right pain in the ass until I gave Nvidia the Linus Torvalds.
To try to answer some of your questions, though:
reversechronological order, the major sound servers were/are:pulseaudio -k
.JACK was really good, actually. The biggest problem was that you had to manually configure every connection and there were no graphical configurators for years.
Really thorough explanations, much appreciated! I've never touched anything PulseAudio related, with the exception of pipewire-pulse, which from my understanding is required for applications that interface only with PulseAudio (legacy apps?). If that was the wrong move, that's on me.
But I still have tons of issues!! Maybe it's the hardware I'm using...
I never understood why ALSA couldn't mix for me if the device did not support mixing. It's literally just adding up the samples.
I think that ALSA actually is capable of mixing these days, but Pulseaudio/Pipewire handles so much other userland functionality concerning sound that programs are better off using Pulse API's anyway.
I want to say that this specific point is a bit overstated because in my experience the chance to get sound issues is largely bad luck that happens anywhere. I own an old thinkpad that I sometimes use for spotify etc. and pipewire randomly switches from an external sound card to the integrated sound card on boot, no idea why. And Dell does not necessarily use standard hardware either, I helped my dad choose a mid-end Dell laptop a couple years ago and it doesn't work exactly right either - though still better in linux than in Windows, where it often just refuses to change the sound output if more than one device is connected and requires a reboot. I have not seen such behavior on a windows machine for years, so Dell is definitely doing something nonstandard here, no idea what.
FWIW The only problem I ever have with audio on Linux is occasional difficulty getting sound to play out of the correct device. But I've had this problem on every OS I've ever used, so at this point I'm convinced that it's just an unsolvable problem.
Welcome to the future!
Sound issues are so common that it’s no big deal to have to restart your computer for an interview zoom.
It seems really strange to me to hear people say that their specific issues with Linux prevent a Linux from being a serious contender when they are dealing with Arch. The distro where you basically have to do everything yourself and do a lot of tinkering to get anything working.
The average user when finding problems with any given OS feature will at most spend a total of 5 minutes searching for a solution, but they are just as likely to just give up and move on.
I was going to say pretty much the same thing. I can understand OP’s frustration, but I think they are overgeneralizing their particular issue (with a DIY distro no less). Having installed various distros on numerous computers over the past 20+ years, I think that more than audio, wireless and graphics drivers are more of an obstacle; specifically Broadcom and Nvidia. Even so, some distros magically configure everything on even my most stubborn of machines.
Completely understand that too, but this is coming from my experience with Fedora as well. That despite having pipewire and the components for it to "just work", it just doesn't.
But oddly audio is the only area in which I experience this friction, so that's why I hold the view that I do.
What audio devices are you using?
On my laptop most of the time I just plug in my headphones/IEMs. On my desktop, I have it plugged into a Topping E30 DAC.
It’s funny because I have one of these and the only audio issues I have are the bugs this thing have, and I thought that this device wasn’t going to work out of the box and I would have to sacrifice a cow or something to make it work.
It seems that some laptops audio card cause some issues on Linux, because it’s like the second time I read something similar about it.
Were you using Pulseaudio instead of Pipewire by any chance?
Pipewire is the only thing you need 99% of the time. It's fully compatible with Pulseaudio and ALSA clients and has much less of those weird bugs.
Also, most distros already set it up by default, so it's more of an "arch issue", not a "Linux issue". Linux is notorious for having audio issues, but since Pipewire became a thing that's now much less common.
Nope, not inentionally at least. I installed pipewire. I've had weird issues on Fedora too, so not just an Arch thing. At least based on my experience.
In that case it's probably an issue with your specific hardware, consider opening a bug report in Pipewire to help them fix it!
Interestingly, I've found it the weakest link of the Windows desktop experience too. It's basically a meme at this point that if my friends and I have a chance to play a game together there will be at least 10 minutes of "wait, I've got voice chat but no game audio", "ah crap the volume levels I had dialled in have disappeared", "<silence> .... <more silence> .... OK turns out I needed to re-pair bluetooth three times and then restart the game before it'd pick up the mic as well as the headphones".
From using macOS and Linux extensively, and Windows occasionally, it seems like audio is one place that Apple are notably ahead.
There's this thing in Windows for me, where Sea of Thieves just forces my Bluetooth headphones into handsfree mode, butchering the audio quality, whilst having no setting for mic input. Whilst I have a dedicated mic, and Windows knows about it.
I had basically the same issue, and while I can’t remember how I fixed it, I can confirm that I did fix it, so if it’s something you want to fix, here’s my confirmation that it is in fact fixable. At least, this was true back when it first launched — I haven’t played in a good while so it may have gotten better, or it may have gotten a lot worse.
I’ve aggressively taken control of audio routing across my entire computer in windows, by using Voicemeeter and a few other bits and pieces. So Sea of Thieves deciding to ignore all that and try its own thing, it was a particular frustration to wrangle it back into its place, and particularly satisfying when I got it all back in place and behaving itself.
For an example about how uniquely incorrect Sea of Thieves was; I think at some stage, it decided that my hdmi-cabled monitor had speakers in it (it didn’t) and perhaps because of my audio routing shenanigans, it also tried to select said monitor to be the microphone in game too! My monitor contained neither speakers nor a mic, so I was quite confused when I realised that was the object it had selected for both input and output!
I'm a professional musician, and the only reason I still regularly use Windows is because of the audio issues on Linux. There is a big difference between getting regular audio to work and the advanced tools use for production of course, but the core issues are still all present. A lot of essential audio frameworks just don't exist on Linux, and as a result the vast majority of Linux audio software just has to wing it, doing it from scratch or going through the awful Linux audio drivers. Windows audio is a mess, but Linux audio is constructed from paper cups and string with a bunch of razor blades thrown in for fun. Easy to complain about it as a non-developer of course, but it's telling that at this point the Linux core utils are essentially on par with Windows and Mac in every way except audio.
On the music production side (which is only tangential to the point you're making in fairness) you just cannot use Linux at a professional level, and even at an amateur level you really have to commit to it. None of the tools are there, most notably VST3 support and Ilok, meaning that 90% of all commercial plugins just don't work in any capacity. You're stuck with amateur open-source plugins and the tiny portion of the VST market that cares enough to make Linux-compatible plugins. Using Linux for music production feels the way that using Linux in general was like in 2005: it's objectively worse and the only reason to keep going with it as a consumer is out of principle.
Windows isn't good, but at least it works for the day-to-day stuff. Every now and then I have to spend too long reconfiguring ASIO after it randomly decides to stop working and I die a little inside, but it's better than nothing. I'll probably switch to a full Mac+Linux setup at some point and cut Windows out of the equation entirely, but Macs are expensive and musicians are poor, so for now I have to make do with dual-booting Windows and feeling bad about it. I really like Linux and hope the audio side of it improves. When my programming chops get better I hope to contribute a bit to the project where I can.
sudo pacman -Syu
To be fair, the average user (i.e., a typical Windows user who decides to give Linux a try) isn't very likely to go around switching audio backends of various programs and running into the kind of problem you did. For them I suspect having a functioning pipewire-based system will work just about as well or better than audio on Windows, and if they have problems like audio levels resetting they'd just learn to live with it (like they would have to for similar problems that come up for them in Windows).
The thing I prefer about audio (and everything else, really) on Linux over audio on Windows is that if you're having problems on Linux, and you're technically inclined enough, there's at least things you can research and do that will eventually lead to a concrete, repeatable way to get everything into the working state you want. You might break things along the way, but once you've done it enough times you learn to get a feel for the risk level of what you're doing, and you learn the skills necessary to rescue yourself from the DEFCON 1-level screw ups. On Windows when I have audio problems (and everything else, really) the only way I can find to fix it is repair/reboot/pray and if that doesn't work the "joke" suggestion is to do a clean install, which half the time doesn't end up being a joke because that's the only thing that actually fixes it in the end (until it breaks again and you get to do the whole thing over).
(Old man grumbly rant time): Feels like a lot of these threads complaining about Linux come from people who are more technically inclined, and have switched to Linux relatively recently (less than a few years ago). They have enough knowledge and technical skills to know what to search for and fiddle with configs and audio backends and command line package installers but are still settling into what it means to actually fiddle with those things and running into problems that a "normal" non-technical person would never see, then complaining that Linux isn't ready yet for those normal non-technical people. I haven't been convinced yet that it's an apples-to-apples comparison. I think those normal peopele also run into problems on Windows but they either just live with them or get one of their techie friends to look at it and in an alternate universe where they were using Linux it would be no different. It's still my opinion that most mainstream distros these days are to a point where they "just work" and would cause no more (and probably less) issues for the average non-technical user than Windows does.
To be fair, I get these issues in apps where I haven't fiddled with audio backends as well.
Completey agree with the nuking windows and clean install bit, I always keep a thumbdrive with Windows Boot Media for this very reason.
As for your last sentence, I'm not too sure about that! I'm sure some of the issues I've had on Fedora would have made some of my non-techny friends to throw their arms up and re-install windows! But maybe I'll eat my words, I have a friend installing Linux soon.
Respectfully, when someone has an issue with Arch I classify it as an issue with Arch. It's inconsequential to my opinion of Linux as a whole. If someone has difficulty building their own car out of a kit their experiences are not really comparable to buying a fully assembled automobile.
It really is. I've been a Linux user since 1996 and back then it was kinda exciting to hack around things and just making something come out of the speakers was fun. OSS, the Gravis Ultrasound driver that later became ALSA and a bunch of sound servers... none of them have done a great job. In retrospect, Linux world should probably have just stuck with OSS and improve that instead of doing a thousand half-assed rewrites.
Pulseaudio improved the situation a lot once it stabilized, and now Pipewire is trying to perfect that. But it's still not very good. For instance, just the other day I was trying to get proper unprocessed audio output via HDMI to my media system to work, using a pretty normal Fedora with hardware that's not very new anymore. One would think that unprocessed audio would be easy, like just push the bits into the wire? Turns out that the only way it was possible was by forcing output to happen via ALSA instead of Pipewire, and the error messages were just not helpful at all.
The good thing in Linux land still to this day remains that most things are possible if you just find the right combination of magic incantations. In my experience, if Windows / MacOS fails at something, there's not a lot you can do.
Your last point is 100% true, and is part of the reason why despite some of the challenges I face I'm pretty glad I made the switch.
A whole world opened up for me when I discovered how powerful bash scripting was, haha.
Unfortunately that alternative history of Linux audio would not have been possible because OSS had legal encumbrances. The owner decided to make it proprietary, so everyone switched to ALSA.
You know speaking as a person who bought a Mac mini for work because Linux progressively made me angrier for desktop use— I'm surprised to hear you say this, because Linux audio is mostly figured out at this point if you use PipeWire. Literally never had an issue.
Though, I do use Helvum to manually connect the pipes if need be. It's an actual virtual patchbay and it works great.
What hardware did you install on? From the problems that you describe, my guess would be a hardware/firmware issue. Did you install the sof-firmware package if you're on a laptop or the alsa-firmware package if either of them are required? Did you install Pipewire?
If you haven't already, I'd recommend installing according to the PipeWire wiki page and run through configuration from there.
I'm not at all disagreeing with you, the Linux sound system is difficult at best. A big part of it is that there have been so many changes and so much reinventing the wheel. ALSA, OSS, JACK, PulseAudio, and now Pipewire with WirePlumber. In my opinion Pipewire with WirePlumber on top of ALSA finally kind of hits true a majority of the time, but I still have issues with it. For instance, there's no way I have found to remember to connect specific applications and streams to specific outputs without getting deep into configuration files (and even then I haven't figured it out). ALSA's documentation and configuration file layout is in my opinion severely lacking in simplification, and it is at the end of the day the backend for every modernization attempted.
There's no good fix for the Discord issue you mention, but it appears to be known and documented on the Arch Wiki.
I must be incredibly lucky then, because I do all sorts of weird jank with my audio inputs/outputs and I only had a crackling problem one time, needed to adjust buffers or something.
But, at least on Endeavor and openSUSE, I just route my audio devices to the desired input/output. They remember where they are. Some things go to the monitor speaker. Some things go to the headphones. Some go to the nice speakers in the other room. If I unplug my dock they automatically reroute to defaults within a second.
Windows 11, and Discord in particular, likes to just randomly reset all of my audio settings for a given device, and dealing with multiple input/output at the same time is a PITA.
I've had far more headaches with wireless networking (particularly apps responding poorly to changing connections) and graphics drivers. Though the graphics driver problem is still exponentially better on Linux than on Windows, particularly when changing GPU vendor, and especially since amdgpu in the kernel stabilized a bit.
I really was expecting more trouble on the graphics portion, but it worked pretty amazingly from the start. But I guess issues are more prominent on the NVIDIA side of things. I'm really quite happy with the rest of my experience!
Audio has also been one of the more frequent pain points I've hit with desktop Linux, second only to video driver bugs.
I'll sometimes hit a point where if I play a video it plays in super duper slow motion or is totally frozen. I'll then find that audio is totally broken and the issue with playing videos is because I guess the pipe to audio device is "clogged". I have a specific
systemctl --user
stanza to restart all the audio daemons which usually fixes it. But sometimes after doing a system update that'll stop fixing it and I'll eventually end up needing to dig into the packages I have installed and usually reinstall pipewire/pipewire-pulse. I've been running the same core OS install and updating it for several years and it seems Fedora switched from pulseaudio to pipewire some years back. I think something in my system is unhappy about that and tries to partially revert me when upgrading.But, aside from when it occasionally breaks, it works fairly well. Not like video drivers where I have to pick between nouvuaeaue which causes my system to crash at random and nvidia which causes my system to crash when plugging in or unplugging monitors (unless I put the computer to sleep first).
I've been using Arch for about ten years now, I haven't had too many audio issues that I can recall.
One thing I would recommend doing for people who want to stick with Linux is that the next time you purchase a new PC, select motherboards with wireless and audio chipsets that have a history of being well supported in linux. In my experience you can avoid most of the headaches entirely by doing this.
Quantums are essentially buffers and represent how many audio samples are processed per cycle. The larger the buffer the less cycles you need and thus less CPU usage but you'll introduce some additional latency. Crackling/popping arises from quantums being too small and the audio engine running out of samples to process within each cycle. A larger quantum let's the audio engine stay saturated.
Having Linux as my main desktop for over 20 years I can also say that audio has been the biggest headache. It is usually fixable but I've had everything from consistently wrong default output devices to applications crashing each other fighting for control of ALSA input devices. And this is with dozens of different motherboards and a few dedicated sound cards.
I tend to put most of the blame on hardware manufacturers since none of them really advertise Linux support and many of the drivers are reverse engineered.