If you lose all sound cards on Ubuntu, OSS configs may be the problem

published Dec 07, 2018 01:20   by admin ( last modified Dec 07, 2018 02:37 )
sudo apt remove --purge oss4-base

…may get your sound cards back on Ubuntu 18.04 and 18.10, if you've been dabbling with OSS.

So I tried to get my laptop's microphone to work, which seems to be a problem that needs to be fixed upstream, but I decided to give it a go. As part of this I installed some OSS modules and an interface to pulseaudio. Somehow "oss4" was involved. Anyway that did not work. I uninstalled it, and I tried a lot of other things to get my sound input to work.

And I had no soundcards anymore. The hardware was there but no kernel modules loaded. I spent hours on this until I found in the Debian wiki that old OSS drivers or configs may be lying around and preventing things to load. And looking into /etc/modprobe.d there were a number conf files for OSS, that OSS had left there after having been uninstalled. They still took dibs on hardware, which means it's not really just a config file; it's code interpreted by another sub system.

sudo apt remove --purge oss4-base

…took care of that. I did not find that in any Ubuntu documentation.

If you don't unload all OSS modules then ALSA modules will not be able to initialise (or work properly) because the OSS driver will be futzing with the sound hardware that the ALSA driver needs to control. If you see a message about "sound card not detected" and you are sure you have the right ALSA driver, the presence of an OSS module could be the reason.

ALSA - Debian Wiki