Help - Search - Members - Calendar
Full Version: Is there a way to safely force a module to unload?
MandrivaUsers.org > Advanced Topics > Command Line, Kernel and Programming
phunni
I have a kernel module or two that are involved in communicating with my Sony Clie over USB - usb-uhci, usbserial and visor.

Sometimes a sync completes without problems, but the dekstop is left as if it hasn't quite completed (I'm using jpilot to sync by the way...)

I am now no longer able to sync unless I reboot. If I try to unload the offending modules then I am told they are busy, or the console simply hangs...

I know the sync is complete and I hate having to reboot - this isn't windows after all.

Is there a way to force these modules to unload without any risk to my hardware/system?
illogic-al
CODE
rmmod name_of_module
removes modules
phunni
not if the modules thinks it's busy it doesn't :wink:

I've already tried rmmod several times. I will, however, try modprobe -r and see if that makes any difference - although I suspect not.
pmpatrick
It won't unload till you kill the process using it which I suspect is what you really want to do. If you know the device file your Sony Clie uses, you can find out what processes it's using with:

# fuser -vm <path to device file>

And I believe that this will kill all processes it uses:

# fuser -km <path to device file>
phunni
Thanks - next time it happens, I'll try that. It may well be the solution smile.gif
phunni
running
CODE
fuser -vm /dev/usb/tts/1
simply lists lots of processes - I'm sure they can't all be using the device...

trying to kill them causes a complete system hang!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.