Installing CUDA Toolkit 8 on Ubuntu 16.04 Linux Laptop

The following explains how to install CUDA Toolkit 8 on dual graphics cards laptops 64-bit Ubuntu 16.04 Linux. I have tested it on a Acer Aspire E15 with Intel HD Graphics 620 and NVIDIA GeForce 940MX graphics card. The instruction assumes you have the necessary CUDA compatible hardware support.

First Step you have to switch between Intel to Nvidia Graphics Card in Ubuntu 16.04.

Step i. Switch Between Intel and Nvidia Graphics Card in Ubuntu 16.04

For Ubuntu laptops with dual graphics cards, Intel graphics is being used by default. To setup cuda environment and get the best graphics performance for playing games or charting, you need to manually switch to NVIDIA graphics card.

This can be easily done after installing Nvidia graphics drivers and below steps will show you how:
1. Search for and launch “Additional Drivers”

2. When it opens, you can see a list of recommended drivers for your graphics cards:

3. Install NVIDIA proprietary driver as it shows by launching terminal (Ctrl+Alt+T) and run command:
sudo apt-get install nvidia-375

You can Replace nvidia-375or just use nvidia-current for current NVIDIA Driver

4. After installed graphics drivers, re-launch Additional Drivers utility and apply new installed drivers, so it looks like:

5. Finally switch graphics card by launching NVIDIA X Server Settings and select a GPU you want at PRIME Profiles tab.

To apply changes, reboot the laptop and back in.

Step ii. Installing CUDA Toolkit 8 in Ubuntu 16.04

Download CUDA repository package for Ubuntu 16.04 from the CUDA download site and install it in a terminal.
sudo sh
  • Say "No / n" for install Nvidia driver. (becasue already you have install driver in first step)
  • Say "Yes / y" to Install CUDA toolkit & examples
  • Setup CUDA Path Variables (CUDA Environment Setup)
  • Reboot
Verify your installation:
  • NVIDIA Driver verification: 
  • CUDA Toolkit verification:
nvcc -V
Done!! if you have any questions please post your comments below.

Thank you!
nvidia 6790222023062269695

Post a Comment Default Comments Disqus Comments


Home item

Popular Posts

Random Posts