Issues with Pulse Audio and Skype (Resolved)

Using Ubuntu 11.04 - is it possible to use an alternative to Pulse Audio?

I have the most up-to-date SKYPE for Linux 2.2-1; On the net I have seen that there are audio problems with SKYPE when using Pulse Audio and this seems to be the case as audio cuts in and out when using SKYPE.

I do not have the same problems when using SKYPE in Windows.

OK, the complete removal of pulse audio can screw up your Ubuntu desktop installation… BUT… there is a way of effectively disabling it, so applications use alsa instead… which is easily reversible if it doesn’t work.

I’ve tested this, and it seems to work (well there have been no issues so far)… OK, first take a look at this page:
http://www.jeffsplace.net/node/12

Now for the time being, we’ll ignore the part about getting the volume control (in the top panel) working (it probably won’t work in 11.04 as the top panel doesn’t accept panel applets any more)… we’ll come back to that if this fixes the Skype issue… for now we’ll use the GNOME ALSA Mixer to adjust the volume.

BE AWARE - These commands NEED to be run in the correct order, so if any of them return an error… STOP… and post how far you got, and what the error was.

First a little preparation… install gnome-alsamixer, and ppa-purge (ppa-purge isn’t necessary at the moment, but is a good idea to have it in case you add any PPA’s in the future):

sudo apt-get install gnome-alsamixer ppa-purge

OK, now lets hide pulse audio from the system:

sudo dpkg-divert --add --divert /usr/lib/gstreamer-0.10/libgstpulse.so.ubuntu --rename /usr/lib/gstreamer-0.10/libgstpulse.so

then

sudo dpkg-divert --add --divert /usr/bin/pulseaudio.ubuntu --rename /usr/bin/pulseaudio

then

sudo sh -c 'echo '\''#!/bin/sh'\'' > /usr/bin/pulseaudio'

(BE AWARE - There are NO double quotation marks (") in the above command, they are ALL single quote marks (') but sometimes they are adjacent.
then

sudo chmod a+x /usr/bin/pulseaudio

Now fire up gstreamer-properties:

gstreamer-properties

and on the “Audio tab”, set both Input and Output plugins to ALSA

To trick the package management system into thinking you have libsdl1.2debian-pulseaudio installed, you’ll need to download a dummy package from here:
libsdl1.2debian-pulseaudio-dummy_1.0_all.deb
and just double click it to install… and when the Software Centre opens, click the “Install” button.

Close the Ubuntu Software Centre.

Next install the libsdl1.2debian-all package:

sudo apt-get install libsdl1.2debian-all

Now, REBOOT

Once rebooted, fire up Skype and go to Options>Sound Devices and set the Microphone, Speakers, and Ringing devices… and test Skype.

Remember, if you need to adjust the volume, you will need to fire up GNOME ALSA Mixer, as the volume control in the top panel will no longer work (we’ll work on that if this solves the issue).


OK to UNDO the above instructions (and get back to default).

Again, BE AWARE - These commands NEED to be run in the correct order, so if any of them return an error… STOP… and post how far you got, and what the error was.

Exit Skype.

Then run…

sudo rm /usr/bin/pulseaudio

then

sudo dpkg-divert --rename --remove /usr/bin/pulseaudio

then

sudo dpkg-divert --rename --remove /usr/lib/gstreamer-0.10/libgstpulse.so

then

sudo apt-get install libsdl1.2debian-pulseaudio

then

sudo apt-get remove libsdl1.2debian-pulseaudio-dummy

Now fire up gstreamer-properties:

gstreamer-properties

and on the “Audio tab”, set both Input and Output plugins to Autodetect or Pulse Audio (or whatever they originally were).

Now REBOOT… and you’re back where you started (pulse audio, and a working volume control in the top panel) :wink:

Let me know if that works, and we’ll see if there is an easy way to get the ALSA volume control into the 11.04 top panel.

All working OK now, I use the classic desk top. I now have a problem with sound in a desk top game http://linuxforums.org.uk/ubuntu/sound-issue-in-game-fantastic-farm/msg56081/#msg56081

Does it work if you remove the padsp that you added to the beginning of the command ?

No there is no sound in the game.

OK, this is tested as working with Fantastic Farm (Linux version) with Pulse Audio disabled as above (at least it works on my system), but should add support for any application that uses OSS (such as some openal games, etc.)

You need to install the oss4-dkms package, which will add OSS support to the kernel, and automagically install the oss4-base package.

sudo apt-get install oss4-dkms

BE AWARE - This command will take a while to complete (and may appear to have stopped working), but DO NOT interrupt it… it WILL finish (took about 2 mins on my system but this will vary).

Once it’s finished, and you are back at a $ prompt…

REBOOT.

Once rebooted, test your game :wink:

Things to expect -

  1. The first boot will be slower than normal, but it will be back to normal on the second boot.

  2. For some reason the Ubuntu startup sound has dissappeared, but once it has booted everything seems to work perfectly (at least as far as I’ve tested).


To UNDO -

sudo apt-get remove oss4-dkms oss4-base

and REBOOT.


Other things I did which may or may not be necessary -

  1. make sure you remove the padsp from the command line of the launcher.

  2. I also deleted the file ~/.alsoftrc (which may or may not exist on your system), I don’t think this was necessary but thought it best to mention it… if you decide to do the same, it may be best just to rename it something like ~/.alsoftrc-bak with:

mv ~/.alsoftrc ~/.alsoftrc-bak

Sound is working again thank you. I did not remove the ~/.alsoftrc file as I could not find it on the system.

Now there is the issue of an icon to adjust the sound level. The icon is missing from the top panel (Classic desktop) but something is still there (no icon) but if I click on the space I get a pop-up menu. \this gives access to Banshee (working) sound preferences (not working).

I could put the ALSA Mixer on the panel if there is no other option.

For anyone else reading this - This will ONLY work with the “Classic” desktop panel… it will NOT (AFAIK) work in Unity.

OK, add the ppa:dtl131/ppa repository:

sudo add-apt-repository ppa:dtl131/ppa

Update the apt-cache, and packages:

sudo apt-get update && sudo apt-get upgrade

Now (if you want) remove the non-working indicator-sound package:

sudo apt-get remove indicator-sound

Now right-click somewhere on the top panel, select “Add to Panel”, and select the “Volume Control” applet.

BE AWARE - Removing the indicator-sound package may also get rid of the ability to access Banshee from that menu applet… but I think there is a setting in Banshee somewhere to tell it to iconify to the tray when minimised… if you have problems, let me know.


To UNDO (told you ppa-purge would come in handy) -

Right-click the volume control panel applet you added, and select remove.
then

sudo ppa-purge ppa:dtl131/ppa

then

sudo apt-get update && sudo apt-get upgrade

then

sudo apt-get install indicator-sound

Now you may have to rearrange the panel applets :wink:


If you wish to see what packages the PPA will replace in Natty, see here:
https://launchpad.net/~dtl131/+archive/ppa?field.series_filter=natty

All this is working fine but has now caused another problem.

I have no sound when watching You Tube or similar flash videos in Firefox also tried Cromium and it is the same.

I suspect they are looking for Pulse Audio is there any way to make them use ALSA?

Did I make a mistake opting for Ubuntu (to late to change now).

I have put my system back to default now, but I did notice the first time I attempted to watch a flash video the audio was muted in the flashplayer itself (at the bottom of the video by the progress bar)… could it just be muted ?

If not, let me know and I’ll look for a solution.

Hi, no the sound is not muted it is at max vol.

As a test I installed a plug-in called “flash video replacer” it plays flash video using an external program and the sound works fine.

I think that it is the Ubuntu version of Fire Fox that is the problem as it sets the flash plug-in to work with Pulse Audio.

I am thinking that a normal version of Fire Fox would fix this problem what do you think.

Probably not… leave it with me and I’ll look for a solution.

It may be as simple as removing flashplayer, and reinstalling… but I’ll test it and get back to you later tonight.

OK listing out…

I’m having problems reproducing the problem… flashplayer just works for me in both Firefox and Chrome, even with pulse audio disabled… so I doubt if a non-ubuntu version of Firefox would make any difference… that said I’m running a non-ubuntu version of Firefox 5.0.1, but that doesn’t explain it working for me in Chrome and not you.

Try this for me…

install the alsa-oss package:

sudo apt-get install alsa-oss

Then start Firefox from the command line with:

aoss firefox

and let me know if flash audio works.

If it does, we’ll try to make that permanent.

If not, can you tell me what version of Shockwave Flash you are running … look in firefox Tools>Add-ons>Plugins

Also in Firefox enter -
about:plugins
into the address bar, and hit enter and look for the Shockwave Flash info … Mine says -

Shockwave Flash
File: npwrapper.libflashplayer.so
Version: 
Shockwave Flash 10.3 r181</blockquote>

and let me know what it says.

Also, what version of Firefox are you running ?

NO sound still not working.

I am using FireFox v.5 Ubuntu Canoni cal-1.0

Flash 11.0d1

Shockwave Flash

File: libflashplayer.so
Version: 
Shockwave Flash 11.0 d1

What kernel do you have:

uname -a

then I’ll have another go at reproducing the issue.

As requested.

userone@office2:~$ uname -a
Linux office2 2.6.38-10-generic-pae #46-Ubuntu SMP Tue Jun 28 16:54:49 UTC 2011 i686 athlon i386 GNU/Linux
userone@office2:~$

UPDATE -

OK, I can reproduce the problem, and it is definately tied to the installation of oss4-dkms and oss4-base … because if you remove those, flash works.

But that would break your game … so I’m going to look for another way of making your game work without OSS support built into the kernel.

I’ll get back to you when I have a working solution :wink:

BTW, one other thing I noticed - with oss4-dkms and oss4-base installed, proper ALSA support appears to be broken … either fire up firefox from the command line:

firefox

attempt to play a flash video, then look back in the open terminal.
or
attempt to start alsamixer from the command line:

alsamixer

to see what I mean.

So I think it will be best to find another way to get audio in the game without oss4-dkms and oss4-base

Actually, I’m even considering saying go back to pulse audio and let’s see if we can fix the Mic in Skype :o … maybe something along the lines of the last response here:
http://www.linuxformat.com/forums/viewtopic.php?t=13923

Hi thanks for your work on this issue.

I noticed that ALSA Mixer is no longer working, if opened it is just blank.
In the volume control ALSA is not shown as an option only OSS Mixer and OSS V4 Mixer is there a clue there?

I tried to use SKYPE and found that the audio was not working so I removed oss and audio now works in SKYPE and Fire Fox but not in the game.

The issue I have with SKYPE is not that it did not work, I fixed the mic issue in Pulse Audio. The problem is that Audio drops out, often I can not hear the other party or they can not hear me. It has improved using ALSA but still happens in Windows on the same computer there are no problems.

My wi-fi connection is operating at 46mbs and my internet connection at around 12mbs.

Could the problems be due to using the Classic desk top? I went for the classic as it was more like Windows Xp.