cudaErrorUnknown when trying to run samples


I just received my Nano and I installed the latest SD image (31-05-19).
I compiled the samples from cuda and no error.
Then when I want to launch any binary I got this message:

[CUDA FFT Ocean Simulation]

Left mouse button          - rotate
Middle mouse button        - pan
Right mouse button         - zoom
'w' key                    - toggle wireframe
[CUDA FFT Ocean Simulation] 
GPU Device 0: "NVIDIA Tegra X1" with compute capability 5.3

CUDA error at oceanFFT.cpp:296 code=30(cudaErrorUnknown) "cudaGraphicsGLRegisterBuffer(&cuda_heightVB_resource, heightVertexBuffer, cudaGraphicsMapFlagsWriteDiscard)"

NB: I am headless with NoMachine and I changed the xorg.conf to avoid the blackscreen (hope it’s not the reason of the error).



After setting SD card, please remember to flash device and install our libraries with sdkmanager:

Have you applied this?

For sure the SD card is flashed since I am logged into my Nano through NoMachine.

I didn’t install SDKManager because the host my PC is on Windows. Also I don’t think I need it to test cuda samples.
Here is the video from where I learn how to use it :

Basically what I did their was:

cd /usr/local/cuda
cd samples
./ ~
cd ~/NVIDIA_CUDA-10.0_Samples
make -j4
cd bin/aarch64/linux/release



To run CUDA sample, you will need the aarch64 CUDA toolkit from the SDKmanager.

The only build I can download is amd64 CUDA toolkit from here:


You will need to install it from the SDK manager.
All the image and packages for Jetson are included in the SDK manager.

Maybe a ubuntu16.04 docker is a possible solution for your environment.


Apparently if I flash the JetPack 4.2.1 SD card image, I already have all libraries from SDK manager installed.