LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   forcing a module to unload (https://www.linuxquestions.org/questions/linux-general-1/forcing-a-module-to-unload-407934/)

Ashrack 01-25-2006 03:24 PM

forcing a module to unload
 
GOt hibernation with SWSUP2 working flawlesly on my desktop.
Since am using a SND-CS46XX for alsa which doesn't properly support suspending, I had set the hibernate.conf to reload alsa when restoring from hibernation
Code:

/etc/init.d/alsa force-reload
which is kinda medssy:rolleyes:
Now onto my questions:
when I do modprobe -r snd-cs46xx I always get the following error:
Code:

FATAL: Module snd_cs46xx is in use.
Is there a way to force the module to unload?
ps. I also tried
Code:

rmmod -f snd-cs46xx
but then the terminal just hangs.

macemoneta 01-25-2006 06:59 PM

You can only remove a module when the use count is zero. If you do an lsmod, you'll see the use count and a chain of dependent modules that have to be removed. Likely, even after you remove them, the count will be non-zero. You then need to kill all processes that use sound (like the mixer applet / volume control). Once the usage count is zero, you can "modprobe -r" or "rmmod" the module.


All times are GMT -5. The time now is 01:33 AM.