Ubuntu 16.04 Nvidia驱动安装正确姿势
又是感谢学长的一天!!!
1.查看显卡信息:
$ lspci | grep VGA
2.下载驱动程序:
http://www.nvidia.cn/Download/index.aspx
下载完之后是一个名称为 NVIDIA-Linux-x86_64-xxx.xx.run 的文件
3.删除原有驱动:
$ sudo apt-get remove --purge nvidia*
4.临时关闭显示服务
sudo service lightdm stop
5.运行安装程序
sudo chmod +x NVIDIA-Linux-x86_64-410.78.run
sudo ./NVIDIA-Linux-x86_64-410.78.run
安装过程中一些选项:
The distribution-provided pre-install script failed! Are you sure you want to continue? 选择 yes 继续
Would you like to register the kernel module souces with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later? 选择 No 继续
问题没记住,选项是:install without signing
问题大概是:Nvidia’s 32-bit compatibility libraries? 选择 No 继续
Would you like to run the nvidia-xconfigutility to automatically update your x configuration so that the NVIDIA x driver will be used when you restart x? Any pre-existing x confile will be backed up. 选择 Yes 继续
6.挂载Nvidia驱动:
$ modprobe nvidia
7.安装后再重启显示
sudo service lightdm start
8.检查驱动是否安装成功:
$ nvidia-smi
注意cuda版本与pytorch版本一致。