3

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
1

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

3
  • 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
1

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.

1

Thanks for the info. Ran into a similar issue for Debian 4.5.0-2-amd64 on Intel NUC, and this is what I had to put in my blacklist file to fix it:

blacklist intel_powerclamp
blacklist pcspkr
blacklist soundcore
blacklist snd
blacklist snd_hda_codec_hdmi    
blacklist snd_hda_codec_realtek 
blacklist snd_hda_codec_generic 
blacklist snd_hda_intel         
blacklist snd_hda_codec         
blacklist snd_hda_core          
blacklist snd_hwdep             
blacklist snd_intel_sst_acpi    
blacklist snd_intel_sst_core    
blacklist snd_soc_rt5670        
blacklist snd_soc_sst_mfld_platform
blacklist snd_soc_rl6231        
blacklist snd_soc_sst_match     
blacklist snd_soc_core          
blacklist snd_compress          
blacklist snd_pcm               
blacklist snd_timer    

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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