Ubuntu – Laggy sound, how can I know what the problem is

11.10sound

Lately, I've been experiencing laggy sound. The only usable syndrome I've found can be the fact, that is the Sound settings in the Output tab the Connector keeps changing to Analog Headphones from Analog Output, this takes only a few milliseconds before it jumps back to Analog Output.

This has been really annoying, because I can't play games, listen to music, and enjoy Ubuntu in all of it's beauty. Any help would be greatly appreciated. Thanks in advance.

Best Answer

Possibly this is a pulseaudio issue - one solution is to use ALSA instead of pulseaudio.

This will loose the sound indicator together with the pulseaudio tools. To change your sound use alsamixergui or gnome-alsamixer

sudo apt-get remove pulseaudio gstreamer0.10-pulseaudio
sudo apt-get autoremove
sudo apt-get install alsa-base alsa-tools alsa-tools-gui alsa-utils linux-sound-base alsamixergui gnome-alsamixer

Then reboot.

To reinstate pulseaudio:

sudo apt-get install ubuntu-desktop indicator-sound

As we have discussed, it is worth checking if this is a specific problem in 11.10 that could have been resolved in the upcoming 12.04 release. To do this, download either the Alpha 1 release of 12.04 or the daily-build.

Use Unetbootin to write the ISO to a USB stick and boot from that into the 12.04 live USB.

On confirmation that this is a specific 11.10 issue, then the problem is likely to be a kernel specific issue.

You have four choices:

  1. Stick with what you have and wait until 12.04 is officially released in April
  2. Upgrade to the 12.04 Alpha - only do this is you are prepared for breakages. Only do this if you are happy and experienced enough to overcome alpha quality issues such as non booting, graphical issues etc.
  3. Install 12.04 as a dual boot with 11.10 or as a virtualbox guest install in 11.10
  4. Upgrade the 11.10 kernel to the 12.04 kernel.

If you want to try the 12.04 kernel then first the important proviso:

drive-image backup you current 11.10 install

I'm not kidding - upgrading the kernel is not to be trivialised and can leave you in a non-booting scenario. Use a good quality drive-image software such as clonezilla.

Step 1 - temporarily change your sources to precise:

sudo sed -i -e 's/oneiric/precise/g' /etc/apt/sources.list

Step 2 - download and install the precise kernel

sudo apt-get update
sudo apt-get install linux-generic linux-headers-generic

Step 3 - change your sources back to oneiric:

sudo sed -i -e 's/precise/oneiric/g' /etc/apt/sources.list
sudo apt-get update

Then reboot.

Once logged in test that you have successfully booted into the kernel 3.2 by running:

uname -a