The Ultimate Ubuntu / PulseAudio Guide

Saturday September 20, 2008
After writing about how great Hardy was, I suddenly started experiencing mysterious crashes of various applications on my desktop.  That'll teach me to say anything nice about an operating system!  Firefox, Pidgin, Deskbar, and even the Gnome Panel would periodically freeze up.  It seemed particularly exacerbated by running applications in the Flash and AIR runtimes — which was pretty bad news, since I am supposed to be writing some code in Flex!

Eventually, I caught one of these programs in the act, and traced the buggy behavior down to the PulseAudio daemon.

Apparently this is a common problem, with a bewildering array of elaborate and perplexing "solutions".  I spent hours trying to figure out some kind of combination of ALSA and Pulse tools that would get me out of the increasingly crashy situation on my desktop.  Oddly, nobody mentions the most obvious solution:

"Turn it off."

While I can appreciate the benefits that Pulse will (eventually) bring, it seems that it doesn't actually do anything for me today.  The main idea is that Pulse will allow me to play and record multiple sounds simultaneously.  However, the out-of-the-box Ubuntu ALSA experience allows me to do this with my current sound card.  I don't pretend to understand why — maybe my card supports multiple channels, maybe things are using dmix somehow — but there is no problem to solve.  Running the pulseaudio daemon actually has the opposite effect: sounds from multiple programs stop working.

I wanted to remove the pulseaudio package, but it turns out that would remove the ubuntu-desktop package as well, which means everything will probably be broken (certainly when I do my next major upgrade).  So, here's an alternate and non-obvious way to turn it off, without any fancy configuration:
  1. Go to the "System → Preferences → Sound" in your menu.
    http://www.twistedmatrix.com/users/glyph/images/content/blogowebs/sound-menu-item.png
  2. Make sure none of the devices say "Pulse Audio"; they should all say "Autodetect", "ALSA", or something more specific.
    http://www.twistedmatrix.com/users/glyph/images/content/blogowebs/nothing-says-pulse.png
  3. Click on the "Sounds" tab, and make sure that the "Enable software sound mixing (ESD)" checkbox is un-checked:
    http://www.twistedmatrix.com/users/glyph/images/content/blogowebs/quote-esd-unquote-disabled.png
  4. Log out, and let it trouble you no more.
I got a little chuckle out of discovering the "ESD" footnote, but it turns out that really means "PulseAudio" these days.

Better luck next time to the Ubuntu audio team!  I look forward to using all these cool pulseaudio gadgets next time.  I hope skype, flash, air, and the dozen other proprietary-and-wrong audio apps out there get fixed before Intrepid hits the shelves.