Saturday, September 5, 2009

Fix Most Audio Problems: Remove PulseAudio

Many audio issues in Ubuntu can simply be solved by eliminating PulseAudio. The Mini 9's Skype problems are PulseAudio's fault.

PulseAudio is a sound server, a background process accepting sound input from one or more sources (processes or capture devices) and redirecting it to one or more sinks (sound cards, remote network PulseAudio servers, or other processes).

One of the goals of PulseAudio is to reroute all sound streams through it, including those from processes that attempt to directly access the hardware. What it really does is get in the way, delay sound, improperly fix and make audio in Linux a bigger mess. PulseAudio may have potential and offer some great audio features but for me it is not worth the headaches. I don't need advanced features and networked audio, I simply want to watch videos, listen to music and talk on Skype without problems.

To completely remove PulseAudio in a terminal type:
sudo apt-get purge pulseaudio

This will uninstall PulseAudio, delete the configuration files and uninstall it's dependencies; gstreamer-10-pulseaudio, libpulse-browse0, libpeexdsp1, pulseaudio-esound-compat, pulseaudio-module-udev, pulseaudio-module-x11, pulseaudio-utils, and rtkit.

Reboot your machine and enjoy working audio. Not having PulseAudio installed makes using Skype as easy as starting the program. You still need to turn on the mic and setup the correct audios devices.
- Select alsa for for all options in /system/preferences/sound
- If you need help or have issues refer to the Ubuntu Wiki page on PulseAudio.

If you ever want to go back to using PulseAudio you can reinstall it by typing in a terminal:
sudo apt-get install pulseaudio

Feel free to bash PulseAudio in the comments and let everyone know how your audio quality improved.

Have a question or problem that this article doesn't cover?
Ask our Ubuntu Mini 9 Google Group for help.

48 comments:

Aubrey Island said...

"I simply want to watch videos, listen to music and talk on Skype without problems."

-- But, can you still do all those AT THE SAME TIME once you remove Pulse Audio?

redDEAD said...

Aubrey Island,

Yes I can, but why would I? I don't have ADD.

Aubrey Island said...

Haha, well I like to listen to music, but also want to hear my Pidgin notifications.... :P

redDEAD said...

Pidgin sounds work while listening to music, playing a video or watching flash.

No PulseAudio needed.

diazsp said...

this didn't fix skype on my Mini 10v ... too bad :(

Aubrey Island said...

Me too, and Skype worked :D

anjilslaire said...

awesome, it's coming off the mini shortly. thanks

Anonymous said...

first : thanks, your blog is very useful
2nd : sorry for my English, not my 1st language...

It has nothing to do with the topic, but did you try to improve Jaunty's video performances? I tried this :
http://ubuntuforums.org/showthread.php?t=1130582
and it works well, not splendid but satisfactory

redDEAD said...

I tried the guide and it didn't improve graphic performance enough for me to write a guide.

Craig said...

I may be wrong but doesn't skype 2.1 (beta)need pulse audio?

Thanks

Anonymous said...

If I try "sudo apt-get purge pulseaudio", the shell tell me "those package will be removed: pulseaudio* ubuntu-desktop*"

Ubuntu desktop? What did he means? My opinion is that this is no good...

redDEAD said...

Craig,

Skype 2.1 Beta does not depend on PulseAudio, it has PulseAudio integration.

It will work fine without PulseAudio.

redDEAD said...

Anonymous wrote:
Ubuntu desktop? What did he means? My opinion is that this is no good...

Thats the problem, it's your opinion not good advice. ubuntu-desktop is a meta package, it points to other packages to make up a system or group. By removing ubuntu-desktop you do not break your system or harming it in any way.

What you are doing is telling apt that you are no longer running a standard ubuntu desktop and that meta package pointing to the other packages is no longer needed.

A simple Google search would have told you this.

Anonymous said...

Ok, thank you for your answer: I've tried to take a look with Google, but I haven't find nothing interesting for my question, so I've decided to ask to you for a correct and clearer indication. Now I can remove the package without any fear.

pvsage said...

I tried purging PulseAudio on my Mini 9 running UNR Jaunty, and it made audio worse; also broke the UNR top panel.

It works a treat in UNR Karmic!

Anonymous said...

Long time Ubuntu user here. I DO recommend removing pulseaudio too. There's always some app having problems with PA - be it skype, games, wine. ALWAYS. And delays can be up to 1.5 sec! (like in wine). Idea behind PA is good, but I'm sure Ubuntu did the worst jobs integrating PA in the distro. Audio and video are just too advanced issues to be done the proper way by Ubuntu devs. Either remove PA in Ubuntu, or change distro (or accept audio problems).

SigmaBeta said...

Unfortunately, it seems like uninstalling pulseaudio breaks sound completely in karmic. The sound preferences menu won't even launch without it... so you can't pick another sound device.

Smiff said...

removing pulseaudio broke audio on my mini9 running mint7 (e.g. missing any options in the three skype device menus, just blank!)
however, after reinstalling pulseaudio, i now have skype call recording working for the first time.. not sure why, but probably going to leave pulseaudio for now. agreed that its way too complicated, too many mixers, too many sliders, what a mess. (also for some reason running purge on pulseaudio did not remove any other components)

Red Onion said...

I think you can get around most sound issues by just wrapping the offending application with "aoss" and/or "padsp" so that they will play nice with pulseaudio.

The problem isn't all pulseaudio's fault, but its that certain application are written directly for a particular sound interface.

Xaq Fixx said...

Having the same issue with wiping PA in Karmic as Red Onion. You wipe it and there is some audio, but no way to control the volume, or even open the Sound Preferences. Opening Sound preferences before wiping PA does not give you the option to select ALSA.
PA is still terrible and makes Open Arena unplayable, killing PA makes listening to anything impossible.

Xaq Fixx said...

Sorry, it was SigmaBeta, not RedOnion. Keep up the great work on this blog.

redDEAD said...

try installing alsa-mixer to control sound

Marc said...

Do "sudo apt-get autoremove" afterwards to completely remove it. Much better without it... Thank you!

/amaneiro said...

worked for me pretty good

I have to "uninstall" also the metapackage ubuntu-netbook-remix. Actually, it haven't uninstalled something but just be marked as not being in the system because pulseaudio is missed too.

Andrew said...

Thanks for this. I could find no way
of making pulseaudio work atall, and I followed up the suggestions on many different forum pages.

Anidel said...

works better for me as well after removing PulseAudio, only thing that sucks is the log-in ubuntu sound... it's not fluid anymore..

but well, i'm going to remove it anyway.

Steve B. said...

The sound preferences applet in Karmic is different than in 9.04 and doesn't provide a drop down menu of device chioices (e.g. ALSA, PulseAudio). How do you choose ALSA over PulseAudio in Karmic?

Anonymous said...

see: How to remove PulseAudio and fix sound with ALSA and ESound

http://forums.linuxmint.com/viewtopic.php?f=48&t=32725

sudo killall pulseaudio

cp /etc/X11/Xsession.d/70pulseaudio ~/

sudo apt-get purge pulseaudio

sudo apt-get install -y esound esound-clients esound-common libesd-alsa0

sudo reboot

Anonymous said...

QOUTE: "I simply want to watch videos, listen to music and talk on Skype without problems."

If you want to enjoy music and Skype working perfectly, you may try OSS4.
The exact howto is here:
https://help.ubuntu.com/community/OpenSound

Check first, if your soundcard is supported by OSS4.

The theory is here:
http://en.wikipedia.org/wiki/Open_Sound_System
http://insanecoding.blogspot.com/2009/06/state-of-sound-in-linux-not-so-sorry.html

To get info about your hardware run this command:

lspci -v

for Skype, you need skype-static-oss from Medibuntu

Anonymous said...

http://ubuntuforums.org/showthread.php?t=1229804&page=3
Temüjin: "Removing pulseaudio is okay for now, but GNOME is becoming increasingly dependent on Pulseaudio. In Ubuntu 9.10, it's a real challenge to go without PulseAudio (I run an Ubuntu 9.10 with OSS4 and the volume control and sound settings dialogs don't run without it.)"

Katalog: "... they will at least make it more difficult, to fall back on ESound any more."

Anonymous said...

Seriously.... Quit blaming pulseaudio for all of these issues. The underlying problem in 99.9% of cases is ALSA or ALSA-related. Before uninstalling pulseaudio, try upgrading to to the latest ALSA (currently version 1.0.21). There is a script that makes upgrading ALSA so easy that practically anyone can utilise this updated version of ALSA. Have a look at this post from soundcheck on the Ubuntu forums for the script.

http://ubuntuforums.org/showthread.php?t=1046137

redDEAD said...

I disagree pulse sucks, I dont need the extra layer. I Skype and listen to flash content on the mini 9. Since I left pulse I havent had any problems.

Anonymous said...

That "Seriously...." means that it will be impossible to remove PulseAudio from any sort of Ubuntu in the near future.
They are seriously building a kind of Berlin Wall to prevent a massive escape from PulseAudio. It is a trap, my friends.
http://en.wikipedia.org/wiki/Berlin_Wall

PulseAudio is a security risk, first of all.
http://www.theregister.co.uk/2009/07/17 ... l_exploit/
QUOTE: "The exploit works only when a security extension knows as SELinux, or Security-Enhanced Linux, is enabled. Conversely, it also works when audio software known as PulseAudio is installed."
http://www.theregister.co.uk/2009/07/24 ... economics/
http://www.google.com/search?q=linux%20 ... 8&oe=UTF-8

antiX might be an ideal solution for netbooks
http://antix.mepis.com/index.php/Main_Page
It is a rolling release
http://en.wikipedia.org/wiki/Rolling_release
Install (with Synaptic) ESound, Adobe Flash with plugs, Skype, and reboot.
Everything works "out of the box" with default settings.
antiX has ALSA inside, not OSS4, and, nevertheless, sound seems to be much better than with Ubuntu or Mint
http://antix.freeforums.org/post12648.html

Anonymous said...

The missing links:
http://www.theregister.co.uk/2009/07/17/linux_kernel_exploit/
QUOTE: "The exploit works only when a security extension knows as SELinux, or Security-Enhanced Linux, is enabled. Conversely, it also works when audio software known as PulseAudio is installed."
http://www.theregister.co.uk/2009/07/24/botnet_economics/
http://www.google.com/search?q=linux%20botnet&ie=UTF-8&oe=UTF-8

6p00d8341c214553ef said...

careful. I did the removal on my Dell Mini 10 and after reboot got this: "usr/bin/f3507g_autosuspend: didn't find any MBM modules to handle" Had to boot from DD (glad I bought an external DvD player and reinstalled. Still getting the error. am researching the modle I need to reinstall and try and fix. if anyone has any tips then let me know

Matt C said...

Removing pulseaudio causes the wireless device to stop working in my Inspiron mini, ubuntu 8.04

Do not remove pulseaudio. It has been incorporated into the distro in a non-reversible way.

If you do not want pulseaudio, I recommend using another distro or not purchasing a mini.

Anonymous said...

Hi 6p00d8341c214553ef!

I is not really clear what you did, and, therefore, it might be difficult to help.
Why not install another Ubuntu in dual boot on the same box (for experiments, 10GB is enough)?
What is your soundcard?
(in this format: lspci -v )
In a word, the Russian hackers have already successfully removed PulseAudio from Ubuntu 9.10 Beta.

redDEAD said...

It is not often that I call people out in the comments but Matt C your completely wrong.

You can remove pulse audio, most people just have to run the purge command, if you experiencing problems install alsa. Pulse Audio is integrated in Gnome but Gnome can and does work fine without Pulse.

try:

sudo apt-get alsa-base alsa-utils alsa-oss linux-sound-base

Anonymous said...

Hi redDEAD !

In Ubuntu 9.10, you have to fix something after the removal of PulseAudio.
These two things:

gnome-sound-properties
asoundconf-gtk

It is not difficult. You have to borrow something from Ubuntu 9.04.
Read this:
https://bugs.launchpad.net/ubuntu/+source/asoundconf-gtk/+bug/378675

Anonymous said...

I couldn't hear a thing before attempting this fix, and now my sound is back to normal. Highly recommended, worked perfectly for me!

Anonymous said...

IMHO, the PulseAudio installation was not ready for "prime time" in earlier Ubuntu distributions (e.g. Hardy, Intrepid). Sound was inconsistent at best. I've heard that the problem was with the implementation of PulseAudio in those Ubuntu distros, not with PulseAudio itself...but regardless it didn't work properly "out of the box".

Without going into details, in my Intrepid distro, I have removed it and using esound.. and my sound is now fine in all applications.

I've seen indications from various posts that PulseAudio in the new Karmic distro is much better, but have not confirmed this myself.

Regards,
John

Caga Regras said...

I did remove Karmic Koala's PA and solved my problem. A big thanks!

Anonymous said...

Drat! I just removed Fedora and installed Ubuntu to try to get away from pulseaudio.

I'm off to try Suse now to see if it works better.

chlem said...

Same here. The volume keys on my laptop weren't working, Totem had no sound at all, and no volume control was present in gnome. I'm running Ubuntu 9.10, all I did was install esound. It uninstalled automatically some PA components and now everything works perfectly. PA is poor.

Anonymous said...

It is very simple!!!

To enable Gnome Volume Control Applet you have to install a few deb-packages from "audiohacks PPA" repository
https://launchpad.net/~dtl131/+archive/ppa

The instruction is here:
How to enable Gnome Volume Control Applet on Ubuntu 9.10 after the removal of PulseAudio
http://n2.nabble.com/Re-Ubuntu-s-switch-to-pulseaudio-broke-accessibility-for-the-blind-td4073697.html#a4073697

How to remove PulseAudio from Ubuntu 9.10
http://n2.nabble.com/Re-Ubuntu-s-switch-to-pulseaudio-broke-accessibility-for-the-blind-td3886061.html#a3886061

Rishab said...

the 1st method really worked..thank you very much..sound is now working...startup sound is also proper.

mdrake36 said...

This article just knocked it out of the park. Purged PulseAudio and low and behold I can now lock down Memory for RT kernal Audio apps.
Before reading this article I was so for up the Kernels Arse I could have hunted Jackalope in the outback? Give this dude an award for being candid. Rock on wit your bad self.

mdrake36 said...

The purge pulseaudio worked like a charm on an old Compaq Presario to gain RT kernel memlock priority