Posted by: tycheent | March 31, 2009

To PulseAudio or Not To PulseAudio . . .

The last few releases of Ubuntu have left me scratching my head, and not just because of dandruff.  The Developers and MOTUs for Ubuntu have seen fit to add PulseAudio to the audio stack.  And I do mean add it to the stack.  It sits on top of Alsa and attempts to manage the way people use their audio.  And yes, it sits on top of Alsa, not replaces it.  Alsa is still there and functioning properly.

But then, PulseAudio comes in and makes further decisions about what’s available and what you can do with it.  This might not be too bad, except that PulseAudio STILL hasn’t reached 1.0.0 state.  It has been functionally broken since it was first put into Ubuntu and activated by default, and it remains so, today.  Originally, one could find PulseAudio in the Sessions Boot Start-Up, and turn it off.  Likewise on could remove it from the services that are run.  Now, however, it’s rather well hidden.  Somewhat in the manner of a Microsoft activity that someone is ashamed of.

My disgust with the fact that PulseAudio was arbitrarily relegating my audio to monaural, despite the abilities of my sound card, caused me to file the following bug report on March 30.

==========

Bug #352164

PROBLEM:  PulseAudio is unable to determine basic information about my sound system, despite the fact that the information is readily available.

System is a Dell Inspiron 530N
Processor – Intel Core2, 1.60GHz
Memory – 1 Gig
Video Card – NVidia GeForce 7300LE
Sound Card – Intel 82801I (ICH 9 family) HD Audio Controller
Operating System: Ubuntu 9.04 Beta (Jaunty Jackalope)
Linux Kernel – 2.6.28-11-generic
This system is up-to-date with package updates as of March 30, 2009, 10:54 PM Mountain Standard Time (UTC -7), or April 1, 2009, 05:54 UTC

This card is capable of AT LEAST 44100 Hz sampling and AT LEAST 5.1 Surround Sound.  Yet what I get from PulseAudio (via the system log) is:

Mar 30 16:18:51 tyche-jaunty pulseaudio[3270]: alsa-util.c: Device hw:1 doesn’t support 44100 Hz, changed to 22050 Hz.
Mar 30 16:18:51 tyche-jaunty pulseaudio[3270]: alsa-util.c: Device hw:1 doesn’t support 2 channels, changed to 1.

This is an unacceptable situation, made worse by the fact that it takes extraordinary measures  to turn off PulseAudio so that Alsa (which IS installed) can do it’s job.  Monaural sound, to someone listening to serious, Classical music is unacceptable.  Installing PulseAudio and initializing it by default is a regression of ability.  Installing it and initializing it by default then hiding any ability to kill it is Microsoft style thinking.  We are supposed to be better than that.

SOLUTION:  Stop initializing PulseAudio by default.  If people want to install it and use it, it should be a choice.

==========

My purpose in publicly voicing my contempt for PulseAudio as a “sound manager” is to draw attention to the fact that, in all this time, it STILL is functionally broken to the point that use of it constitutes a regression in the ability of my system to produce reasonable and pleasing sound.  And no, this is NOT the first time that I’ve filed a bug report or question with Launchpad on this subject.  I grow rather tired of being ignored when I suggest that it not be activated by default.  With something like this that lacks the functionality that people need and want, it should be up to the individual to make the choice of whether or not to use it.  Activating it by default is unconscionable.  Activating it by default and hiding it, to make turning it off an extremely difficult procedure for the uninitiate goes beyond that into the sort of thinking that have moved people away from Microsoft operating systems.

So, I ask once again – and publicly.  Turn it off.  Provide a means of allowing the individual to turn it on IF THEY WISH.  But please don’t foist broken applications on an unsuspecting public and uninitiate new users simply because it’s the “new thing”.

Oh, and for those of you that are stuck with it running, and can’t find a way of turning it off, enter “killall -9 pulseaudio” into the Sessions and reboot.

killpulseaudio


Responses

  1. In between Fedora 7 or 8 (I mean after first Fedora when PA was added) some changes has been made to PA and then PA has been broken.

    In openSUSE these changed came in 11.1.

    Crackling, skipping, high CPU and/or memory usage.

    Cauchemare!

    Again, I can’t get my microphone to work. I don’t even think about “skyping” :/ .

  2. Oh, and that’s for sure not tsched question. I tried make it =0 and it was even worse.

  3. I always just uninstall it. Even just having libpulse installed seems to mess up audio for me.

    I’m currently working on a remix of Ubuntu Jaunty and pulseaudio is one of the things that never had a chance of making the cut.

  4. Dude, you have no clue.

    Your primary sound card is probably at alsa index 0. Those warnings above are probably just your modem — it’s some sound card at ALSA index=1. Modems usually are mono and can do only 22khz because more is not possible over the phone line anyway.

    PulseAudio takes what ALSA gives it. So if ALSA says 1ch/22khz is the best it can, pa agrees to that. What else should it do anyway?

    So please, shut up and redirect your complaints against ALSA. Thank you very much.

  5. And yes, it sits on top of Alsa, not replaces it.

    Of course. ALSA is a collection of drivers, and an interface to those drivers. PA is a sound server and has nothing to do with drivers.

    IMHO, PA is the best thing to happen to Linux audio in a some time. And it works fine in Debian, though it is not (yet) installed by default.

    Oh, and there is no reason to kill it like that, if you don’t like it, it is easy enough to aptitude remove.

  6. I’m curious, why is it needed Pulse Audio?
    I mean, why not simply using Alsa?
    Another thing not very clear to me… is pulse audio used in kubuntu? If not, why?

  7. I wasn’t happy about the development status of pulseaudio either – I had to live with a 2 channels configuration in Intrepid for almost 6 months because of a bug, even though I have a 5.1 system.
    But in a bug free system, the benefits of it are amazing – I have a USB headset and with pulse, I can determine on the fly which application outputs to which sound device.
    As for your hardware problem: are you sure that error message is talking about your sound card? I get the exact same message because of a webcam with a built-in mic. Have you tried setting up the 6 channels in the /etc/pulse/daemon.conf file?

  8. I’ve always wondered why we need pulseaudio. Most of my applications have built in volume control anyhow, adding another layer to ALSA, groan.

  9. That’s why I use Windows.
    Zero problems with sound since 1991.

  10. In response to blah:

    “PulseAudio takes what ALSA gives it. So if ALSA says 1ch/22khz is the best it can, pa agrees to that. What else should it do anyway?”

    NEGATIVE. Alsa accepts 44100 and 5.1 surround sound. PulseAudio doesn’t understand that, and trims it back. Also, why in the world would you think that PulseAudio is reading the MODEM???? That doesn’t make sense. In any case, I’ve had GOOD stereo on this same machine ever since I got it WHEN PULSEAUDIO WAS NOT OPERATING.

    Please, if you’re going to discuss an issue, please use some logic in your reply. Otherwise, you might end up deleted or considered spam.

  11. In response to those who think I may be in error:

    Yep. It’s possible. Which makes it even more imperative that it only be enabled by choice, or have a MUCH better method of configuration. I am not a developer/programmer/MOTU – I am a simple user. In fact, I tell people that I’m a perpetual n00bie. To expect the casual user to jump hurdles just to make something work is a bit ridiculous. In addition, this is only the FIRST bug I found on starting Jaunty Jackalope Beta. I haven’t even addressed the possibility that it STILL does not support MIDI creation (it hasn’t before, though it DID at one time support 44100 sampling and multi-channel).

  12. Uh, no, that’s not how you stop PulseAudio. Pulseaudio has a command for clean shutdown: pulseaudio -k

    Also, in Jaunty, it autospawns when needed for sound. To disable this, change the autospawn = Yes line in /etc/pulse/client.conf

    If you want to use straight ALSA, don’t forget to add your user to the audio group in /etc/group

  13. Hello,

    Please do some basic research before directly flaming developers and insulting (“garbage”) the result of years of work. Lennart Poettering, and other developers, have already explained that, though PA has its own issues, it is _not_ to be blamed alone: linux distributions (and especially Ubuntu) failed at properly integrating it (1). The PA wiki has an extremely detailed entry (2) on correctly setuping the thing, and getting around known issues.

    I do some music and have been successfully using my music workstation and my laptop with lots of weird concurrent PA + JACK audio stuff after a correct setup. Ubuntu default config just deserve some more lovin’

    So -please- stop bashing PA and be more sensible about your flames / bugreports.

    @giordano: the wikipedia entry (3) is a good starting point to discover the wonders PA can do.

    (1) http://0pointer.de/blog/projects/jeffrey-stedfast.html
    (2) http://www.pulseaudio.org/wiki/PerfectSetup
    (3) http://en.wikipedia.org/wiki/PulseAudio#Features

  14. Would it be easier like this:

    sudo mv /etc/rc2.d/S25pulseaudio /etc/rc2.d/s25pulseaudio

  15. A regular user/noobie poking in the system log and making assumptions based on that? That does not compute. And yes, it is likely your data is coming from something else, including a modem, webcam or other.

    That said, pulse does seem to have unusually many problems for the Ubuntu devs and even the pulse devs state that Ubuntu aren’t following the howto’s – if that is true, why can’t they just ask for help getting it right?

    Pulseaudio is not finished no, but it is fantastic – and I say this while I still have some bugs with scratching. Yesterday I plugged in my PS3 Guitar Hero World Tour USB microphone and asked pulse to use that as input. It just worked. Too bad the Bluetooth easy config GUI isn’t there yet, but my BT headphones with mic and high quality base also just work when I’ve paired the normal way and then transfer sound. Pulse is the shit and we should all work hard to iron out the bugs instead of kill -9 it in the session (dude, aptitude remove)…

    Again, I think Ubuntu devs should swallow some pride and ask upstream for a bit of help though.

  16. Stoffe:
    The thing the PulseAudio devs are unhappy with Ubuntu about is that our kernel has VERY high latency because we don’t use PREEMPT. It was disabled a few releases ago so it’d stop killing battery life on laptops. Anyway, PulseAudio’s “Glitch-Free” mode is only glitch-free on drivers that are *already* glitch-free and on very low-latency kernels. Essentialy, it does just-in-time fills of the buffer, so that it fills less often, but if you’ve got too much latency, it’ll pop & click like an old record player. Ubuntu has, thus, disabled “glitch-free” mode to avoid the pops & clicks.

    Also:
    Please note the line about “only on drivers that are already glitch-free.” There are many ALSA driver bugs that have existed for a very long time but for which there was no reliable testcase until PulseAudio came along. PulseAudio is, in many ways, acting as a test suite for ALSA.

  17. use kde so phonon is just working. You don’t have to fight to have the sound working. It’s simple and effective as it should be. Pulseaudio is a pain in the ass. The last three months I helped at least 4 differents new user to solve audio problem because of PA.

    For the windows user. we don’t care keep you cursed OS. I’m calling cursed because when it crash, and it’s often, you have basically no possibility to know why for a normal user. And the most used solution to solve windows problem is not to kill a service but just to re-install the system entirely…

  18. Claudio:
    PulseAudio does not run system-wide in Ubuntu. It runs per-user-session.

  19. In response to ronj:

    I’m not calling out the PA devs, in particular. I’m reaming out the Ubuntu developers/MOTUs for having put it in and turned it on by default, then hidden it so that the ordinary user couldn’t turn it off easily.

    I will agree that PA has had issues. I’d just like to see them solved before it’s put into a distribution.

  20. That’s harsh…

    @Todd Partridge : To make an attempt at an analogy; [PulseAudio] is like controlling your lights with a remote control, instead of having to go to each and every light switch.

  21. Most of the linux core functionality, like video/audio servers, desktop enviroments or drivers sucks. Not to mention overall quality of available applications. Such an lame software simply cannot compare to Windows Vista or Seven.. And that is a fact, not flame.

  22. If it was necessary that all bugs were fixed before software releases, there’d never be releases. Haven’t you heard of “release early, release often”?

    By the way, I *do* intend to pester the kernel team at UDS to turn PREEMPT back on.

  23. In response to 6205:

    I would disagree with you, but you appear to be a dedicated Microsoft fan and anything I might say would just go past you. You are more than welcome to stay with Microsoft, if you chose. I chose not to.

  24. In response to Mackenzie:

    Yes, I’ve heard of “release early, release often.” I’ve also heard of Quality Assurance. When something so affects the functionality of an application, service or other, then it should be down-checked by QA. How such a thing got past the Ubuntu QA is beyond me, unless they were only looking for things that crashed the system instead of whether or not a functionality worked as it was supposed to work.

  25. In response to Stoffe:

    The people involved in Ubuntu audio work *are* working with the appropriate upstreams, be they ALSA/Linux, PulseAudio, Phonon, GSt, Xine, Debian, what have you. Ubuntu has a distinct schedule that doesn’t favour inserting new (frankly, required) versions of software like ALSA-lib 1.0.19 and PulseAudio 0.9.15* past the FeatureFreeze date. This schedule places serious constraints on what options can be enabled in linux, what features are available in ALSA-lib, and which versions of PulseAudio, etc., can be included.

    Luke and I understand the gravity of this situation. That’s why Luke has a PPA offering ALSA-lib 1.0.19 and the latest released snapshot of PulseAudio 0.9.15.

    In response to tycheent:

    It might be useful to know that there is *one* Canonical-employed Ubuntu developer (Luke) working on (in Ubuntu) audio integration and accessibility (a11y), supporting Ubuntu Studio, maintaining the linux-ports tree, and doing a shedload other things.

    There is *one* other non-Canonical-employed contributor working on (in Ubuntu and all its derivatives that choose to take part) audio integration. That would be me. I take audio bugs seriously. Hardy had a lot of integration issues. I’ve worked my butt off *in my spare time* to make sure that doesn’t rear its ugly head again in Jaunty. A post-Beta linux update resolved significant stability issues, and I have a plate of remaining issues (BT, ~/.pulse* horkage, …).

    So let’s get to the heart of your issue. As the fourth responder said, it’s highly probable that hw:1 isn’t your onboard, which I presume is your “HDA”. I’ve asked for additional information in the bug report. Please attach it, and I’ll look at it when I return from travel.

  26. In response to Daniel:

    Per your request (I got the Launchpad request first, but that doesn’t matter), I ran the script. It errored out at line 298 (it didn’t like the -e flag at line 293).

    Also – I commend you on the amount of work you have taken on yourself in your spare time. However, that does not account for the fact that PA was put in Ubuntu 9.04 in a non-functioning condition (as far as I’m concerned).

    A further “also” – Back when PA was first introduced and available for download and installation from the repositories, prior to it’s being installed by default, I checked it out. Many things would not work with PulseAudio, including the ability to create MIDI compositions. Furthermore, jackd reported that it would only allow 22050 sampling and only 1 channel. I have no reason to believe that is any different now, since the same condition was true through all the default installations prior to Jaunty Jackalope. (I didn’t bother checking beyond the basics this time, because I felt it was a waste of time if the basics weren’t right).

    Back to the script. If you can let me know, in Launchpad or here, or in IRC or email, how to fix the script to run, I’ll be happy to run it and attach the results to the Launchpad bug report.

  27. Hello,

    Is the picture you taken from the São Miguel island, from the Azores archipelago?

  28. I was referring to the picture you have in the header of this site ;-)

  29. Hello,

    Is the picture on the header of this site of São Miguel island, from the Azores archipelago? I’m from there, it makes me feel homesick ;-)

  30. Many users (including me) have come to distrust the *buntu release system because of the 6-month cycle. Debian releases “when it’s ready”. The KDE4 fiasco is another display of recklessness. When will *buntu learn: the 6-month schedule is becoming a millstone. Get rid of it. If it isn’t ready, don’t release it.

  31. Tiago,

    The picture in the header is part of the WordPress theme, not one that I took. I have no idea where it was taken. I’m sorry I couldn’t help you more. If it means anything to you, I liked it, too, which is why I chose this theme. It’s very peaceful and relaxing.

  32. In response to tycheent:

    I stated that you need to run the script explicitly with bash. You ran it with sh, which, as of Ubuntu 6.10, is dash, not bash. I pointed this out in the bug report.

    Run it using “bash /path/to/wherever/you/saved/alsa-info.sh –no-upload”. You should not be root or use sudo.

  33. PulseAudio is awesome, if it works. Luckily I haven’t had any problems with it. :)

  34. I also have a Dell 520N and have had lots of trouble with PulseAudio. To try to remove it takes out Ubuntu-Desktop! In earlier and other Linux OS I found sound was only machinegun chatter until I found and removed PulseAudio.
    It’s a reason to keep trying non-Ubuntu distros.

  35. In response to Daniel:

    The file has been uploaded. Oh, and BTW, considering the extreme lack of knowledge/experience I have with shell commands, I had no idea that it was NOT a bash command. I since followed your suggestion and it ran.

  36. It is pretty common for Ubuntu and Gnome to include ‘the next greatest thing’ before it is even half-baked thus breaking a lot of user systems. That is bad practice and might be the biggest problem that Ubuntu does not even realize they have.

    If PA were to be good and stable and at least as functional as esound on 99% of the systems in 9.04, then and only then should it be enabled by default in 9.10. If it is so good that most users install it right after setting up their new system, then and only then consider it to be a default for the next release.

  37. In response to Ridgeland:

    I have looked at other distributions in the past. However, I’ve been an Arizona Team member since August 14, 2007, an Ubuntu member since February 21, 2008. I’d hate to just walk away from the amount of work I’ve put into the community. I’d rather see Ubuntu become the distribution it’s capable of being. Unfortunately, incidents and experiences like I’ve had with PulseAudio tend to make me wonder if that will happen.

  38. Quoting blah:
    Your primary sound card is probably at alsa index 0. Those warnings above are probably just your modem — it’s some sound card at ALSA index=1. Modems usually are mono and can do only 22khz because more is not possible over the phone line anyway.

    Who is 100% CORRECT

    hw:1 is your USB audio device built into your webcam. PulseAudio is fine, and you are wrong.

  39. OK fine, 90% correct. He guessed modem instead of webcam. But he’s right about it not being your onboard sound.

  40. Amen bro.

    I’ve had it with pulsecrapaudio. It brings nothing but problems whereas Alsa runs my 5.1 surround sound via digital output with no problems! AND I can play Wine games with low sound latency, listen to music, without any crackling whatsoever.

    Network sound? Don’t need it that much, sorry!

  41. tycheent: Thankyou. Your efforts are appreciated.
    Walking away doesn’t help linux at all.

  42. @Mackenzie

    I said webcam, where do I get my prize? =)

  43. [...] A. Eddy: To PulseAudio or Not To PulseAudio . . . Craig looks at the issue that is PulseAudio, along with info on how to get rid of it if you [...]

  44. Great post, you got it all right in pulse audio. It’s a piece of shit and ubuntu’s work in implementing pulse audio in its system is a joke.

    What you miss is that ALSA is also not very good. The linux audio stack is a ridiculous mess. Absolutely ridiculous. It’s an accumulation of projects that have no direction, no standard apis, no proper documentation, no nothing. Programming anything that uses audio in linux is a nightmare.

  45. In the soon to be released Mandriva 2009.1, PulseAudio (9.15) is now working great. One of my bugaboos was the inability to use my SPDIF/IEC958 output through PA. That is now fixed and I can easily use PA to switch between IEC958 through my stereo and the cheapo computer speakers on the fly. I have been using Linux since ‘96 and this is the way things go. New stuff starts out buggy and missing features but improves over time with dedicated developers and users willing to try things out and submit bug reports.

  46. I used to always have to tweak to get my external USB card to work right until Pulseaudio came along and made everything right. Also, having the ability to have multiple audio streams simultaneously is VERY important. Not because I want to listen to different audio sources at the same time, but because I want to be able to pause in one app and play in another without having to press stop or go to another web page.

    There are lots of people here complaining about Pulseaudio but there are also lots of people who have benefited from its inclusion. They don’t generally bother to speak up though because they are simply enjoying what they expect as a basic requirement of their OS. When you finally have your “just works” situation you quickly come to take it for granted and think about other things. That’s a good thing!

  47. [...] mejorar la velocidad de Firefox reduciendo el historial * Mono 2.4 y Monodevelop 2.0 disponibles * PulseAudio or not PulseAudio * Rapid Photo Downloader, importador de fotos para Linux * Nvidia libera nuevo driver para Linux 64 [...]

  48. Seconded.

    I have compiled 0.98.1 kernels. I have compiled gcc 2.4.5 on a 4Mb PC. I compiled jump table shared libraries using Eric Youngdale’s tools back in the 0.98 days. And I’m unable to rectify audio problems under Linux.

    The frustration of having to spend hours and hours to get a simple job done. Having Rosegarden play a few notes. Getting skype to work. The frustration of having the MIC turned on, later SOMETHING automagically screwing the MIC settings. The frustration of having to weed through a range of systems and subsystems and dito config files; an incomprehensible mess it is. hw:0,0, pulse, default, PnP USB device? I don’t give a damn, you NIH morons! I have only one audio device and I simply want to have it work! My frustration in getting a simple job done and encountering numerous incomprehensible problems on the way getting there is clearly showing.

    Quite frankly the fact that I have to troubleshoot audio problems at all is rediculous, Sound is a commodity, you NIH morons!

    I agree fully with the sentiment that the Linux audio system is exhibiting exactly the kind of problems I avoided MS products for, some 16 years ago. And sadly, this is not limited to the sound system.

  49. [...] The alsa module snd-intel-hda was constantly eating up about 30% of my cpu. Google pointed me in direction of blaming pulseaudio: linux.debian.bugs.dist tycheent.wordpress.com [...]

  50. Ubuntu is very dependent on Debian for getting working stuff. So, as the testing Debian Squeeze is structured, merging as Sid also, Ubuntu 10.04 will work better. Ubuntu 8.10 worked better because Debian Lenny was in testing at that time. So… :
    8.04 – very bad
    8.10 – working well because of Lenny in testing
    9.04 – very bad
    9.10 – very bad
    10.04 – working well because of Squeeze testing
    10.10 – very bad
    11.04 – very bad
    11.10 – very bad
    12.04 – working well because of Debian 7.0 testing
    12.10 – very bad

  51. In response to Silviu:

    I take exception to the idea that EVERYTHING in Ubuntu is that heavily reliant on Debian. True, a great deal does come from Debian. BUT, a lot of it is worked on by Ubuntu devs and MOTUs after it gets to us. Besides, Debian doesn’t drive the decision-making at Ubuntu. It’s the decision-making, in the case of PulseAudio, with which I take exception.

    I have said it before, and I’ll say it again: putting an app or service out in a release as a default when it still has serious problems does NOT improve the reputation of either the release or the distribution.

    To give you an idea of how serious the problem is, this ONE post, alone, gets about 50 hits per week. The people looking at this post, for the most part, come from search engines or other sites that have referenced this post. That tells me that it’s not just me that’s having problems with PulseAudio. And THAT tells me that it was put in as a default, with no easy way to pull the plug on it, without adequate thinking OR QA. And that’s what I’ve been trying to get the decision makers in Ubuntu to understand.

  52. Hi,

    Finaly got rid of Pulseaudio.Bys the way I like Ubunto. First time I ever laid my hands on it. Looks good. A hole lot easier than Debian
    /Niklas


Leave a response

Your response:

Categories