SDL error with NVIDIA Jetson & GPU Coder
5 views (last 30 days)
Show older comments
Hermann Müller
on 16 Oct 2019
Commented: Paolo Rosettani
on 26 Sep 2022
I am trying to use MATLAB (R2019b), GPU Coder and GPU Coder Support Package for NVIDIA GPUs to compile MATLAB code and run it on the NVIDIA Jetson AGX Xavier (Jetson OS).
I can create a working connection to the Jetson Hardware, all libraries are installed and being detected:
Checking for CUDA availability on the Target...
Checking for 'nvcc' in the target system path...
Checking for cuDNN library availability on the Target...
Checking for TensorRT library availability on the Target...
Checking for prerequisite libraries is complete.
Gathering hardware details...
Gathering hardware details is complete.
Board name : NVIDIA Jetson AGX Xavier
CUDA Version : 10.0
cuDNN Version : 7.5
TensorRT Version : 5.1
Available Webcams : USB 2.0 Camera
Available GPUs : Xavier
This example here works fine (adding two numbers on the Jetson GPU and comparing them with MATLAB results): https://de.mathworks.com/help/supportpkg/nvidia/ug/build-run-on-nvidia-hardware.html
Then, I tried this example: https://de.mathworks.com/help/supportpkg/nvidia/examples/sobel-edge-detection-using-webcam-on-nvidia-jetson.html
Connection, compilation and deployment on the jetson works fine.
The Jetson shows different behaviors:
- On the first run after boot, the Ubuntu Desktop disappears and shows some sort of "boot output" (See screenshot
).
- All subsequent runs without reboot don't produce the screen.
In both cases, there is an error message in the log file generated on the Jetson:
No protocol specified
No protocol specified
Unable to init SDL: Unable to open a console terminal
No protocol specified
No protocol specified
Unable to set video mode: Unable to open a console terminal
SDL was not preinstalled on the jetson, I manually installed it. SDL Version is (using sdl-config --version) 1.2.15
Any suggestions what the problem could be?
Thanks in advance
1 Comment
Accepted Answer
Ramakrishna Mandalapu
on 17 Oct 2019
Hi Hermann,
I am assuming that you are having Jetpack version > 3.3 on the target board.This issue is regarding the change of the display environment value on the target board for Jetpack version > 3.3. For this version of Jetpack, before running the application on the target board, you should set the display environment in MATLAB using hwobj.setDisplayEnvironment('value') (hwobj is the object of jetson or drive class). This setting is available from R2019a version of MATLAB, as you are using R2019b MATLAB, you will have this.
To obtain the display environment value, please log in to the target board and run the below command.
$ echo $DISPLAY
expected output: "0.0" for Jetpack <= 3.3 and "1.0" for Jetpack > 3.3.
Create a hardware object for the target board.
hwobj = jetson('ip address','user name','password');
Set the target display environment in MATLAB using
hwobj.setDisplayEnvironment('1.0')
Run the application on target board using
hwobj.runApplication('function name').
You will be able to see the display window on target monitor.
Cheers.
More Answers (0)
See Also
Categories
Find more on Deployment in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!