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

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

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


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.

  • 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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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