How To: Completely remove PulseAudio & replace it with ALSA

Write tutorials here
More tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please, Before you post please read this

How To: Completely remove PulseAudio & replace it with ALSA

Postby mads on Thu Nov 25, 2010 9:07 am

The following How To was originally posted on the thread: Is Pulse Audio the worst tragedy in the history of Linux?

Please note:
This guide was written at the time of Gnome 2, and before the release of Gnome 3, MATE and Cinnamon.
- There is no reason to remove PulseAudio unless you are having some issues with it.
- This how to is only for LMDE users (tested with both 32 bit and 64 bit versions).
- Mint 10 users: Please refer to this guide. (The issue with volume control applet is resolved now.)


Completely remove PulseAudio & replace it with ALSA (LMDE):

A. Menu > Preferences > Startup Applications > uncheck "PulseAudio Sound System", PulseAudio Sound System KDE Routing Policy" and "Volume Control"
B. Menu > Administration > Services > uncheck "pulseaudio"
C. Remove pulseaudio, related packages and configuration files

Code: Select all
killall pulseaudio
sudo killall pulseaudio
sudo apt-get purge pulseaudio pulseaudio-utils gstreamer0.10-pulseaudio libpulse-browse0 paman pavumeter pavucontrol
sudo mv /etc/asound.conf /etc/asound.conf-bak
rm ~/.pulse-cookie
rm -r ~/.pulse

D. Install libalsaplayer0 package

Code: Select all
sudo apt-get install libalsaplayer0

E. Restart your computer
F. Right click Panel, select "Add to Panel" and add "Volume Control" to Panel


Here are some reasons why you might want to remove PulseAudio:

...this fix has made all of my sound issues disappear. Even running World of Warcraft in wine has less sound issues now for me.

...It solved the audio lag I had in veetle. Pulse gives fits for a lot of people.

...I removed pulseaudio and got rid of three annoying problems:
1) sound settings reset at boot even having alsactl restore at startup applications
2) mic working randomly
3) first call in Skype was always garbled

...Just what I needed to know. Got pSX working properly now.


Suggestions are welcome!
Last edited by mads on Mon Jul 08, 2013 3:07 pm, edited 14 times in total.
User avatar
mads
Level 6
Level 6
 
Posts: 1309
Joined: Wed Nov 03, 2010 3:44 pm

Linux Mint is funded by ads and donations.
 

Re: How To: Completely remove PulseAudio & replace it with A

Postby kwevej on Thu Nov 25, 2010 10:43 am

is esound really needed?
I purged PA a while ago, running without esound ... doesn't experience any problems.
User avatar
kwevej
Level 5
Level 5
 
Posts: 624
Joined: Mon Mar 22, 2010 3:35 pm
Location: Delft / Prague [@ LMDE]

Re: How To: Completely remove PulseAudio & replace it with A

Postby mads on Thu Nov 25, 2010 6:28 pm

kwevej wrote:is esound really needed?

Yes, it is needed to mix several streams for playback by a single device, and to redirect sound to remote servers.
User avatar
mads
Level 6
Level 6
 
Posts: 1309
Joined: Wed Nov 03, 2010 3:44 pm

Re: How To: Completely remove PulseAudio & replace it with A

Postby kwevej on Sat Nov 27, 2010 1:19 pm

mads wrote:
kwevej wrote:is esound really needed?

Yes, it is needed to mix several streams for playback by a single device, and to redirect sound to remote servers.


Then I don't need it ;)
thx for reply

EDIT: "mix several streams for playback by a single device" works with ALSA alone as well (because of dmix)
Last edited by kwevej on Thu Mar 10, 2011 2:42 am, edited 1 time in total.
User avatar
kwevej
Level 5
Level 5
 
Posts: 624
Joined: Mon Mar 22, 2010 3:35 pm
Location: Delft / Prague [@ LMDE]

Re: How To: Completely remove PulseAudio & replace it with A

Postby mneumonic on Mon Nov 29, 2010 8:53 am

This guide is great. After doing this everything works great, except when i right click my panel and add to panel, there is no volume control listed. In fact the only way i have found to control sound levels is to install gnome alsa mixer, but it would be more convenient to get a volume control on the panel again.

any ideas?
mneumonic
Level 1
Level 1
 
Posts: 15
Joined: Wed Jun 10, 2009 4:42 am

Re: How To: Completely remove PulseAudio & replace it with A

Postby mads on Tue Nov 30, 2010 9:36 am

mneumonic wrote:This guide is great. After doing this everything works great, except when i right click my panel and add to panel, there is no volume control listed. In fact the only way i have found to control sound levels is to install gnome alsa mixer, but it would be more convenient to get a volume control on the panel again.

any ideas?


@ update: The issue with volume control applet is resolved now. Please refer to this guide.


I have no idea why you don't have it. Please see screenshot attached.

However, you could try:
Right click Panel > Add to Panel > Custom Application Launcher
Type: Application
Name: Volume Control
Command: gnome-volume-control
Comment: Adjust the sound volume
Attachments
Screenshot.png
Screenshot.png (58.34 KiB) Viewed 40951 times
Last edited by mads on Sun Apr 17, 2011 5:38 am, edited 1 time in total.
User avatar
mads
Level 6
Level 6
 
Posts: 1309
Joined: Wed Nov 03, 2010 3:44 pm

Re: How To: Completely remove PulseAudio & replace it with A

Postby damien.caci on Tue Nov 30, 2010 12:58 pm

Hi, i have the same problem as mneumonic. I have tried the custom application volume control but all that does is bring up a prompt saying "waiting for sound system to respond." Any help would be greatly apprecieted, as i am not sure if mneumonic has fixed his problem as well.

damien.caci
damien.caci
Level 1
Level 1
 
Posts: 1
Joined: Thu Nov 18, 2010 2:06 pm

Re: How To: Completely remove PulseAudio & replace it with A

Postby apexx on Wed Dec 01, 2010 7:30 am

This guide solved my sound problems. gnome-volume-control doesn't work anymore but that really isn't a problem. I just added gnome-alsamixer to the panel. Using it to change volume doesn't require more clicks :wink:

Code: Select all
$ gnome-volume-control

** (gnome-volume-control:2736): WARNING **: Connection failed, reconnecting...

** (gnome-volume-control:2736): WARNING **: Failed to connect context: Connection refused
apexx
Level 1
Level 1
 
Posts: 8
Joined: Sun Jun 20, 2010 4:52 am

Re: How To: Completely remove PulseAudio & replace it with A

Postby stormadvisor on Tue Dec 07, 2010 4:45 pm

apexx wrote:This guide solved my sound problems. gnome-volume-control doesn't work anymore but that really isn't a problem. I just added gnome-alsamixer to the panel. Using it to change volume doesn't require more clicks :wink:

Code: Select all
$ gnome-volume-control

** (gnome-volume-control:2736): WARNING **: Connection failed, reconnecting...

** (gnome-volume-control:2736): WARNING **: Failed to connect context: Connection refused



I get the same thing but my Warning is for gnome-volume-control:4192
Thanks,
Matt

"Can't change the weather so you might as well enjoy it!" - Me
User avatar
stormadvisor
Level 1
Level 1
 
Posts: 16
Joined: Mon Dec 07, 2009 7:06 pm
Location: Ohio

Re: How To: Completely remove PulseAudio & replace it with A

Postby mads on Tue Dec 07, 2010 7:08 pm

stormadvisor wrote:
apexx wrote:This guide solved my sound problems. gnome-volume-control doesn't work anymore but that really isn't a problem. I just added gnome-alsamixer to the panel. Using it to change volume doesn't require more clicks :wink:

Code: Select all
$ gnome-volume-control

** (gnome-volume-control:2736): WARNING **: Connection failed, reconnecting...

** (gnome-volume-control:2736): WARNING **: Failed to connect context: Connection refused

I get the same thing but my Warning is for gnome-volume-control:4192


@ Edit: I assume you are using a non-LMDE version. Please have a look at the new how-to here.

It seems that this is a bug (#556948 gnome-volume-control-applet: Connection failed). See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=556948.

Workaround: https://launchpad.net/~dtl131/+archive/ppa
Last edited by mads on Mon Apr 18, 2011 4:21 pm, edited 1 time in total.
User avatar
mads
Level 6
Level 6
 
Posts: 1309
Joined: Wed Nov 03, 2010 3:44 pm

Re: How To: Completely remove PulseAudio & replace it with A

Postby runbei on Sat Feb 12, 2011 1:16 pm

This worked for me. For others with similar problems - I have a home-built PC with a Biostar 790GX A2+ motherboard that has the following audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA).

With speaker and headset connected to the rear panel, and speaker connect to a front outlet, I was unable to get the microphone working before completely removing PulseAudio as directed. After reboot, the mic worked fine but I didn't have sound - yikes, I forgot the last two commands in the code: sudo rm -rf /etc/asound.conf and sudo rm ~/.pulse-cookie. After running those and rebooting, everything is working. I'm very grateful, as I use Skype Online service for my main phone.
runbei
Level 3
Level 3
 
Posts: 171
Joined: Fri Jul 25, 2008 12:49 am
Location: Mountain View, CA

Re: How To: Completely remove PulseAudio & replace it with A

Postby lazerbeat on Thu Apr 07, 2011 1:09 am

I would really love to get PulseAudio off my system but I an having a couple of problem. I have tried this how to a couple of times and after rebooting I have no sound at all. The only step I can't follow is this one

B. Menu - Services Settings - uncheck "pulseaudio"


I can't find "service settings" under my menu anywhere. Also I would assume after removing pulse and it's dependencies I would need to add ALSA to the start up?

Any help would be most appreciated here.
lazerbeat
Level 1
Level 1
 
Posts: 12
Joined: Mon Jul 21, 2008 11:15 pm

Re: How To: Completely remove PulseAudio & replace it with A

Postby mads on Thu Apr 07, 2011 5:27 am

lazerbeat wrote:I would really love to get PulseAudio off my system but I an having a couple of problem. I have tried this how to a couple of times and after rebooting I have no sound at all. The only step I can't follow is this one
B. Menu - Services Settings - uncheck "pulseaudio"

I can't find "service settings" under my menu anywhere. Also I would assume after removing pulse and it's dependencies I would need to add ALSA to the start up?
Any help would be most appreciated here.

@ EDit:
lazerbeat, you are right about not finding "Services". This "How To" is for Mint Debian Edition.
I have posted a new one for Mint 10 users: How To: Remove PulseAudio & replace it with ALSA (Mint 10)
Last edited by mads on Sun Apr 17, 2011 5:54 am, edited 1 time in total.
User avatar
mads
Level 6
Level 6
 
Posts: 1309
Joined: Wed Nov 03, 2010 3:44 pm

Re: How To: Completely remove PulseAudio & replace it with A

Postby Lendo on Thu Apr 07, 2011 10:53 am

After so much trial and error, this fix was so simple. Thanks, but now I gotta talk to my family again. The unintended consequences LOL :shock:
Life is too short to waste it on Microsoft.
User avatar
Lendo
Level 2
Level 2
 
Posts: 95
Joined: Thu Mar 31, 2011 4:47 pm
Location: Snow Covered Canada

Re: How To: Completely remove PulseAudio & replace it with A

Postby sespela on Fri Apr 08, 2011 6:50 am

Thank you so much for a great tutorial!
I use LMDE on my Acer Aspire One ZG5. I had problems using the mic on Skype, and after searching the interwebs and trying different "solutions" and going through different tutorials I posted a request for other ideas or solutions from people using Acer Aspire one. I recieved a link to this tutorial, and after doing as described, and doing some small adjustments in on ALSA it worked out just perfectly. What I did was disable "Allow Skype to automatically adjust your audio settings", then I went into the ALSA settings, disabled mute on internal mic, then I unhooked the "chain" below the mic adjuster and volum adjuster and turned the volum a bit down, and the mic levels not just below max. Now it all works as intended.
Hope my describsion makes sense as English is not my first language.

But thanks once a great for this tutorial!:)
sespela
Level 1
Level 1
 
Posts: 25
Joined: Tue Aug 10, 2010 1:21 pm

Re: How To: Completely remove PulseAudio & replace it with A

Postby kc6ufm on Sun Apr 10, 2011 3:51 am

Even to a totally unfamiliar type like me, pulseaudio is clearly the worst junk I have ever seen.

I followed the great tutorial, and pulseaudio is now a thing of the past. Many thanks!

But I still have one problem...

I am a Ham Radio operator, and I want to use gmFSK for digital radio. The application expects to find and control the soundcard via /dev/dsp, but this file is missing.

Any ideas?

Thanks!
kc6ufm
Level 1
Level 1
 
Posts: 24
Joined: Tue Dec 07, 2010 12:17 am

Re: How To: Completely remove PulseAudio & replace it with A

Postby mads on Sun Apr 10, 2011 5:44 am

kc6ufm wrote:But I still have one problem...
I am a Ham Radio operator, and I want to use gmFSK for digital radio. The application expects to find and control the soundcard via /dev/dsp, but this file is missing.
Any ideas?

Hi, I am not sure about this, but the following procedure is harmless, so you could try it. First run in Terminal:
Code: Select all
ls /dev | grep dsp

(The output in my system shows: adsp dsp)

Then, install "alsa-oss" package. In Terminal:
Code: Select all
sudo apt-get update && sudo apt-get install alsa-oss


Why this package? Synaptic says this about alsa-oss:
Code: Select all
This package contains a program loader, aoss, which wraps applications written for OSS in a compatibility library, thus allowing them to work with ALSA.

There are two ways of getting an application to work with ALSA if the application was written for OSS. The first way is to load the special ALSA drivers that emulate the OSS kernel interface; these allow the application to open /dev/dsp0 and other OSS device files. The second way is to wrap the application in the libaoss library provided in this package; the wrapper causes the application to access native ALSA device files such as /dev/snd/pcmC0D0c instead of OSS device files.

Use of the alsa-oss library is recommended over the use of OSS-emulation drivers if you want to use ALSA's PCM plugin layer.


See what happens, but if you still have problem, I advice to open a new thread (to get the attention and help of more experienced users).
User avatar
mads
Level 6
Level 6
 
Posts: 1309
Joined: Wed Nov 03, 2010 3:44 pm

Re: How To: Completely remove PulseAudio & replace it with A

Postby kc6ufm on Sun Apr 10, 2011 10:57 am

Thanks for the info, but as far as I could see, nothing changed.

I'll start a new topic for this issue since, as you say, it is highly specific.

Now, on a more general note...

When I start the gnome ALSA Mixer, I get an error:

---
An error occurred while loading or saving configuration information for GNOME ALSA Mixer. Some of your configuration settings may not work properly.

Bad key or directory name: "/apps/gnome-alsamixer/display_mixers/": Key/directory may not end with a slash '/'
Bad key or directory name: "/apps/gnome-alsamixer/display_names/": Key/directory may not end with a slash '/'
---

Things seem to work, but I can't really say.

Thanks again!
kc6ufm
Level 1
Level 1
 
Posts: 24
Joined: Tue Dec 07, 2010 12:17 am

Re: How To: Completely remove PulseAudio & replace it with A

Postby mads on Sun Apr 10, 2011 2:06 pm

kc6ufm wrote:When I start the gnome ALSA Mixer, I get an error ... Some of your configuration settings may not work properly...

As far as I can see, GNOME ALSA Mixer is not mentioned at all in this tutorial!

However, I searched and it seems that it is a bug totally unrelated to this tutorial.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=403693
https://bugs.launchpad.net/ubuntu/+sour ... bug/184768
https://bugs.launchpad.net/ubuntu/+sour ... bug/461003
https://bugs.launchpad.net/ubuntu/+sour ... bug/106903
https://bugzilla.gnome.org/show_bug.cgi?id=429012

Users on this thread are discussing the same, and some of them report that turning the "Digital Audio Jack" has helped.

Starting a new thread about both issues is a good idea. Many experienced users out there, but it is unlikely that they
see your questions here. :)
User avatar
mads
Level 6
Level 6
 
Posts: 1309
Joined: Wed Nov 03, 2010 3:44 pm

Re: How To: Completely remove PulseAudio & replace it with A

Postby sespela on Wed Apr 13, 2011 5:00 pm

Hey, I just used this tutorial to help a friend of mine which I have converted to LM.
She is very happy now, because Skype is working perfectly once more. So thank you very much for this great tutorial.

But there's one problem though, where did the volume control go? I've read through this page and seen that this seems to be an issue. So I'm just wondering, is there any updates on this issue? Have anybody found a way to get a working volum control?
I tried creating a custom icon as desribed in one of the replies, but sadly that didn't work.


FYI: All worked out perfectly on my LMDE, no problems what so ever!:D
sespela
Level 1
Level 1
 
Posts: 25
Joined: Tue Aug 10, 2010 1:21 pm

Linux Mint is funded by ads and donations.
 
Next

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 4 guests