ubuntu18.04 install nvidia drive
2020-03-21 本文已影响0人
荆白雪_1984
https://www.cnblogs.com/xiaojianliu/p/9292680.html
https://www.jianshu.com/p/fc5edbd6f480
1.禁止集成的nouveau驱动
Ubuntu系统集成的显卡驱动程序是nouveau,它是第三方为NVIDIA开发的开源驱动,我们需要先将其屏蔽才能安装NVIDIA官方驱动。
将驱动添加到黑名单blacklist.conf中,但是由于该文件的属性不允许修改。所以需要先修改文件属性。
$ sudo ls -lh /etc/modprobe.d/blacklist.conf
$ sudo chmod 666 /etc/modprobe.d/blacklist.conf
$ sudo apt-get install vim-gtk
$ sudo vim /etc/modprobe.d/blacklist.conf
blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist rivatv
blacklist nvidiafb
$ sudo apt-get remove --purge nvidia-*
$ sudo add-apt-repository ppa:graphics-drivers/ppa
$ sudo apt update
$ ubuntu-drivers devices
vendor : NVIDIA Corporation
driver : nvidia-driver-415 - third-party free
driver : nvidia-driver-440 - third-party free recommended
driver : nvidia-driver-410 - third-party free
driver : nvidia-driver-435 - distro non-free
driver : nvidia-driver-430 - third-party free
driver : xserver-xorg-video-nouveau - distro free builtin
$ sudo apt install nvidia-driver-440
restart
$ nvidia-smi
$ sudo apt-get remove --purge nvidia-*
$ sudo apt autoremove
$ sudo chmod 755 NVIDIA-Linux-x86_64-440.44.run #修改权限(否则没有访问权限,无法进行指令安装)
(ctrl+alt+F1)
$ sudo ./NVIDIA-Linux-x86_64-440.44.run –no-x-check –no-nouveau-check –no-opengl-files #安装驱动
#–no-x-check 关闭X服务
$ sudo reboot
#–no-nouveau-check 禁用nouveau
#–no-opengl-files 不安装OpenGL文件