Many users have had problems with audio upon upgrading from Ubuntu 9.04 to 9.10. This How-To will show you how to fix some of those audio issues, including:

  • No audio in Flash videos.
  • Audio stops entirely after opening a Flash video.
  • No audio at all.
  • Audio plays out of speakers but not headphones plugged into the front of the computer (go to step 5).

Quick Ubuntu Audio Primer

By default, Ubuntu 9.10 uses two complementary programs to pump sound through your speakers or headphones.

  1. ALSAThe Advanced Linux Sound Architecture (ALSA) provides direct access to your sound card.One issue with ALSA is that only one program can output sound to ALSA at one time. Because of this, Ubuntu includes a second program called...
  2. PulseAudioPulseAudio is a sound server that takes audio data from all of your applications and passes it onto ALSA.PulseAudio lets you do some cool things like control the volume level of each application separately, and stream audio to another computer over a network.

A common problem in Ubuntu 9.10 occurs when an application attempts to use ALSA directly, instead of going through PulseAudio as it should. The following steps will solve that problem.

Step 1: Install some utilities

In this step, we will install the Gnome ALSA Mixer and the Default Sound Chooser.

To install the Gnome ALSA Mixer, open a terminal and type in:

sudo apt-get install gnome-alsamixer

Installing the Default Sound Chooser is a bit more complicated. It used to be in the alsa-utils package, but it was removed in Ubuntu 9.10. Luckily, a helpful Ubuntu forum user has provided directions to install this utility.

  1. Download an old version of alsa-utils (make sure you choose the correct architecture: i386 for a 32-bit system and amd64 for a 64-bit system).
  2. Open a terminal window.
  3. Navigate to the directory that you saved the .deb file in.
  4. Perform the following commands:

# Install the .deb

sudo dpkg -i alsa-utils_1.0.18-1ubuntu11*.deb

# Copy asoundconf

sudo cp /usr/bin/asoundconf /usr/

# Install the graphical front-end to the Default Sound Card chooser

sudo apt-get install asoundconf-gtk

# Update alsa-utils now that you have asoundconf copied

sudo apt-get upgrade alsa-utils

# Move asoundconf to the right place

sudo mv /usr/asoundconf /usr/bin/

At this point you should now have a utility called Default Sound Card in System > Preferences.

Step 2: Update PulseAudio and ALSA

To ensure that you have the latest versions of PulseAudio and ALSA, open a terminal and perform the following commands.

sudo apt-get upgrade pulseaudio gstreamer0.10-pulseaudio

sudo apt-get upgrade alsa-base alsa-utils

If these packages are not yet installed, then replace “upgrade” in the above commands with “install” and run them again.

If your packages are already updated, you will see something like this.

upgrade

Step 3: Choose PulseAudio as your default sound card

Open up the Default Sound Card utility you installed in Step 1. It will be in System > Preferences.

default-sound-card2

Choose PulseAudio. Click Quit.

Step 4: Reboot

Save anything you have open and reboot your computer.

Step 5: Set the volume

Open the Gnome ALSA Mixer, which is in Applications > Sound & Video.

gnome-mixer

Ensure that nothing is muted and set the volume at a comfortable level. In most cases, you can put it at the maximum, as most applications that play audio have their own volume controls. In particular, ensure that the Master and PCM volumes are not muted.

gnome-mixer2

Note that there are separate volume controls for the audio plugs in the back and front of your computer, if your motherboard has both. Having one muted but not the other may be why audio will play out of the speakers, but not out of headphones plugged into the front of the computer.

Step 6: Test the audio

Open up your favorite music playing application (we're partial to RhythmBox). Make sure the volume control is at a reasonable level. Play a song. Do you hear it? If not, proceed to step 7.

Open up your favorite web browser. Open up a Youtube video. Do you hear both the Youtube video and your music? If so, then audio is working properly!

If not, proceed to step 7.

Step 7: Get the latest version of ALSA

If audio is still not working, or not working for multiple applications, then you may need to update to the latest version of ALSA.

Again, a helpful Ubuntu forum user provides an easy method to do this.

  1. Download the ALSA upgrade script (requires forum registration).
  2. Open a terminal.
  3. Navigate to the directory that you saved the .tar file in.
  4. Perform the following commands:

tar xvf AlsaUpgrade-1.0.22.1-2.tar

sudo ./AlsaUpgrade-1.0.22.1-2.sh –d

sudo ./AlsaUpgrade-1.0.22.1-2.sh –c

sudo ./AlsaUpgrade-1.0.22.1-2.sh -i

Step 8: Reboot and test

Save anything you have open and reboot your computer.

Once you're back into Ubuntu, test out your audio as described in step 6. If your audio still doesn't work, there's still one last resort...

Step 9: Switch to the Open Sound System

ALSA was designed as a replacement to a similar program called the Open Sound System (OSS). Even though many distributions adopted ALSA, development of OSS continued, and current versions are perfectly capable of delivering high-quality sound in Ubuntu.

Switching to OSS is an article in itself. Fortunately, the Ubuntu community maintains just such an article.

Conclusion

Hopefully by following these steps you've been able to get sound working properly in Ubuntu 9.10. Let us know if these steps worked for you in the comments!