operating
Look Graphics
lspci | grep N
01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 960M] (rev a2)
07:00.0 Network controller: Intel Corporation Dual Band Wireless-AC 3165 Plus Bluetooth (rev 99)
ubuntu-drivers devices
lshw -numeric -C display
Driver download
https://www.nvidia.com/Download/index.aspx?lang=en-us
http://www.nvidia.cn/Download/driverResults.aspx/156091/cn
Delete the original drive
sudo apt-get remove --purge nvidia*
#sudo apt-get purge bumblebee* bbswitch-dkms
Disable nouveau driver
sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf
sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
To see whether the success of open source driver is disabled
cat /etc/modprobe.d/blacklist-nvidia-nouveau.conf
blacklist nouveau
options nouveau modeset=0
Disable nouveau into force
sudo update-initramfs -u
Restart
reboot
lsmod | grep nouveau
#看是否成功
Obtain the appropriate kernel
https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#system-requirements
$ apt-get install linux-source gcc
$ apt-get install linux-headers-4.15.0-38-generic
$cat /proc/version
Enter the command line operation
重启成功后打开终端,输入如下命令:sudo telinit 3。然后按快捷键:CTRL+ALT+F1 进入字符界面,输入用户名和密码,然后登录系统,进入我们保存下载 NVIDIA 驱动的目录,默认是:Downloads/ 目录,cd Downloads/,然后执行:bash NVIDIA-Linux-x86_64-418.43.bin。注意:NVIDIA-Linux-x86_64-418.43.bin 要根据你下载的驱动文件的名字相应改动。
#installation
$ sudo chmod +x NVIDIA-Linux-x86_64-410.66.run
$ sudo ./NVIDIA-Linux-x86_64-410.66.run
an examination
$ nvidia-smi