31

I'm reading and trying to understand why would anyone want to use Pulse Audio and I'm failing to understand. I read this https://www.linux.com/news/hardware/drivers/8100-why-you-should-care-about-pulseaudio-and-how-to-start-doing-it, and I'm still not getting a convincing answer. I have a set up, with one sound card. ( I don't need to multiplex sounds from or to several sound cards). I know that all applications are written with different APIs, ALSA, OSS, JACK etc. So if I configure all those frameworks to route the sound through pulse audio, what benefit do I get, vs allowing all those frameworks talking directly to the sound card driver? In addition, I don't see that Pulse Audio has it's own Application API. So I need to choose a framework anyway (like ALSA). Thanks

4
  • 6
    For one thing, I know I used to have a problem where if programA used the soundcard, programB couldn't use it until programA was closed. Even if programA were no longer using it. In my case, that sort of thing went away as soon as pulseaudio came about. Perhaps I could have configured ALSA or OSS to also allow multiple programs access to the soundcard but I'd never figured out how.
    – terdon
    Commented Dec 14, 2015 at 18:51
  • 4
    They (pulseaudio) thought the solution to the many audiosystems on linux was to create yet another audiosystem.
    – ctrl-d
    Commented Dec 14, 2015 at 19:14
  • 1
    If this was a system that could emulate the others or if it had a simpler interface, it as the solution. It seems that this was not achieved.
    – schily
    Commented Dec 15, 2015 at 10:27
  • It's like network-manager and resolvd. Useless and annoying changes to linux that add unnecessary middleware between you and the underlying linux applications / configs. PA and Network-Manager are the first things i uninstall when i install linux. I also delete the symlink /etc/resolv.conf and replace it with the proper file that should be there.
    – Owl
    Commented Apr 23, 2022 at 2:19

3 Answers 3

35

It's all about multiplexing.

I don't need to multiplex sounds from or to several sound cards

Ah, but you do! If you want to be able to play audio from two sources at once, ever, for any reason, you need multiplexing.

OSX and Windows handle Multiplexing in the Kernel (but still in software), which is why this never/rarely comes up on those platforms.

However, on Linux, with software like ALSA, multiplexing is left up to the specific sound card / implementation / driver.

Unfortunately, not all cards and all drivers actually support this out of the box.

That's where PulseAudio comes in, doing the multiplexing in software, regardless of your sound card / driver situation.

Without this functionality, if you were say, using ALSA directly sans-PulseAudio, with a sound card that had poor PCM multiplexing support on Linux, you would only ever be able to hear sound from one application at a time.

E.g. if you had a video playing in your web browser, and received a notification in Pidgin, you would not hear the notification sound because your web browser would already have control of your sound card.

By routing all sound through PulseAudio first, this problem is avoided.

Source: A long IRC conversation I once had with the Ubuntu maintainer for ALSA, where I asked them the exact same question you're asking now.

4
  • 8
    Thanks @Zee! That's a good answer! However I read this alsa-project.org/main/index.php/Asoundrc and I see that I can achieve exactly the same with ALSA configurations, using "plugins". I tested it and I was able to play multiple instances of aplay in the same time. So my question still remains, why do I need Pulse Audio, if I can do this all with ALSA:)?
    – Michael P
    Commented Dec 21, 2015 at 20:21
  • 6
    Hey @MichaelP, glad to help. The reason PulseAudio is still useful is because you may have multiple audio servers running, not just ALSA. For example if somebody is doing audio editing work they'll often use the JACK audio server for that, which is better suited for low latency audio work, but still use ALSA for general audio. That may not apply to you, but PulseAudio means you don't have to worry about how it all works. If you configure it for just ALSA, you'd have to configure each use-case separately. PulseAudio works WITH Alsa, and any other audio source you might ever use. Commented Dec 23, 2015 at 0:51
  • 2
    That being said, PulseAudio well may not be especially helpful to you specifically, but generally non-barebones distros configure it for you out of the box, so there's no real reason to replace it with an ALSA plugin. If you're running a distro like Arch where you have to configure everything yourself from scratch, by all means, use the ALSA plugin instead. Commented Dec 23, 2015 at 0:54
  • 1
    Thanks @Zee Alexander, that settles all my confusion. Thank you for the answer. I wish PulseAudio would explain it that well on their website.
    – Michael P
    Commented Dec 23, 2015 at 18:31
8

Since introduction of Dmix in alsa, pulseaudio turned to be useless. Bare alsa with Dmix somehow enabled deep inside (I haven't have to set anything) works much better for me. For example, there is no delays while a sound level is being changed.

Just uninstall pulseaudio if you are using recent alsa and feel fine.

5
  • 3
    Just had this popping problem, uninstalled pulseaudio and now everything sounds fine (playing from multiple sources works great as well). Alsa driver 4.4.0-104, utils 1.1.0
    – klogd
    Commented Mar 22, 2018 at 11:37
  • 3
    WTaF. Then why do distros still enable the pulseaudio multiplexing daemon? It is laggy, buggy AF and has been the culprit behind too many sound problems! I disable the daemon rather than uninstalling the entire package, since there are dependencies with ALSA configuration, which the package does seem to do well. Commented Jan 1, 2019 at 0:37
  • 1
    @DominicCerisano the issue is possibly that various applications need pulseaudio libraries, so it's not entirely up to the distros. Firefox had ALSA support disabled completely at some point and Terraria also didn't work without it.
    – sezanzeb
    Commented Sep 6, 2020 at 9:46
  • 1
    I had this weird problem with pulse audio, basically for some reason it was changing my volume levels when i switched application. Anyway this one day it got confused about which application i was using and turned the volume to 100% and damaged a load of audio equipment. After that i uninstalled PA, and never looked back.
    – Owl
    Commented Apr 23, 2022 at 2:16
  • 2
    @sezanzeb, given a choice between having to use PA for firefox, i'm just going to stop using firefox and find something else.
    – Owl
    Commented Apr 23, 2022 at 2:24
7

You don't. It's a piece of middleware that for most users is completely unnecessary. Most applications that need audio can use ALSA directly just fine. ALSA can handle things like basic multiplexing perfectly well (although it might possibly need a plugin). On my system, I don't have pulseaudio installed and I can play a video game and have music playing in the background from Rhythmbox, no problem. It works right out of the box with ALSA, no intricate setup required.

I would recommend to anyone that is experiencing any audio-related problems at all: first thing to try is tear out pulseaudio. I had some audio issues myself recently, took it out and they went away immediately.

Tbh, it's hard to think of a case where someone would actually need pulseaudio. For a 'typical' home system user that just wants the sound to work with their desktop applications, ALSA by itself is perfectly suitable. For a more advanced user that wants to do more complex audio tasks, or someone who needs professional quality audio, JACK is clearly what you want. Pulse, imo, seems to be rather bloaty and superfluous.

1
  • 2
    Agree, problems with sound went away after removing alsa-plugins-pulseaudio package in Fedora Commented Mar 19, 2021 at 11:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .