Can't get CUDA toolkit working on my Jetson

I got my Jetson the other day, and after hours of fiddling around with it I still can’t use it. I ran the installer.sh file as the README says to do. I then tried to connect to it from a working instance of NSight eclipse on my MacBook Pro but it always fails with “Failed to connect sshd on :22”. I verified that the same MBP can ping the Jetson over my home network.

I then tried to install the CUDA toolkit on my Jetson, following the instructions in the CUDA Getting Started Guide for Linux. However, when I reach section 3.7 (page 12), I run the following command to install the cuda-repo-l4t-r19.2_6.0-42_armhf.deb file which I downloaded from https://developer.nvidia.com/jetson-tk1-support but I get the same “broken pipe” message every time, as seen here:

$ sudo dpkg -i cuda-repo-l4t-r19.2_6.0-42_armhf.deb
(Reading database … 130336 files and directories currently installed.)
Preparing to unpack cuda-repo-l4t-r19.2_6.0-42_armhf.deb …
Unpacking cuda-repo-l4t-r19.2 (6.0-42) …
dpkg: error processing archive cuda-repo-l4t-r19.2_6.0-42_armhf.deb (–install):
trying to overwrite ‘/etc/apt/sources.list.d/cuda.list’, which is also in package cuda-repo-ubuntu1204 6.0-37
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
cuda-repo-l4t-r19.2_6.0-42_armhf.deb

I have no idea how to proceed. I am at my wit’s end with this, getting ready to smash my Jetson to little pieces! >:-(

Please help.

Thanks,
Josh

It would be helpful if you could tell us some details such as:

Are you using any display? Are you working directly on the Jetson TK1, for example with an HDMI monitor/HDTV with a USB hub connecting a mouse and keyboard? Or are you trying to do everything via SSH? Are you connecting to the serial port console? Are you using a VGA/SVGA monitor?

However you are getting onto the system: You might want to do the following, generally frowned upon because you must tread carefully.

sudo /bin/bash
su - root
df -h
dmesg |less
cd /var/log
ls -l

df -h will let you know if you’re simply running out of space, quite possible and even likely.
dmesg |less should let you know if the system is throwing error messages. Looking at the size of the error logs in /var/log may give a clue; huge error logs that grow rapidly are a bad sign.

A bit of advice I can give for free here is that the base unit doesn’t have a lot of space to install new things, and even adding a 16G card for /dev/mmcblk1p1 and making that your /usr partition, will still leave you a bit short on space. You may want to invest in an external USB drive; you can get a 1Tb drive for around U$70.00 or so.

See also the Jetson Support Page at https://developer.nvidia.com/jetson-tk1-support

Consider buying an external drive and then following the instructions in the https://developer.nvidia.com/linux-tegra-rel-19 Tegra For Linux 19.2 page. The Quick Start Guide is essential, and this will help you either flash a new Ubuntu 14.04 and the NVIDIA drivers to the Jetson TK1, or install the filesystem and drivers to an external USB or SATA add-on internal drive, and flash the board’s /dev/mmcblk0 (eMMC) to boot the drive where you install.

Thanks underdogma. I’ve decided to try using NSight on Ubuntu 12.04.4 installed via Parallels on my Mac. After installing the operating system, I followed the instructions found here:

http://devblogs.nvidia.com/parallelforall/nvidia-nsight-eclipse-edition-for-jetson-tk1

After figuring out that there was a typo in one of the command lines (the use of “dpkg - i” is supposed to be “dpkg -i”) I managed to get to the part where the author says “In the terminal window use the scp utility to copy the remaining libraries from your Jetson TK1:”. However, when I run the scp utility with the appropriate IP address for my Jetson…

scp ubuntu@10.0.1.15:/usr/lib/arm-linux-gnueabihf/libglut.so.3 /usr/arm-linux-gnueabihf/lib/

…I now get an error of “no hostkey alg”. So this leaves me unable to copy over the ARM version of the libraries to which the sample app must link. I’ve searched the Web looking for a solution to this, and generally people say to re-create some key files:

ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key

However, when I try to do this I get a “permission denied” error. Unfortunately I don’t know what to do next (this is my first time ever using Linux). UPDATE: I used ‘sudo’ before the ssh-keygen commands and it was able to create the new files, but the scp command still fails with “no hostkey alg”.

Also, when I try to run a simple test app (based on the New Project template for a CUDA runtime app), I try to upload it to the Jetson and specify its username and IP address (ubuntu@10.0.1.15) in NSight’s “Debug CUDA Application” window. However, every time I try to connect to my Jetson to validate the filesystem paths, I get a popup error window stating "Failed to connect sshd on “10.0.1.15:22"” It’s the same problem I was having when trying to use NSight on OS X Mavericks earlier this weekend.

I’m baffled here. Really losing enthusiasm to learn CUDA at this point, which is unfortunate because it seems very cool and worth knowing. If you, or anyone else, knows how to resolve this issue I’d really appreciate the help.

Thanks,
Josh

Your mac has an Intel chip? Do you have an external harddrive or USB memory drive stick? That would have to be a big one, 16G or more.

Try to download and burn an Ubuntu "live CD’ for whatever Intel chip your Mac sports. If it’s intel duo 32-bit download that live-cd, if it’s 64-bit, gt that one. Boot to the live CD, and once you are there, mount the USB stick and make it a Linux drive.

Assuming that from the booted Ubuntu live-cd you get on a terminal app (‘xterm’ is something you could search for and use):

dmesg

done right after you plug in the USB stick should give you the drive spec, you should see a lot of “sdb” (or “sdc” or “sdd” etc) associated with text about seeing a new memory device. Let’s say it’s sdb

fdisk /dev/sdb

From within fdisk use the menu to partition the drive, follow the prompts, you can google how to do this. Make it one partition. Change the partition type to linux. Type “w” to make the changes permanent.

mke2fs /dev/sdb1

The file system will be initialized (“formatted”).

Once it’s done, it should be visible in the file browser window.

Now download the files to that. It had better be 16G drive or larger. Now follow the instructions on the Linux for Tegra 19.2 support page; use the USB drive you just made as the location for all file operations that will eventually go onto the Jetson board. These will persist after reboot since the USB stick is non-volatile.

You will have to flash this to the Jetson board. Once this has been done, you can go back to using the Mac but probably just use SSH from the Mac, or plug the keyboard, mouse, and monitor/HDTV into the board for further work.

BTW don’t give up on CUDA for Jetson because you are trying to work from a Mac, which isn’t supported as the installer. ;)

The Ubuntu live-cd

Thanks, I’ll give that a try this weekend.