How to Setup CUDA 7.0 on NVIDIA Jetson TX1 with JetPack – Detailed

The most recent version of NVIDIA JetPack is 2.2., which supports the NVIDIA Jetson TX1 and Jetson TK1. The big news is that the latest version of JetPack 2.2 turns the userspace to 64 bit! In earlier versions of JetPack, the kernel was 64 bit, but the userspace was 32 bit apparently from what a source has told me.

Now with the userspace at 64 bit, you’ll have an easier time compiling and running arm64 libraries. Note that we’ll be flashing our NVIDIA Jetson TX1, so everything on it will be formatted. Remember to back up your files!

We made an earlier post last year on how to run CUDA 7.0 on NVIDIA Jetson TX1. In this post, we’ll outline very detailed instructions on setting up CUDA 7.0 for the NVIDIA Jetson TX1s from start to finish.


  1. NVIDIA Jetson TX1, AC adapter, and WiFi antennas
  2. HDMI cable and monitor
  3. Computer with Ubuntu 14.04 or Laptop with VirtualBox
  4. Micro-B to USB Cable
  5. Keyboard

Step 1) We create an Ubuntu 14.04 x86 64-bit virtual machine with at least 15 GB of space to be safe.

I’m using VirtualBox to create the Ubuntu 14.04 x86 64-bit virtual machine. If you have an Ubuntu 14.04 x86 64-bit host operating system, you do not have to create the virtual machine. 15 GB of space will give you enough room for the Jetpack downloaded files. I set mine with 30 GB of space because I want to have other stuff on this VM for later.


Step 2) On the virtual machine, download the latest Jetpack installer here. You will need to log in or create a new member account.

The latest version of Jetpack installer will be below. We are using JetPack Version 2.2.




After logging in, hit the blue button and download JetPack.


Step 3) You should have a file called The name may be different, but we want to run it.

Open up a new terminal and go to the directory where JetPack was downloaded.

cd ~/Downloads

We want to change the permissions of JetPack, so that we can run it in the terminal.

chmod 755

Now, we can run the program.

sudo ./

Step 4) Downloading JetPack packages.

After running the above terminal command, a JetPack window should pop up.


Hit Next a couple of times.

Select Jetson TX1 Development Kit (64-bit) and hit Next.

Select Custom because we don’t need half of the JetPack stuff.


We will set most of these to no action by clicking underneath the Action column and setting the packages to no action.


The packages that we want are: CUDA Toolkit for Ubuntu 14.04, Linux for Tegra (TX1 64-Bit), Flash OS, CUDA Toolkit for L4T, and Compile CUDA Samples.


We just don’t need most of the other stuff if you only want CUDA on your NVIDIA Jetson TX1. Pick and choose any other extra packages if you want them.

Step 5) Hit Next to initiate the download and wait.

Hit Next and Accept All Terms and Conditions.


Depending on the component selection, please pay attention to the prompt embedded terminal. OK.

Sit back and relax because these download files are fairly big, so we’ll have to wait a while.




JetPack Host installation will complete, and you can click Next to Proceed.


The prompt will ask you about Network Layout. I chose Device accesses Internet via router/switch.

Please select the network interface on host that connects to the same router/switch as:

I put wlan0 because I will be using the antennas to access the Internet through Wi-Fi. Our host computer will be using the Internet to send files to our NVIDIA TX1 Jetson. Hit Next.

Step 6) Post Installation. We will have to put our NVIDIA TX1 Jetson in Force USB Recovery Mode.


After hitting Next on this prompt, you will be brought to the Flash 64 Bit OS to TX1 device step.


The black terminal window says that we have to put the Jetson into Force USB Recovery Mode.

  1. Power down the Jetson.
  2. Connect the Micro-B to USB cable from the Jetson to your computer.
  3. Press the POWER button and let go. The Jetson powers up like normal. Press and hold the FORCE RECOVERY button, and while holding the FORCE RECOVERY button, press the RESET button and let go of the RESET button. After two more seconds, let go of the FORCE RECOVERY button.


Make sure that your virtual machine detects the NVIDIA Corp USB device. Go to the Devices tab at the top of the virtual machine, go to USB, and select NVIDIA Corp. APX.


Back at the black terminal window, press Enter, and the OS flashing starts. Now, you just wait.


Flashing completes, and you press Enter in the black terminal window.


Step 7) After flashing completes, connect an HDMI cable to your monitor. Your Jetson should have booted into Ubuntu 14.04. Connect to Wi-Fi on your Jetson.

Your virtual machine wants to run the CUDA installation instructions to your Jetson, but it can’t find the Jetson’s IP address!


If you connect your Jetson to a monitor, you will see that your Jetson should have booted into Ubuntu 14.04. Now, we connect the Jetson to Wi-Fi.


The password for the ubuntu user is: ubuntu.

I’m only using the keyboard to maneuver. Press ALT + F1, press Enter, and search for “Network.” Use tabs to maneuver and open Wi-Fi. Connect to a WiFi network.


Now, we want to open a terminal and press CTRL + ALT + T. With the terminal open, we type:



We see that the given IP address for our Jetson is:

Now back on our virtual machine on this screen, we hit 2 and press Enter.


A JetPack window will pop up and we can fill in the: Device IP address, User Name, and Password:


User Name and Password are both ubuntu. Hit Next, and you will be brought to Post Installation for CUDA for the Jetson.

Step 8) Post installation for CUDA.

Hit Next on this screen.


JetPack will be copying CUDA files onto the Jetson through the Internet. It will also run CUDA installation commands on your Jetson.


CUDA takes a really long time to copy and install, so you’ll be waiting a long while. After CUDA finishes, a JetPack window will pop up and Installation will be Complete.


Step 9) Making sure that CUDA is installed on the Jetson.

Back to the Jetson, open a new terminal with CTRL + ALT + T.

cd ~/cuda-l4t

You can use to install CUDA 7.0. In this folder, there is also the .deb file for CUDA 7.0.

sudo ./ .cuda-repo-l4t-7-0-local_7.0-76_arm64.deb 7.0 7-0

Hit Y and Enter on any prompt asking for permission. CUDA 7.0 should be installed, but its binaries haven’t been applied globally yet. An entry has been automatically added to ~/.bashrc, but you still need to reload the ~/.bashrc.

source ~/.bashrc

Now, check if CUDA 7.0 is installed.

nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Thu_May__5 22:52:38_CDT_2016
Cuda compilation tools, release 7.0, V7.0.74

Step 10) Testing if CUDA 7.0 works on the Jetson.

JetPack has set up some CUDA samples that we can use to test.

cd ~/NVIDIA_CUDA-7.0_Samples/bin/aarch64/linux/release

We can run the Ocean Simulation sample. Cool!



We can test the nbody sample to check our Jetson’s performance.

./nbody -benchmark -numbodies=65536


I’m getting 264.744 single-precision GFLOP/s at 20 flops per interaction. In the past, we’ve gotten 318.763 single-precision GLOP/s at 20 flops per interaction.

But, we certainly know that CUDA 7.0 is working on the NVIDIA Jetson TX1! Leave any questions below, and run more CUDA samples for fun.


How to Install CUDA on NVIDIA Jetson TX1 [Deprecated]

Updated 2016 post – detailed version. (The method shown in this guide is outdated) This guide shows you how to install CUDA on the NVIDIA Jetson TX1. Currently, Nvidia’s Jetpack installer does not work properly. This blog post will show a work-around for getting CUDA to work on the TX1.

Download the following files inside a directory first. Here are the two links for the files that you will need to download beforehand:

Updating your apt-get sources

Navigate to the directory where you downloaded the files and type in:

dpkg -i cuda-repo-l4t-r23.1-7-0-local_7.0-71_armhf.deb

Next, you want to update the sources by typing in:

apt-get update

Now, your apt-get repositories will have all of the CUDA libraries and files you may need for any future modifications.

Installing CUDA dependencies

Next, go to the directory where you downloaded the Jetpack installer and make the file executable by typing in:

chmod +x

Now, run the file:


The .run file should have unpacked its contents into a new directory called “_installer”

Go into the _installer directory and type in:

./ ../cuda-repo-l4t-r23.1-7-0-local_7.0-71_armhf.deb 7.0 7-0

**Note that ../cuda-repo-l4t-r23.1-7-0-local_7.0-71_armhf.deb is the location of the .deb file you downloaded earlier.

Now, you have every CUDA dependency installed. However, there are a few more things you have to do.


NVCC as a global call

NVCC is not linked globally (nvcc -V gives an error), and you need to do a few more things to fix this. First, let’s edit the .bashrc file.

vim .bashrc

The screenshot below shots what should be appended to the .bashrc file after the installation. I also put a copy of the exports below.

“:$PATH” should be after “export PATH=/usr/local/cuda-7.0/bin”

Now, execute the .bashrc file.

source .bashrc

Now to make sure that everything is working, type in:

nvcc -V


Running Some CUDA Samples

Now, let’s run some CUDA samples and scale the GPU to max frequency.

Scaling GPU Frequency

You can find out your GPU rates by typing in:

cat /sys/kernel/debug/clock/gbus/possible_rates

Now, let’s set the GPU frequency to its maximum possible rate for some performance purposes.

echo 998400000 > /sys/kernel/debug/clock/override.gbus/rate
echo 1 > /sys/kernel/debug/clock/override.gbus/state
cat /sys/kernel/debug/clock/gbus/rate

You can lower the GPU frequency with the same steps above.

Running the nbody simulation and smoke particles

Navigate to the simulations (5_Simulations) directory containing both the nbody simulation and smoke particles samples:

cd /usr/local/cuda-7.0/samples/5_Simulations/

Now, navigate to the nbody directory and run make. Then, type in:

./nbody -benchmark -numbodies=65536

The results are approximately two times the performance of the previous generation Jetson, the TK1 @ 157 GFLOPS

Navigate to the smokeparticles directory and run make. Then type in:


Recover Nvidia Android TV Shield Manually


Files needed:

Recovery Images

This tutorial is for restoring your entire TV Shield in the event something unfortunate happens. In order for this to work, your TV Shield has to be able to boot up and display the Nvidia logo on screen. Otherwise, your TV Shield is bricked, and there is nothing you can do about it.


1. Unplug your power cable and connect a USB OTG cable to your computer.

Now, here is the tricky part that requires perfect timing.


2. Connect your power cable and almost immediately hold the power button for roughly 3 seconds.

** This may take multiple attempts to get the timing down. You may want to hold the power button for slightly longer than 3 seconds, ~3.1/3.2 seconds.

If successful, you should see the bootloader screen.

Tap the power button to navigate the menu and hold the power button to select.


3. Now go to the folder where you downloaded the files and type in the following commands:

./fastboot flash recovery recovery.img
./fastboot flash boot boot.img
./fastboot flash system system.img
./fastboot flash userdata userdata.img
./fastboot flash staging blob
./fastboot flash dtb

** Your device may or may not need to restart after each command, which means repeating the steps above. Also, you may not need to flash all of the above depending on what files are damaged.