Jetson tx2-4G run cuda sample failed

when i run oceanFFT on serial console ,i run export DISPLAY=:0 or export DISPLAY=:1 but it failed print

eanFFT idia-desktop:/usr/local/cuda-10.0/samples/bin/aarch64/linux/release# ./oc
NOTE: The CUDA Samples are not meant for performance measurements. Results may vary when GPU Boost is enabled.

[CUDA FFT Ocean Simulation]

Left mouse button - rotate
Middle mouse button - pan
Right mouse button - zoom
‘w’ key - toggle wireframe
[CUDA FFT Ocean Simulation]
No protocol specified
freeglut (./oceanFFT): failed to open display ‘:0’

FFT dia@nvidia-desktop:/usr/local/cuda/samples/bin/aarch64/linux/release$ ./oceanF
NOTE: The CUDA Samples are not meant for performance measurements. Results may vary when GPU Boost is enabled.

[CUDA FFT Ocean Simulation]

Left mouse button - rotate
Middle mouse button - pan
Right mouse button - zoom
‘w’ key - toggle wireframe
[CUDA FFT Ocean Simulation]
freeglut (./oceanFFT): failed to open display ‘:1’

my /etc/x11/xorg.conf as follows
c/X11/xorg.confesktop:/usr/local/cuda/samples/bin/aarch64/linux/release$ cat /et

Copyright © 2011-2013 NVIDIA CORPORATION. All Rights Reserved.

This is the minimal configuration necessary to use the Tegra driver.

Please refer to the xorg.conf man page for more configuration

options provided by the X server, including display-related options

provided by RandR 1.2 and higher.

Disable extensions not useful on Tegra.

Section “Module”
Disable “dri”
SubSection “extmod”
Option “omit xfree86-dga”
EndSubSection
EndSection

Section “Device”
Identifier “Tegra0”
Driver “nvidia”

Allow X server to be started even if no display devices are connected.

Option      "AllowEmptyInitialConfiguration" "true"

EndSection

when i run dmesg i find
nvidia@nvidia-desktop:~$ dmesg | grep tegradc
[ 1.058900] tegradccommon 15200000.dc_common: host1x channel mapped
[ 1.058915] tegradccommon 15200000.dc_common: dc_common syncpt # 1 allocated
[ 1.058957] tegradccommon 15200000.dc_common: dma mapping done
[ 1.060223] tegradc 15210000.nvdisplay: disp0 connected to head1->/host1x/sor1
[ 1.060425] tegradc 15210000.nvdisplay: DT parsed successfully
[ 1.060465] tegradc 15210000.nvdisplay: Display dc.ffffff800b3a0000 registered with id=0
[ 1.071102] tegradc 15210000.nvdisplay: vblank syncpt # 8 for dc 1
[ 1.071112] tegradc 15210000.nvdisplay: vpulse3 syncpt # 9 for dc 1
[ 1.078175] tegradc 15210000.nvdisplay: hdmi: invalid prod list prod_list_hdmi_board
[ 1.078183] tegradc 15210000.nvdisplay: hdmi: tegra_hdmi_tmds_range_read(bd) failed
[ 1.086161] tegradc 15210000.nvdisplay: probed
[ 1.098754] tegradc 15210000.nvdisplay: fb registered
[ 15.391078] tegradc 15210000.nvdisplay: blank - powerdown

Hi,

Just want to confirm the environment first.
Do you have a monitor connected to the Jetson or not?

Thanks.

yes i connect the hdmi monitor

Hi,

Would you mind to follow our steps and try it again?
We can run the oceanFFT sample on JetPack4.3 (CUDA-10.2) and JetPack4.4 (CUDA-10.2).

$ /usr/local/cuda-10.0/bin/cuda-install-samples-10.0.sh .
$ cd NVIDIA_CUDA-10.0_Samples/5_Simulations/oceanFFT/
$ make
$ export DISPLAY=:0
$ ./oceanFFT 

Thanks.

i try it

Hi,

Could you try if export DISPLAY=:1 works ?
Thanks.

i have tried already yet ,it does not work

Does it work if you run directly from the GUI?

From the GUI, what do you see via (may require adding “sudo apt-get install mesa-utils”):

echo $DISPLAY
glxinfo | egrep -i '(nvidia|version)'

When you run from serial console, after setting DISPLAY, do you get the same result from the glxinfo command? Is your serial console login name the same as that used in the GUI?

yes it works from GUI

and my serial console login as the same as gui

From the GUI, if you use command “echo $DISPLAY”, it would show up as either “:0” or “:1”. I’ll assume “:0”, but adjust for your case. Using the correct DISPLAY is quite important. That DISPLAY is for a running GUI, and so if the GUI is logged out, then this cannot succeed. If the user can run the sample from the GUI, then what follows below should always work from serial console to display to that GUI.

From the serial console, if you are logged in as the same user as the one who is currently logged in at the GUI (the GUI which works with the CUDA app), then try this:

  1. export DISPLAY=":0"
  2. cd /where/ever/it/is
  3. ./oceanFFT

If that fails, then check a non-CUDA GUI app to see if it displays:
xterm
…if that works, then the forwarding to the GUI is working as expected, and any failure from the oceanFFT would be due to other causes, e.g., OpenGL/OpenGLES version as an example, or the wrong CUDA version.