How to unload snd_dummy module?

Hello everyone!
I just loaded the module with sudo modprobe snd-dummy
But when I wanna unload it with sudo modprobe -r snd-dummy :

modprobe: FATAL: Module snd_dummy is in use.

I searched a lot and tried lots of things. No luck…

option “-r” shall unload it, what you intended to say?

https://wiki.archlinux.org/title/Kernel_module

Sorry I edited it

Please post output of the follwong command:

lsmod | grep snd_dummy

You will get a list like this:

module size used_by

Try unloading the “used_by” modules before or together with the module you want to unload.

If you want to prevent a module from loading at the next boot, add it to a blacklist:

/etc/modprobe.d/blacklist.conf
2 Likes

Thanks!

Output:

snd_dummy              28672  4
snd_pcm               147456  6 snd_hda_intel,snd_hda_codec,snd_hda_core,snd_dummy
snd                   114688  20 snd_hda_codec_generic,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm,snd_dummy

Unfortunately, I can’t unload them. When I type sudo modprobe -r snd_hda_codec_generic:

sudo modprobe -r snd_hda_codec_generic

Use this command to blacklist the module

echo 'blacklist snd_dummy' | sudo tee -a /etc/modprobe.d/blacklist.conf

and reboot system

The module is not loaded on the next boot
My problem is to unload it on the current session