Ubuntu – How to use OSS instead of PulseAudio


Sound was working fine with PulseAudio, but I installed something in order to try to get xawtv to work, but that just caused the audio to stop working.

So I tried to install some packages to get OSS to work, because I read that OSS is better than PulseAudio (is that true?)

Anyway, I'm unable to get OSS to work either. What packages do I need to install, and how do I get this set up?

Best Answer

OSS4 is an alternative for ALSA, not for PulseAudio.

I tried OSS4 with ubuntu, the sound is good, perhaps better than ALSA, but i reverted back to ALSA because of a couple of problems:

  1. OSS4 does not detect automatically the plugging in of a headphones jack (at least for my audio card)
  2. the flash plugin work bad or crashes with OSS4

Anyway, I have some notes I saved from my short experience:

  • add your user to the audio group;
  • install the package linux-source;
  • extract the tar archive installed with the previous package in /usr/src/linux-source-3.2.0/ (or equivalent, depending on the kernel version)
  • create a symlink /lib/modules/3.2.0-24-generic-pae/source to /usr/src/linux-source-3.2.0/linux-source-3.2.0/
  • install the packages oss4-{base,source,dkms,gtk} and liboss4-salsa2
  • run sudo dpkg-reconfigure linux-sound-base and choose OSS4
  • modify /etc/pulse/default.pa
    • comment the line: load-module module-udev-detect
    • add the line: load-module module-oss device="/dev/dsp" sink_name=output source_name=input mmap=0
  • run gstreamer-properties and choose OSS4
  • create ~/.asoundrc with content:

      type oss
      device /dev/dsp
      type oss
      device /dev/dsp

Good luck

Related Question