[TIPS] Solving Ubuntu Sound Problem Without Restart

Have you ever had a sound problem in Ubuntu, especially in Ubuntu 8.10 Intrepid Ibex? And to fix it you need to restart your computer, and if the sound stops working again then restart again… it’s so frustrating, isn’t it?

Now I would like to share how to fix it โ€” but not really fix it; at least you don’t need to restart your computer if the sound stops working. This is based on my experience using Ubuntu 8.10 Intrepid Ibex with an Intel x86 processor. The sound occasionally stops working, and I don’t know why. After I tried to search for the trigger, I found that Rhythmbox or Totem Media Player doesn’t like to play together with Mozilla Firefox 3.0.8 with Flash Media Player.

In my computer the sound will stop working if I play songs in Totem or Rhythmbox and open the YouTube site. Once again, this is based on my experience on my machine, so correct me if I’m wrong. And if you know what the real problem is, please leave me a comment.

Ok, this is how I fix the sound problem without restart:

1. Open your shell and find all processes that are currently using sound with this command:

lsof | grep pcm

2. After you get all processes with the process ID, kill all those processes with this command:

kill -9

3. Restart ALSA (Advanced Linux Sound Architecture) driver with this command:

sudo /etc/init.d/alsa-utils restart

4. That’s it.

How to avoid that sound problem (once again based on my experience): use Banshee media player instead and you can freely watch YouTube ๐Ÿ™‚

Will this problem or “bug” be fixed in Ubuntu 9.04 Jaunty Jackalope? Let’s see then… (note: This post was published 1 day before the new Ubuntu release).

If you find this tip useful, please leave a comment. Thanks and have a nice day…

Update: This bug has been fixed in later Ubuntu releases. I’m using Ubuntu 11.04 now and it’s working like a charm.