Harsh J

Memoirs of a QWERTY Keyboard

Get rid of all PulseAudio problems – Use OSS

22 comments

You might think, like I did: Isn’t OSS dead? Didn’t ALSA replace it ages ago?

Open Sound System - Much better!

Open Sound System - Much better!

The answer, as I learnt, was both yes and no. It did die, only to be revived later by 4Front Technologies who developed it under a commercial license for quite sometime. It went GPL only recently, although with a paid premium-support and on certain platforms only. The improvements made in it are simply amazing. I’ll leave the rest of the mystery to be covered by 4Front’s own blog post. It’s a nice read :)

The following guide on how to shift to OSS from PulseAudio/ALSA is for Ubuntu (Jaunty Jackalope, 9.04*) users alone. A proper guide to ArchLinux’s solution might be found here.

Getting OSSv4

Download OSSv4 from 4Front’s website directly. Click here for the current DEB package. This one package is enough for installing the whole of OSS 4.x.

Now to prepare for our installation, issue the following commands:

sudo apt-get install build-essential binutils linux-headers-`uname -r` gawk
sudo apt-get install libtool libgtk2.0-dev libesd0 libsdl1.2debian-oss

These packages are necessary for installing the downloaded DEB package. Next, issue these to disable ALSA from loading next time.

sudo cat /lib/linux-sound-base/noALSA.modprobe.conf >> /etc/modprobe.d/blacklist.conf

And,

sudo echo "blacklist snd_hda_intel
blacklist snd_mixer_oss
blacklist snd_pcm
blacklist snd_timer
blacklist snd_page_alloc
blacklist snd_hwdep
blacklist snd
blacklist soundcore" >> /etc/modprobe.d/blacklist.conf # One whole command

Finally,

sudo dpkg-reconfigure linux-sound-base # Choose OSS in the list shown.

Now reboot your PC so we can stop ALSA from loading. This ensures it doesn’t interfere with the OSS installation.

Installing the Open Sound System

Since double-clicking the DEB (GDebi) won’t work with our downloaded file, go to the Terminal, and in the directory of your downloaded .deb issue:

sudo dpkg -i oss-linux*.deb

That’s it, let the installation complete and you would have an OSS-enabled environment ready. Test it out with various applications, games and even Flash in the browser! MPlayer has an option in its preferences to set its audio system to OSS, so do some other applications in case they don’t seem to work.

Flash issues, if present, might be cleared if you purge and re-install libflashsupport.
No more PulseAudio server issues, sound stuttering, connection errors, etc.!

Finishing Up

In your System – Preferences – Sounds, ensure all the settings are set to OSSv4 as shown via this screen-shot.

Go to your GNOME-Volume-Control (via the volume applet) and from the Preferences list there, tick on all the settings you need and also vmix0-src. Then get back to the main dialog and in the Options tab set vmix0-src as Production for the best quality of sound (Might be a tad too loud, you can also play around to see which is best for you).

Bonus: Run the ossxmix application after you’re done for a lovely control panel!

References: Kalpik | Ubuntu Wiki

* Might work with Intrepid Ibex too. Earlier versions would require certain ESD libraries.

Written by Harsh

May 16th, 2009 at 9:10 pm

22 Responses to 'Get rid of all PulseAudio problems – Use OSS'

Subscribe to comments with RSS or TrackBack to 'Get rid of all PulseAudio problems – Use OSS'.

  1. Dont forget to add the note about changing vmix0-src to Production.. That makes a hell lot of a difference :)

    Kalpik

    17 May 09 at 8:09 am

  2. What do I need to do if I’m running PulseAudio?

    anomit

    17 May 09 at 9:26 am

  3. Wait, did you mean if I disable ALSA, it’d disable PulseAudio too?

    anomit

    17 May 09 at 9:28 am

  4. Kalpik – Ah, missed that. Will add now.

    anomit – I think not, the server might be running anyway but you can turn it off via services, but do ensure that Preferences > Sounds has everything set to OSSv4 and PA won’t be needed any more :)

    Harsh

    17 May 09 at 10:32 am

  5. [...] Update: You can also get rid of PulseAudio completely and shift to OSSv4, a much better sound system with equivalent features, by following the guide at this link. [...]

  6. tell me the best features of this OSSv4 and why did you go to OSSv4 from pulse audio…

    magesh

    3 Jun 09 at 8:45 pm

  7. Well firstly, it works. Stuff sounds much better with it, and way more louder, and doesn’t throw a fit every now and then. It gives me no issues to even think of going back to the horrible implementations of Pulse across various distributions.

    Harsh

    3 Jun 09 at 9:17 pm

  8. I am stuck at the steps to disable ALSA. I the following error message:

    bash: /etc/modprobe.d/blacklist.conf: Permission denied

    I did this as root. What am I doing wrong?

    odbramwell

    6 Jun 09 at 9:44 pm

  9. Hi,

    I’m thinking I could try this on the aspire one. Two issues I would like to add.
    How can I find out if the sound card is supported before changing the installed system so dramatically? Is there a list of supported hardware online? How did u know yours was supported?

    I read in the archlinux wiki that jack detection (headphone and the like) and unable to suspend/hibernate were current issues. Were you able to verify if any of this is still valid?

    Anonymous Bloke

    8 Jun 09 at 8:47 pm

  10. Follow-up.

    Well, there’s nothing like trying stuff for yourself. The experience with OSS is mixed.

    It’s not as easy or simple as described in the original post to make applications work with oss. GStreamer apps like totem, banshee, have some problems. This is all I could understand up until now. It’s quite a complicated matter.

    Flash should work with the extra package, but with me it doesn’t. I have no idea why this is. I’m using linux mint 7. It’s hard to find information on the topic. Some say when installing the ossv4 from deb it automatically fetches the lib, some say it fails and you should compile the lib manually. The situation is a mess.

    Headphone detection truly does not work. But it’s possible to manually mute the main laptop speaker using ossxmix. Making a simple script to mute/unmute is also quite simple.

    Suspend/Hibernate I have yet to try.

    On a side note, I was very impressed with the performance. OSS runs smooth. Running spotify on wine has come down from 23% cpu with alsa/pulse to ~10 with oss. That’s fantastic.

    BTW, odbramwell, just do sudo bash before you run that command.

    Anonymous Bloke

    11 Jun 09 at 7:29 pm

  11. Haven’t tried this install process yet (will when my exams finish), but I can guess what your problem was odbramwell.

    The error says “/etc/modprobe.d/blacklist.conf” is the command you executed, but that looks like a config file, not an executable program. You’re probably being denied permission to run it because its not runnable.

    I think the blog post command (the one with all the lines starting with “blacklist”) is missing the closing quotemark after /etc/modprobe.d/blacklist.conf

    Cheers.

    Nick

    20 Jun 09 at 6:26 am

  12. Did you have gnome sounds working under Jaunty this way? My other apps are fine, but gnome sounds and the sound recorder seem to hate it…

    wererogue

    21 Jun 09 at 11:46 pm

  13. Nick – The quote marks end on the echo command, but do note that for Jaunty and upwards it is ‘blacklist.conf’ while for the previous versions its just ‘blacklist’. Check for the existing files, that ought to point where to put in those commands.

    Harsh

    24 Jun 09 at 10:56 am

  14. [...] harshJ blog Pdf from 4front with installation instructions, hardware support and general overview of tools. [...]

  15. Salamo Alikom
    do you know where i can get libsound.so.6 ,if you have it pls upload it and send PM back .

    SIFE

    29 Sep 09 at 11:36 am

  16. Cannot do this with Ubuntu karmic, sadly, pulseaudio is too integrated, and sound preferences no longer allows you to choose what sound base you use. :(

    Iyeru

    23 Nov 09 at 7:08 am

  17. Oh, I don’t have Ubuntu to try it out right now but I guess integration could be tight since some applications have PA support sort-of patched into them.

    Still there ought to be a way, even if non-GUI, to switch the underlying sound system! (Might break some apps though, if they’re shipping them without OSS patches/support)

    Harsh

    23 Nov 09 at 5:26 pm

  18. How do I get OSSXMIX working, I cant find it in Package Manager?

    Mark Ackerman

    6 Dec 09 at 5:52 pm

  19. When you install the oss package, it comes with ossxmix. you can run it from the terminal or make a launcher with ossxmix as the command

    Anonymous Bloke

    7 Dec 09 at 1:13 am

  20. thanks for this. alsa was killing me. flash kept taking over the sound device and preventing everything else from using it. only one application could use sound at a time. i felt like i was trapped in 1995. following the directions here, i got oss running in no time, and no more annoying problems.

    mike

    3 Feb 10 at 6:58 am

  21. Replaced Puls Audio with OSS; I have now a better sound (more punch, more dynamic). Thanks.

    hengels

    20 Mar 10 at 11:29 am

  22. OSS will not play for Multiple Instances of audio.
    While,I agree that for HDA like cards,the Sound Quality is way much Superior. :)
    PS: There is “Model” option now given by Alsa which may help.

    Debianfan

    3 Jun 10 at 3:51 pm

Leave a Reply