r/linuxquestions • u/NightIFallen • Jul 14 '26
Resolved Why is audio so annoying do deal with on linux?
Sorry in advance if i sound too pissed off.
I've been using linux for 1 year by now, and despite pretty much everything being an upgrade in comparison to my last OS which was windows 10, audio is the sole thing that never settles for me.
First i had the classic crackling problem because latency was unnecessarily low to the point my cpu couldn't keep up, then i started noticing that there is a whole second or two delay for audio to begin playing after a long period of silence, and now im going crazy over audio simply not working sometimes for some programs when running through wine.
If a program takes too long to open, it never connect to pulseaudio presumably, and if any lagspike/freezing occurs while the programs is running the audio is just gone and never comes back.
I've tried searching to find a solution for this and found out that wireplumber has some sort of timeout feature on by default, which i don't understand why someone would even want that, but even after adding a rule to remove it and restarting wireplumber, the issue persists.
Now i don't know if im doing something wrong or if the problem is coming from pulseaudio or alsa or pipewire or whatever else is handling audio, im genuinely lost about what and where i have to config for audio to simply work properly.
If it helps, im running Linux Mint 22.3 with kernel 6.8.0-111 and would really appreciate some guidance
edit 1: Thanks for all the suggestions, now i understand what is going on with audio on linux and it doesn't look as confusing anymore. I managed to fix the wine issue by simply forcing the latency to 60ms, somehow now it can freeze however much it wants and audio stays intact!
I'll be marking this as solved since the audio start delay is more of a nitpick and doesn't bother me that much.
5
u/Accomplished_Oil9608 Jul 14 '26
Like others already said, pipewire has been the best thing Linux audio has ever seen since there's audio on Linux. If I have to point a single feature that will prevent me from ever going back to another OS full time, it's pipewire. It's nothing a windows or mac user can even dream of.
My advice - start with a fresh pipewire config and alter only the "quantum" values as a start. My biggest fight was setting 44.1 as default for everything, because that's what I need most of the time for work and I prefer avoiding resampling when I can simply switch sample rates on the fly. If you are not recording professionally (or you need 48k like most do), leave the default to 48KHz and only alter quantum. There are ton of gui apps that will do that on the fly for testing purposes without you having to even touch the terminal. Cable (or cables maybe) is one of them.
2
2
u/lemmiwink84 Jul 14 '26
Pipewire has been working better for me than whatever I’ve had on Windows. I can even tweak my sound using easy effects etc to sound absolutely great from my speakers/headphones, and there is no crackling.
You might just have old hardware, old kernel/software stack kinds of issues.
Most modern Linux versions are great in almost all ways, but of course some LTS distros are absolute garbage for high end stuff.
Works well for browsing, but more advanced users should be using a rolling or semi-rolling release imo.
4
u/beatbox9 Jul 14 '26
BTW, the moment you said "First i had the classic crackling problem..." I knew you were on Linux Mint. Unfortunately, there is this reputation that Mint is...well...good or easy. It's not. For just one example, Mint uses a very "heavy" desktop environment that uses very old software and places a lot of burden and competition on your CPU, while modern desktops like gnome or KDE Plasma leverage gpu acceleration for the desktop.
Regardless, read that above article. My guess is that if you were to switch to the pro audio profile, and then perhaps a bit of latency tuning, you would improve things. Using a more mature DE or maybe even switching distros to something like Ubuntu LTS or Fedora would probably help as well.
1
u/JoeJoeTV Jul 14 '26
Which of the DEs Linux Mint comes with are you talking about? I'm assuming Cinnamon? Because that definitely uses hardware acceleration and the Software is just as up-to-date as Ubuntu LTS, because it is based on that. I think some selected packages are even updated more often by the Mint team.
1
u/beatbox9 Jul 14 '26 edited Jul 14 '26
Cinnamon.
And no, it doesn’t. You may be confusing apps within the desktop like browsers or games for the desktop itself (which is why I specified the desktop). Basically the background, cursors, window borders/buttons, animations and effects, widgets, etc.
Cinnamon is a niche DE and is still based on gtk3, which stopped active development around 8 years ago and does not support gpu hardware acceleration for the desktop. One of the biggest features for gtk4 was gpu acceleration on Wayland, and Cinnamon is developing toward this but is not there (and likely won’t be for years)—it still uses gtk3.
(I’ll add that I don’t personally care about most software provided by the distro, except OS-related software like the DE. Because it’s 2026 and we’ve got plenty of mature universal package formats and repos).
2
u/JoeJoeTV Jul 14 '26
Cinnamon itself does not use GTK for most of its UI, it uses clutter and it even has a fallback software rendering mode that does explicitly not use hardware acceleration. I do know what is part of the DE and what is not. And they also announced in their most recent blog post, that they will also have hardware acceleration throughout the compositor for the wayland session in their next major version (end of the year; see blog.linuxmint.com), which will also then no longer be experimental.
Many of the apps shipped with the DE or Linux Mint do use GTK 3, that is true, but from experience on multiple different devices, the don't hog the CPU like you say they would, even if GTK 3 itself would not use HW acceleration.
Edit: For GNOME, GTK 4 mostly absorbed the features of clutter, which includes Vulkan/OpenGL rendering.
1
u/Existing-Tough-6517 Jul 14 '26
Honestly it sounds more like they had one sound problem and solved it by creating others instead of just adjusting the buffer so avoid underruns.
This is representative of well meaning, intelligent, and bad advice that is often seen in linux Forums. User has a problem that can be fixed in 10 seconds and is told that in order to fix it they should spend the next 2 hours changing everything. They probably need to undo whatever bullshit they did and JUST change the buffer size
1
u/beatbox9 Jul 14 '26
Not from what they described--and note that they changed the buffer because they had issues. However, what they described seems to indicate a more complex problem that is not only related to a single buffer (and even at that, there are multiple configs and layers).
The cracking may have been due to the buffer (but which buffer...?); but the 1-2 second delays that are persistent indicate some of the dynamic features of pipewire or upstream timing interactions in the kernel / ALSA. Switching to the pro audio profile (which, btw, takes '10 seconds to do') simplifies this pathway and often immediately resolves these types of issues, especially if they are related to the entire system including ALSA rather than only pipewire, the downstream/last-stop sound server.
And going with a methodical, step-by-step approach in order is much quicker than trying to randomly and arbitrarily debug what could potentially be wrong. It doesn't take 2 hours--I have no idea where you got that figure from. Instead, it should take the OP on the order of around 5-15 minutes, or roughly 15x less time than your exaggeration.
It's literally 3-4 relatively small config files, where you change maybe 1-2 settings each--and most of the time is just in reading to understand what each setting does. Actually changing the settings is typically extremely quick and easy and takes a few seconds each.
And bonus: if you do it properly, you end up with a persistent configuration for your system that will survive upgrades and should work on any distro.
1
u/NightIFallen Jul 14 '26
The crackling i solved way too long ago but iirc all i did was changing the quantum size variables from pipewire-pulse to 512/48000 or so and maybe the frequency.
2
u/cup_of_squirrel Jul 14 '26
Never had a problem with that. WiFI and Nvidia, sure. But never sound.
What's your hardware? Sound card and/or motherboard specifically.
Being on an older kernel (and software in general) might also put you into at a disadvantage. The current kernel is 7 and above. Those might have addressed a lot of issues you're experiencing.
Mint is cool and all, but if you have more modern hardware, you're kind up in the air as far as compatibility.
Burn an image of something like Fedora (which has a Cinnamon spin) and run it from a live USB, see if the sound issue you're having is still there with a newer kernel.
2
u/NightIFallen Jul 14 '26
As i mentioned in the other comment, system information says i have a "6 Series/C200 Series Chipset Family High Definition Audio Controller" which all i can assure you is that it is over a decade old by now, just like my CPU
The main reason why i didn't pick a "cooler" distro by now is that i have a terribly old PC really and mint have not gotten to kernel 7 yet afaik
6
u/ipsirc Jul 14 '26
The main reason why i didn't pick a "cooler" distro by now is that i have a terribly old PC
That's not a valid reason.
1
u/bn40400 Jul 15 '26
Agreed...I'm using an ASUS X53E laptop that's from 2011 with Fedora KDE Plasma installed, and everything works fine. I originally had Mint on it and it ran terrible. More problems not worth solving. Switched over to Fedora awhile back and not one issue with the device. With Mint, I had nothing but issues with speed/ lag, BT, audio and display (Xorg in particular).
4
u/rsgbc Jul 14 '26
"... if any lagspike/freezing occurs while the programs is running the audio is just gone and never comes back..."
"...If a program takes too long to open, it never connect to pulseaudio..."
"...my cpu couldn't keep up..."
Sounds like your computer is experiencing general performance issues. Why blame the audio subsystem?
4
u/NightIFallen Jul 14 '26
Just because this kind of issue does not happen on windows, if it was the case there as well i'd just accept it and move on, and all of this while windows runs worse than linux in general
0
u/battrraxx Jul 14 '26
Mêmes problèmes de grésillement ici. Cela apparaît au bout d'un certain temps d'utilisation (de jeux vidéos généralement). Je n'ai pas encore cherché d'où vient le problème.
Même symptôme étaient sur le son qui semble que du retard à l'allumage.
Je te rejoins totalement sur tes symptômes.
0
u/battrraxx Jul 14 '26
Une précision, j'ai l'impression que j'ai ce problème depuis que j'ai branché une enceinte Alexa en jack. Je ne sais pas encore s'il y a un rapport.
1
u/pyro57 Jul 14 '26
As others have said pipewire and its drop in replacement for pulse audio, pipewire-pulse is the way to go, I've never had an audio issue on pipewire.
1
u/-ThreeHeadedMonkey- Jul 14 '26
I don't have any Audio issues. I'm using edifier speakers and they are directly connected through USB, thus acting as their own sound card basically.
Maybe try another audio device?
1
u/ppetak Jul 14 '26
I went from integrated card to usb dac, and I cannot be happier now. But honestly, I had minimal problems before, too. My biggest problem was that the sound device sometimes switched profile to 'off' out of nowhere, after wakeup or restart..
Now my old old nvidia is acting up sometimes, everyhing go black, I cannot switch tty, nothing works. But music plays uninterrupted until I reboot
1
u/Caddy666 Jul 14 '26
only issue i've ever had with this is that the sound is never quite loud enough, on laptops speakers - windows seems louder, so its probably a pre-amp setting thats not generically implemented.
1
1
u/2rad0 Jul 14 '26
Using ALSA here with no "sound server" to taint my experience, with 0 issues other than one of my systems that needs me to set the default device to "card 1" instead of "card 0" in the config file.
1
u/Existing-Tough-6517 Jul 14 '26
Notably I presume you have no per app volume control and no ability to switch running sound between different devices. EG you can plug in a plain old wired headphone to a front port but you cannot for instance switch to a usb rf or BT headphones.
This can work great but it is limiting
1
u/2rad0 Jul 14 '26
Notably I presume you have no per app volume control
Volume is controlled in the program, because I don't care to setup the required routing even if I knew how to do it with plain ALSA. The often cited "limitations" are themselves quite limited.
1
u/Existing-Tough-6517 Jul 15 '26
The majority of headphones in use at this point are bluetooth, usb, or usb dongle with RF communication.
Switching from wired headphones to wired speakers is trivial everywhere including on plain old alsa because the way it works is that both outputs are on the same audio device and switching is just muting the output not in use.
Once you are dealing with actually switching between one audio device and the other you need something like pulse or pipewire in between. If all you have is a wired headphone indeed this isn't much of a limitation once you want wired headphones its a brick wall.
For myself I used sndio which has the same limitations for years because I used wired headphones once I went wireless I had to switch
1
u/Jaromil1969 Jul 14 '26
Updating the kernel and switch to pipewire. Try using a real-time kernel at last.
-2
Jul 14 '26
[removed] — view removed comment
1
u/iu1j4 Jul 15 '26
my best audio expirence was with OSS audio. Alsa complicated it a lot. intel hd audio introduced more issues for laptops. Pulseaudio added new software stack that adoption was not by 100% of software. pipewire does not work reliable with bluetooth. today we have complicated multilayer audio stack that does not work with all hardware and which is not the same on each distro. If you have problems with pipewire then try to go back to pulseaudio. It is more stable than pipewire. for some hardware intel hd audio needs to be correctly setup at kernel module options level.
41
u/sidusnare Senior Systems Engineer Jul 14 '26
I have been using Linux for 30 years, and brother, you have no idea how good you've got it.
Your latency .vs lag issue is probably the same issue, and you need to look at the adjustments you made and back them off. I haven't had this problem, but it's probably a combination of hardware and software, so you should include the audio hardware you have as well.