Ubuntu – Disable all sound permanently

sound

I've got a lab for high school students, and I'd like to disable audio altogether on the lab computers.

Any suggestions? I've been looking at alsa force-unload, but that only kills processes that are currently using the sound card. When I reload the browser and hit YouTube, sound comes back.

Basically, I want to unload sound from the kernel …but easier than that.

Best Answer

All right, so blacklisting the sound related modules worked. Thanks to this post:

http://www.pc-freak.net/blog/disabling-sound-kernel-modules-debian-ubuntu-gnu-linux-servers/

The details of the fix:

edit /etc/modprobe.d/snd-blacklist.conf and add these entries (from a Dell standalone pc with 18.04)

blacklist soundcore
blacklist snd
blacklist snd_pcm
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_timer
Related Question