Ubuntu14.04 Install NVIDIA graphics driver, Cuda8.0_ubuntu

Source: Internet
Author: User

References: http://blog.csdn.net/u013294888/article/details/56666023 steps:

No. 0 Step: Close secure boot; This step is the most critical, otherwise you will not be able to install ....
First step: Install Nvidia graphics driver
First, disable open source drivers that may cause problems, edit/etc/modprobe.d/blacklist.conf;
sudo gedit/etc/modprobe.d/blacklist.conf
Add Content:
Blacklist AMD76X_EDAC
Blacklist VGA16FB
Blacklist nouveau
Blacklist NVIDIAFB
Blacklist RIVATV//may not need so much
Uninstall clean all installed nvidia drivers:
sudo apt-get remove–purge nvidia-*
Add the driver source by executing the following command:
sudo add-apt-repository Ppa:graphics-drivers/ppa
sudo apt-get update

Below enter tty1 mode execution:
Recommended CTRL+ALT+F1 switch to tty1 execution:
Close LIGHTDM
sudo service LIGHTDM stop
or input: sudo/etc/
sudo apt-get install nvidia-375 nvidia-settings nvidia-prime
sudo nvidia-xconfig//cannot be performed
sudo apt-get install Mesa-common-dev//installation of missing libraries
sudo apt-get install Freeglut3-dev
sudo update-initramfs-u
sudo reboot
Restart should not encounter the problem of circular login;
This is optional, I have no problem:
After the reboot, the entry is still in the tty1 mode:
And then:
SUDO/ETC/INIT.D/LIGHTDM restart
Back to the desktop system.

Second installation CUDA8.0:
I used the. Run installation method,
cd/download/
sudo chmod +x cuda_8.0.61_375.26_linux.run
sudo./cuda_8.0.61_375.26_linux.run
Then install according to the command line prompt:
Click the Q exit clause to browse or press the blanks until the end of the clause, enter accept acceptance clause;
Input n does not install Nvidia image driver, the front has been installed good driver;
Enter Y to install CUDA 8.0 Toolkit;
Carriage return Confirmation Cuda the default installation path (/usr/local/cuda-8.0);
Enter Y to install Cuda 8.0 Samples;
Enter CUDA 8.0 Samples installation path:/home/username/cuda/samples (choose your favorite directory for installation).
At this point, the CUDA8.0 has also been installed.

Then: sudo reboot
After the reboot, enter the CUDNN installation.

Third installation CUDNN:
cd/download/
Tar zxvf cudnn-8.0-linux-x64-v5.1.tgz
CD cuda/
sudo cp include/cudnn.h/usr/local/include/
sudo cp lib64/libcudnn.*/usr/local/lib
Here's how to set up a soft connection:
sudo ln-sf/usr/local/lib/libcudnn.so.5.1.10/usr/local/lib/libcudnn.so.5
sudo ln-sf/usr/local/lib/libcudnn.so.5/usr/local/lib/libcudnn.so
sudo ldconfig-v
To set environment variables:
Add CUDA environment variables to/etc/profile:
sudo gedit/etc/profile

Add the following 2 sentences at the end:
Export ld_library_path=/usr/local/cuda-8.0/lib64/:/usr/local/cuda/lib64:ldlibrarypathexportpath=/usr/local/ Cuda−8.0/bin:/usr/local/cuda/bin:path
After saving, execute the following command to have the environment variable take effect immediately
Source/etc/profile

Also need to add Lib Library path: Add File cuda.conf in/etc/ld.so.conf.d/, as follows
sudo ldconfig

Next, look at your video card situation:
Lspci | Grep-i VGA
Lspci | Grep-i nvidia
Nvcc-v

Where: Disable Nouveau kernel driver, the official website to the method is to add a nvidia-install-xxx.conf file under/etc/modprobe.d/, remove it when disabling.
Then, there is a relatively simple way to switch the graphics drive is in the System-setting software & updates, the last column, additional Drivers, where to switch graphics driver, and then restart the effective test.

Then remember to install cuda8.0, official website: https://developer.nvidia.com/cuda-downloads
To select Runfile, do not use the Deb file .... Say much is the tear ....
The test method is to make the samples and then go to release./devicequery Display video card information

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.