1. Download nvidia driver
Download the driver file (.run format) from the NVIDIA official website: https://www.nvidia.com/en-us/drivers/results/133571/
Just download your own corresponding version
2. Installation
sudo ./NVIDIA-Linux-x86_64-*.run
3. Possible problems encountered
1.you appear to be running an x server please exit x before installing的问题
If you encounter this problem, just close the X service and enter the following command:
sudo /etc/init.d/lightdm stop
sudo /etc/init.d/lightdm status
For other Linux versions, if the desktop system is based on gdm type, you should change lightdm in the command to gdm; if it is not the two desktop system types, Baidu can search the relevant commands for turning off the X service in your Linux version.
After closing the X service, the graphical desktop may be closed. Because I performed the operation through the server connected through ssh, I did not see any specific changes. Then enter the command:
ps aux | grep X
Check whether there are any X service processes. If there are any, just sudo kill -9 process number to kill the X service process:
sudo kill -9 [‘pid’]
2.An NVIDIA kernel module 'nvidia-uvm' appears to already be loaded in your kernel的问题
It's very simple. As mentioned in the original article, the 'nvidia-uvm' program did not exit for some reason, resulting in the failure to proceed normally. Directly:
sudo lsof | grep nvidia.uvm
Just check which programs are occupying nvidia.nvm. You can directly kill the corresponding process through sudo kill -9 [`pid`]
For some processes that cannot be killed by kill, you can directly restart the server.
If the error still exists, you need to check whether the previous driver has been uninstalled:
sudo ./NVIDIA-Linux-x86-3*.run --uninstall
sudo reboot now
After that, the installation will be successful. I encountered these two problems during the installation. If you have any other questions, please feel free to ask.