Solved: modprobe: FATAL: Module nvidia is in use.

In this post, we will see a common issue while installing module nvidia.

Lets see the error message and its solution below.

 

I. Error Message
When we try to run the installer, it failed.

[root@ngelinux001 userA]# ./NVIDIA-Linux-x86_64-450.80.02.run
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 450.80.02................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

### And then we have tried to unload the nvidia module, and encountered the error message.
[root@ngelinux001 userA]# modprobe -r nvidia
modprobe: FATAL: Module nvidia is in use.

 

II. Analysis
Check out the open files by nvidia device and its process IDs.

[root@ngelinux001 userA]# lsof /dev/nvidia*
COMMAND  PID USER   FD   TYPE  DEVICE SIZE/OFF  NODE NAME
lim     5410 root    5u   CHR 195,255      0t0 11522 /dev/nvidiactl
lim     5410 root    6u   CHR   195,0      0t0 11523 /dev/nvidia0
lim     5410 root    9u   CHR   195,1      0t0 58971 /dev/nvidia1
lim     5410 root   10u   CHR   195,2      0t0 58972 /dev/nvidia2
lim     5410 root   11u   CHR   195,3      0t0 60176 /dev/nvidia3
lim     5410 root   12u   CHR   195,4      0t0 16261 /dev/nvidia4
lim     5410 root   13u   CHR   195,5      0t0 62194 /dev/nvidia5
lim     5410 root   14u   CHR   195,6      0t0   678 /dev/nvidia6
lim     5410 root   15u   CHR   195,7      0t0 62195 /dev/nvidia7
lim     5410 root   16u   CHR   195,0      0t0 11523 /dev/nvidia0
lim     5410 root   17u   CHR   195,0      0t0 11523 /dev/nvidia0
lim     5410 root   18u   CHR   195,1      0t0 58971 /dev/nvidia1
lim     5410 root   19u   CHR   195,1      0t0 58971 /dev/nvidia1
lim     5410 root   20u   CHR   195,2      0t0 58972 /dev/nvidia2
lim     5410 root   21u   CHR   195,2      0t0 58972 /dev/nvidia2
lim     5410 root   22u   CHR   195,3      0t0 60176 /dev/nvidia3
lim     5410 root   23u   CHR   195,3      0t0 60176 /dev/nvidia3
lim     5410 root   24u   CHR   195,4      0t0 16261 /dev/nvidia4
lim     5410 root   25u   CHR   195,4      0t0 16261 /dev/nvidia4
lim     5410 root   26u   CHR   195,5      0t0 62194 /dev/nvidia5
lim     5410 root   27u   CHR   195,5      0t0 62194 /dev/nvidia5
lim     5410 root   28u   CHR   195,6      0t0   678 /dev/nvidia6
lim     5410 root   29u   CHR   195,6      0t0   678 /dev/nvidia6
lim     5410 root   30u   CHR   195,7      0t0 62195 /dev/nvidia7
lim     5410 root   31u   CHR   195,7      0t0 62195 /dev/nvidia7

### Lets see the process ID which file is used by the process.
[root@ngelinux001 userA]# ps -ef | grep -i 5410
root       5410      1  6 23:20 ?        00:00:11 /grid/sfi/farm/server01/10.1.8/linux3.10-glibc2.17-x86_64/etc/lim
root       5826   5410  0 23:21 ?        00:00:00 /grid/sfi/farm/server01/10.1.8/linux3.10-glibc2.17-x86_64/etc/melim
root       6608   5410  0 23:23 ?        00:00:00 /grid/sfi/farm/server01/10.1.8/linux3.10-glibc2.17-x86_64/etc/pim
root       6665   5617  0 23:23 pts/2    00:00:00 grep --color=auto -i 5410

III. Solution
Now kill the process ID which is using the nvidia.

[root@ngelinux001 userA]# kill -9 5410
[root@ngelinux001 userA]# ps -ef | grep -i 5410
root       6703   5617  0 23:23 pts/2    00:00:00 grep --color=auto -i 5410

And now try to install the nvidia graphics driver and it will be installed fine.

1 1 vote
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments