For some reason the Alsa drivers have a tendency to just stop working.. More specifically, the sound doesn't seem to work anymore after a reboot. No errors, no logs, I just can't hear anything. I've been pulling my hair out over this because I was not able to solve it.
I tried completely uninstalling the Alsa-base and linux-sound-base modules (which, when using Gnome, also means it uninstalls the entire Gnome Display Manager... Some dependency right there :p).
After re-installing it all, the sound was not back though. The only thing left to do was to reinstall Ubuntu entirely. So, that's what I did. Luckily the sound did work again after the lenghty process of setting up all the drivers and modules.
But, it did not last. Only 2 days after the reinstall, the sound stopped working again! Of course I had no intention of reinstalling the whole OS again. There /had/ to be a reason this was happening and i wanted to find out what it was.
After some puzzling and searching through configuration files, I discovered that Alsa had 'magically' set my on-board sound card as my default sound device, instead of the SoundBlaster.
While this sucked, at least it was a clue as to why my sound stopped working (There are no speakers attached to the onboard soundcard).
So, I set out to find how I could make Alsa accept my Soundblaster as primary device. After some googling I found that the foolowing should work.
1. Create a file in your Home directory called '.asoundrc'.
2. Open it in a texteditor and copy/paste this into it:
--- START COPY ---
pcm.!default {
type hw
card 1
}
ctl.!default {
type hw
card 1
}
--- END COPY ---
In this file 'card #' is the number of the soundcard you want to use. You can look up a list of available cards and their index on your system, by using the following command in a terminal: sudo cat /proc/asound/cards
For me, the output looks something like (The formatting is messed up in this blog):
-------------------------------------------------------------------
0 [V8235]: VIA8233 - VIA 8235 VIA 8235 with AD1980 at 0xe000, irq 19
1 [Live]: EMU10K1 - SBLive! Platinum [CT4760P] SBLive! Platinum [CT4760P] (rev.5, serial:0x80401102) at 0xd800, irq 20
-------------------------------------------------------------------
As you can see, my Soundblaster is at index 1, so I used 'card 1' in the .asoundrc file.
3. Save the file and close it.
4. Restart Gnome/KDE. You don't have to reboot the entire machine, just restart the display manager. Ctrl-alt-backspace will do this quickly.
This solved the problem for me! So, if all is well, the sound should no longer just stop working. \o/