[Professional Pro Test] Ubuntu16.04 Install NVIDIA graphics driver (CUDA)--Solve all your puzzles

Source: Internet
Author: User
Tags chmod

Because we need to install CAFFE2, configure the cuda8.0, but the installation of Nvidia driver really is I stumped, read a lot of posts have no effect, now I re-summed up the next several installation methods (pro-test effective), hoping to help everyone.

View version Drivers

nvidia driver


method One:

PPA source Installation driver

sudo add-apt-repository ppa:graphics-drivers/ppa  
sudo apt-get update  
sudo apt-get install nvidia-390 # Here to change the appropriate version of the
sudo apt-get install mesa-common-dev  
sudo apt-get install Freeglut3-dev

Test

after rebooting, enter in the terminal:

Nvidia-smi  #若出现电脑GPU列表, that is, the installation is successful
or
nvidia-settings #显示你的显卡信息

method Two: Manually to the official website to download. Run File Installation yourself


after the download is complete:

Uninstall all the previous drivers:

#for case1:original driver installed by apt-get:
sudo apt-get remove--purge nvidia*

#for case2:original Driver Installed by runfile:
sudo chmod +x *.run
sudo./nvidia-linux-x86_64-384.59.run--uninstall

Disable Nouveau:

sudo gedit/etc/modprobe.d/blacklist.conf
1

On the last line add:

Blacklist nouveau

After that, execute the command:

sudo update-initramfs-u
computer restarts after you perform
lsmod | grep nouveau  #没有输出, which means the installation was successful
Installation Drive go to command line interface

CTRL-ALT+F1, then enter the user name and password to log in. give execute permission to the drive run file (if the [sudo] computer name appears because the Chinese Ubuntu is installed, enter the login password)

CD Downloads
sudo chmod a+x nvidia-linux-x86_64-375.20.run
installation (note parameters)
sudo./nvidia-linux-x86_64-375.20.run–no-opengl-files
–no-opengl-filesInstall only the driver files and do not install OpenGL files. This parameter is most important –no-x-check do not check the X service when installing the driver –no-nouveau-check install the driver without checking Nouveau
The following two parameters are not added. Reboot with No recurring logon issues

PS: If because of their own operation error, loop login do not panic, do not reinstall the system, follow my steps, I have encountered these pits.

Circular Login Workaround

I hope we can all install successfully. If you encounter any problems, please describe your question in the comments.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.