Install CUDA 6.0 on Ubuntu 14.04 LTS

Source: Internet
Author: User

Ubuntu 14.04 LTS is out, loads of new features has been added. Here is some procedures I followed to the install CUDA 6.0 on my DELL Inspiron.

First of all, Ubuntu need to be installed successfully, and Thenecessary Libs is also need to installed:

sudo apt-get install build-essential gcc-4.4 g++-4.4 libxi-dev libxmu-dev Freeglut3-dev


Things need to the before start the installationprocess:
1. Latest NVIDIA Graphic Driver (nvidia-linux-x86_64-331.49.run)
2. CUDA 6.0 installation file (Cuda_6.0.37_linux_64.run)

Now let ' s install the graphic driver

If you ' re not sure your system type, press Ctrl+alt+t to Openterminal and run:

Uname-m

1. Find out your graphics card model

Use the LSPCI command to find out the model of your Graphicscard

$ LSPCI-VNN | Grep-i vga-a 1201:00.0 VGA compatible Controller [0300]: NVIDIA Corporation GT218 [GeForce] [10de:0a65] (Rev A2) (pr Og-if [VGA Controller])        Subsystem:asustek Computer Inc. Device [1043:8,416]

2. Find out the right driver version for your graphics card

Visit http://www.nvidia.com/Download/index.aspx
Fill in the details about your graphics card and system and Thenclick Search. On the next page, it should that the Correctdriver version with a download link and additional information.

For the above GeForce card, it showed 331.67 as the correctdriver which can is downloaded from the website. However we shallinstall the drivers from PPA to make things easier.

3. Setup the Xorg-edgers PPA

The Xorg-edgers PPA provides the very latest Nvidia drivers. Runthe following commands to set it up.

$ sudo add-apt-repository ppa:xorg-edgers/ppa-y
$ sudo apt-get update

Now the PPA was setup and the package information is also updated.

 4. Install the driver

Either you can install the driver directly by installing a single package containing "Nvidia" and the major version number (173, 304, 310, 313, 319, 331, 334 or 337).

# 331 Driver
$ sudo apt-get install nvidia-331
# 334 Driver
$ sudo apt-get install nvidia-334
# Install the latest version
$ sudo apt-get install nvidia-current
Or You can enable it from the ' Additional Drivers ' section. This was different on different Ubuntu flavors. 
5. Verify the installation

The last thing to does is verify that the Nvidia drivers is loadedand working. Run the LSPCI command again and this time the kerneldriver should show Nvidia

$ LSPCI-VNN | Grep-i vga-a 12

Check the last line which says "kernel driver in Use:nvidia". Thisshows that Nvidia drivers is now in action. Also check hardwareacceleration with the Glxinfo command

$ glxinfo | grep OpenGL | grep Rendereropengl renderer String:geforce 210/pcie/sse2

The OpenGL renderer string should is anything other than "MESA". Then it indicates the hardware drivers is being used for hardware acceleration.

6. Nvidia Settings Tool

Nvidia would install a GUI tool called "Nvidia X Server Settings" Somewhere in the menu. It can also is launched from the command line using the command "Nvidia-settings". The tool shows miscellaneous information about the graphics card and the monitor connected, and also allows to configure V Arious options.


7. Removing the drivers

Incase anything goes wrong after the installation, like you is notable to boot Ubuntu, then try removing the Nvidia drive Rs.

Boot into the Recovery Console from the Grub menu and then issuethe following commands

# remount Root file system as writable
$ mount-o REMOUNT,RW/
# Remove all Nvidia Packages
$ apt-get Purge nvidia*
Additional Notes

Many tutorials out there talk about blacklisting the Nouveau driver. This is no longer necessary, since the Nvidia driver would blacklist nouveau itself. This can is verified by checking the contents of Nvidia driver files in the the MODPROBE.D directory.

$ grep ' Nouveau '/etc/modprobe.d/* | grep nvidia
/etc/modprobe.d/nvidia-331_hybrid.conf:blacklist nouveau/etc/modprobe.d/nvidia-331_hybrid.conf:blacklist Lbm-nouveau/etc/modprobe.d/nvidia-331_hybrid.conf:alias nouveau Off/etc/modprobe.d/nvidia-331_hybrid.conf:alias Lbm-nouveau off/etc/modprobe.d/nvidia-graphics-drivers.conf:blacklist nouveau/etc/modprobe.d/ Nvidia-graphics-drivers.conf:blacklist Lbm-nouveau/etc/modprobe.d/nvidia-graphics-drivers.conf:alias nouveau off/ Etc/modprobe.d/nvidia-graphics-drivers.conf:alias Lbm-nouveau off

Note the files "nvidia-331_hybrid.conf" and "nvidia-graphics-drivers.conf" have blacklisted nouveau.

To check information on the NVIDIA driver module, use the commands Lsmod, modprobe and Modinfo

# Check that Nvidia kernel module was loaded or not
$ lsmod | grep nvidia
Nvidia              10699336  DRM                   302817  2 nvidia# Find the real name of the Nvidia module$ Modprobe-r Nvidianvidia_ 331# details about the nvidia_331 module$ modinfo nvidia_331filename:       /lib/modules/3.13.0-24-generic/updates/dkms /nvidia_331.koalias:          char-major-195-*version:        331.67supported:      externallicense:        nvidia .....

The kernel module file for the Nvidia driver are located at "/lib/modules/3.13.0-24-generic/updates/dkms/nvidia_331.ko".

Note that it's a "dkms" module which means, its loaded dynamically. Due to this grub screen, the Ubuntu/kubuntu splash screens would has a low resolution since at that time the Nvidia D Rivers was not in effect, and whatever resolution was available via the VESA extensions, is used.

8. Another Option$ sudo add-apt-repository Ppa:xorg-edgers/ppa
$ sudo apt-get update
$ sudo apt-get install nvidia-340 Then remove it$ sudo apt-get remove nvidia-3409. Install CUDA$ sudo apt installnvidia-cuda-toolkit One more tip: Highlight CUDA syntax in Sublime CD ~/.config/sublime-text-2/packages/user git clonegit://github.com/harrism/sublimetext-cuda-cpp.git

Install CUDA 6.0 on Ubuntu 14.04 LTS

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.