lsmod | grep nvidia
nvidia 18833408 21
ipmi_msghandler 102400 2 ipmi_devintf,nvidia
sudo rmmod nvidia
rmmod: ERROR: Module nvidia is in use
sudo rmmod -f nvidia
rmmod: ERROR: ../libkmod/libkmod-module.c:793 kmod_module_remove_module() could not remove 'nvidia': Resource temporarily unavailable
rmmod: ERROR: could not remove module nvidia: Resource temporarily unavailable
modinfo nvidia
filename: /lib/modules/5.3.0-28-generic/updates/dkms/nvidia.ko
alias: char-major-195-*
version: 430.26
supported: external
license: NVIDIA
srcversion: 89BDA0F56877588EC9454C6
alias: pci:v000010DEd00000E00sv*sd*bc04sc80i00*
alias: pci:v000010DEd*sv*sd*bc03sc02i00*
alias: pci:v000010DEd*sv*sd*bc03sc00i00*
depends: ipmi_msghandler
retpoline: Y
name: nvidia
vermagic: 5.3.0-28-generic SMP mod_unload
signat: PKCS#7
signer:
sig_key:
sig_hashalgo: md4
parm: NvSwitchRegDwords:NvSwitch regkey (charp)
parm: NVreg_Mobile:int
parm: NVreg_ResmanDebugLevel:int
parm: NVreg_RmLogonRC:int
parm: NVreg_ModifyDeviceFiles:int
parm: NVreg_DeviceFileUID:int
parm: NVreg_DeviceFileGID:int
parm: NVreg_DeviceFileMode:int
parm: NVreg_InitializeSystemMemoryAllocations:int
parm: NVreg_UsePageAttributeTable:int
parm: NVreg_MapRegistersEarly:int
parm: NVreg_RegisterForACPIEvents:int
parm: NVreg_EnablePCIeGen3:int
parm: NVreg_EnableMSI:int
parm: NVreg_TCEBypassMode:int
parm: NVreg_EnableStreamMemOPs:int
parm: NVreg_EnableBacklightHandler:int
parm: NVreg_RestrictProfilingToAdminUsers:int
parm: NVreg_PreserveVideoMemoryAllocations:int
parm: NVreg_DynamicPowerManagement:int
parm: NVreg_EnableUserNUMAManagement:int
parm: NVreg_MemoryPoolSize:int
parm: NVreg_KMallocHeapMaxSize:int
parm: NVreg_VMallocHeapMaxSize:int
parm: NVreg_IgnoreMMIOCheck:int
parm: NVreg_NvLinkDisable:int
parm: NVreg_RegistryDwords:charp
parm: NVreg_RegistryDwordsPerDevice:charp
parm: NVreg_RmMsg:charp
parm: NVreg_GpuBlacklist:charp
parm: NVreg_TemporaryFilePath:charp
parm: NVreg_AssignGpus:charp
How to unload nvidia from kernel?
UPDATE: I have tried to delete Nvidia driver, but it don't help:
sudo apt-get --purge remove "*nvidia*"
sudo /usr/bin/nvidia-uninstall
UPDATE: After reboot:
lsmod | grep nvidia
nvidia_drm 49152 0
nvidia_modeset 1114112 1 nvidia_drm
nvidia 18833408 22 nvidia_modeset
drm_kms_helper 180224 1 nvidia_drm
drm 483328 3 drm_kms_helper,nvidia_drm
ipmi_msghandler 102400 2 ipmi_devintf,nvidia
i2c_nvidia_gpu 16384 0
Since this module is currently in use by another module, you can't. If you don't need it anymore, you can remove the nvidia driver from your system. Another method would be to forcefully remove it with
rmmod -f
, but I would not recommend doing so.