Ubuntu16.04安装NVIDIA驱动390.87

版权声明:本文为博主原创文章,未经作者允许请勿转载。 https://blog.csdn.net/heiheiya https://blog.csdn.net/heiheiya/article/details/82627387

我的GPU是GeForce 1080 Ti,首先到Nvidia官网下载对应的驱动版本。

我下载的是NVIDIA-Linux-x86_64-390.87.run。

网上查了资料说是要禁用Ubuntu自带的显卡驱动nouveau,只有在禁用掉 nouveau 后才能顺利安装 NVIDIA 显卡驱动。

禁用方法:

sudo vim /etc/modprobe.d/blacklist-nouveau.conf

在其中添加如下内容:

blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off

执行命令使设置生效。

sudo update-initramfs -u

把旧的驱动卸载。

sudo apt-get purge nvidia*

之后会提示使用下面的命令完全卸载。

sudo apt-get autoremove

卸载之后就可以着手重装新的驱动了。

首先要关闭图形模式。

sudo service lightdm stop
sudo reboot

之后按Ctrl+Alt+F1 进入命令行模式登录。

进入驱动文件目录,执行

sudo sh ./NVIDIA-Linux-x86_64-390.87.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。

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。

安装完成之后,重启电脑。

挂载nvidia驱动。

modprobe nvidia

检查一下安装是否成功。

nvidia-smi

猜你喜欢

转载自blog.csdn.net/heiheiya/article/details/82627387