Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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/System.map-2.6.32-5-amd64
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
share|improve this question

2 Answers 2

up vote 1 down vote accepted

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

share|improve this answer
    
Thats the method for lenny, unfortunately something is different in squeeze, enough to make that not work –  Glenn May 27 '12 at 1:37
    
Unless snd is no longer a module, it should still work. –  Ignacio Vazquez-Abrams May 27 '12 at 1:38
    
I updated the post with details of my last attempt. Also tried setting all the snd_* modules individually. Either the blacklist file is being ignored, or something else is autoloading those modules. /me scratches head –  Glenn May 27 '12 at 14:13

So it turns out I didnt need to mess with the initrd. Since these modules are loaded later. The key was to blacklist the pcspkr module AND the snd_pcsp module as well. The final blacklist file had the following.

blacklist soundcore
blacklist snd
blacklist snd_pcm
blacklist snd_pcsp
blacklist pcspkr

There may be a nicer way to switch off the sound devices, eg by passing in a kernel option or disabling the relevant hardware detection.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.