Debian – How to disable sound modules in debian squeeze (solved)


The scenario, I have a debian squeeze xen virtual machine, only doing server tasks. On boot it autoloads sound modules despite blacklisting.

I know about modprobe -r, however ideally I'd prefer to stop them being loaded in the first place, hoping someone can suggest the 'debian way' to do this cleanly.

Rebuilding the kernel without sound support is not really a nice option.

What I've done so far…

root@debian:~# cat /etc/modprobe.d/snd-blacklist.conf
blacklist soundcore
root@debian:~# depmod -ae -F /boot/
root@debian:~# update-initramfs -u -k `uname -r` -v

… and after a reboot …

root@debian:~# lsmod
Module                  Size  Used by
loop                   11799  0
snd_pcm                60487  0
snd_timer              15598  1 snd_pcm
snd                    46526  2 snd_pcm,snd_timer
soundcore               4598  1 snd
snd_page_alloc          6249  1 snd_pcm
pcspkr                  1699  0
evdev                   7352  0
ext4                  288382  1
mbcache                 5050  1 ext4
jbd2                   67079  1 ext4
crc16                   1319  1 ext4
xen_netfront           15196  0
xen_blkfront            8358  1

Best Answer

Blacklist the snd module in the configuration. This is the core ALSA module.

Related Question