I want to remove a module currently in use in linux. Module name is say i915 (display module) rmmod i915 shows Module currently in use. Similar output using rmmod -f i915 and it is not dependent on any module. How to go about doing this.

Thanks in advance

link|improve this question

75% accept rate
feedback

migrated from stackoverflow.com Jul 1 '11 at 22:02

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 0 down vote accepted

i915 is currently being used by some user-space application, such as the X server. You'll have to shut down whatever is using it before you can remove the module.

link|improve this answer
I have understood that we need to close the applications currently using that module. I was wondering if we can forcefully do something like this. Thanks for quick response. – Jatin Kumar Jul 2 '11 at 12:13
In general, you can't force a module to unload; doing so would leave all kinds of stray pointers into it after it's unloaded, leading to almost-certain crashes :) – bdonlan Jul 3 '11 at 2:17
feedback

Besides the module being in use, the inability to unload it could also be caused by a bug in the driver.

This problem occurred when a driver I was developing was missing the logic to unlink the /dev entry linkage structure during the driver unload operation.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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