Reload nvidia GPU driver

Reload nvidia GPU driver to fix "NVML: Driver/library version mismatch" error without rebooting. Source

sudo apt purge $DRIVER_TO_DELETE
sudo apt reinstall $DRIVER_OF_CHOICE

sudo systemctl isolate multi-user.target

lsmod | grep nvidia # - to identify the modules needing to be reloaded.
sudo moprobe --remove $ALL_MODULES_IDENTIFIED_ABOVE
sudo insmod $ALL_MODULES_IDENTIFIED_ABOVE

sudo systemctl isolate graphical.target

Comments