joeknock90/Single-GPU-Passthrough

Module NVidia still in use Error Solution

aliasboink opened this issue · 0 comments

Disclaimer: I am writing this as another issue as this is a recurrent struggle many people seem to have in the issues and it's due to the SomeOrdinaryGamers video. I am unsure if the chosen format to post this is adequate, but I wager some people may benefit from this, so here I go:

Some NVidia modules cannot pass through due to the fact that they use one another. This can be seen by running the lsmod | grep nvidia command. The order in which Muta (from SomeOrdinaryGamers) removes the modules from the kernels is incorrect (from what I gathered) due to the fact that module nvidia is used by nvidia_urm, but nvidia is removed before the latter, thus causing an issue:

modprobe -r nvidia_drm
modprobe -r nvidia_modeset
modprobe -r drm_kms_helper
modprobe -r nvidia
modprobe -r i2c_nvidia_gpu
modprobe -r drm
modprobe -r nvidia_uvm

The solution to this is to change the order, for instance:

modprobe -r nvidia_uvm
modprobe -r nvidia_drm
modprobe -r nvidia_modeset
modprobe -r drm_kms_helper
modprobe -r nvidia
modprobe -r drm

I am aware this is supposedly (saying supposedly because every computer is different and I'm not particularly well versed in this) not necessary any longer, but people are bound to have this issue if they follow the video. This is the solution if you want to keep the module removal in.