Ubuntu16.04系统安装nvidia驱动的一个简单方法
昨天运行一个建模程序的时候总感觉运行不流畅,于是想到是否跟显卡驱动有关。然后就上网找了一些方法进行安装,本以为可以很容易就解决,结果却是错误频出。本人Ubuntu16.04系统,显卡GT750 Ti。刚开始试了直接通过system setting里的software&updates进行更新安装,结果出现循环登录的情况;后来试了ppa源方式通过命令行安装,也试了从nvidia官网下载.run文件进行安装,结果出现的问题都是在安装过程中会出现error,生成/var/log/nvidia-installer.log,里面显示:
Unable to load: nvidia-installer ncurses v6 user interface
Using: nvidia-installer ncurses user interface
-> Detected 8 CPUs online; setting concurrency level to 8.
-> Installing NVIDIA driver version 418.56.
-> Running distribution scripts
executing: '/usr/lib/nvidia/pre-install'...
-> done.
-> The distribution-provided pre-install script failed! Are you sure you want to continue? (Answer: Abort installation)
ERROR: Installation has failed. Please see the file '/var/log/nvidia-installer.log' for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.
然后当然还是循环登录的问题。
最后,是这样解决的:
- 禁用Ubuntu自带驱动nouveau:在/etc/modprobe.d/blacklist.conf中添加:
blacklist nouveau options nouveau modeset=0
- 安装ppa源:
sudo add-apt-repository ppa:graphics-drivers/ppa ;sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo update-initramfs -u
- 进入system settings中的software & updates里进行additional drivers的更新,然后重启即可完成。