[HowTo]Install VirtualGL and TurboVNC to Jetson TK1

Yes, I am sure that my user is added to vglusers group. This is the output of issuing groups command on user ubuntu

[ubuntu: ~] $ groups ubuntu
ubuntu : ubuntu adm dialout sudo audio video vglusers

Yes, they do work when I launch them using the display directly connected to my Jetson TK1.

Yes, non-OpenGL examples work flawlessly. This is the output of deviceQuery program:

[ubuntu: ~/NVIDIA_CUDA-6.5_Samples/bin/armv7l/linux/release/gnueabihf] $ ./deviceQuery
./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: "GK20A"
  CUDA Driver Version / Runtime Version          6.5 / 6.5
  CUDA Capability Major/Minor version number:    3.2
  Total amount of global memory:                 1892 MBytes (1984385024 bytes)
  ( 1) Multiprocessors, (192) CUDA Cores/MP:     192 CUDA Cores
  GPU Clock rate:                                852 MHz (0.85 GHz)
  Memory Clock rate:                             924 Mhz
  Memory Bus Width:                              64-bit
  L2 Cache Size:                                 131072 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)
  Maximum Layered 1D Texture Size, (num) layers  1D=(16384), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(16384, 16384), 2048 layers
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 32768
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  2048
  Maximum number of threads per block:           1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and kernel execution:          Yes with 1 copy engine(s)
  Run time limit on kernels:                     No
  Integrated GPU sharing Host Memory:            Yes
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      Yes
  Device PCI Bus ID / PCI location ID:           0 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 6.5, CUDA Runtime Version = 6.5, NumDevs = 1, Device0 = GK20A
Result = PASS

@demotomohiro: I was able to successfully run CUDA samples such as oceanfft on turboVNC using VirtualGL in my TX1. However, ROS RVIZ fails to launch in turboVNC and gives a five second framerate when using virtualGL only. Do you have any solutions for this issue?

CUDA samples using OpenGL didn’t work with “vglrun ./filename” on my Shield TV with L4T R24.2.1.
They worked by adding “-nodl” option to vglrun like “vglrun -nodl ./filename”.

Hi, I am just wondering if the method was tested with Jetson TX2. Does the metod function over Bluetooth? Thanks.

What about TX2 ? shoud we use DEBARCH=armhf/arm64/aarch64 ?
As uname -a is showing the system architecture of type aarch64, I believe it think be aarch64. But when I am using aarch64, it is showing system type is not matching with amd64, what is the exact system architecture then ?

amd64 would be your 64-bit AMD CPU on the desktop PC. This is a TK1 forum, you may want to post in the TX2 forum, but generally speaking arm64 or aarch64 would be correct on a TX2. However, this isn’t the issue…the program wasn’t compiled to run on a TX2 if it wants amd64. To run on a TX2 it needs to be compiled for that using arm64/aarch64 tools (native tools if built on a TX2, cross-compile tools if built on a PC).

Do you have the instructions updated? I was trying the old ones but I am not sure if i am doing them right. Thanks in advance.

On comment #14 when i get to line 4. sudo /opt/VirtualGL/bin/vglserver_config. if i execute it i get the following;
is there anything wrong that i did?

I’m sorry but I don’t have Jetson TX2 and I have never tried them on Jetson TX2.

I found the topic about another remote desktop for Jetson TX2.
I don’t know whether it supports OpenGL like TurboVNC and VirtualGL.

You can find how to build libjpeg-turbo, TurboVNC and VirtualGL in following links:
It seems build procedures for Linux didn’t changed since I wrote the comment #18.

vncserver program execute script file ~/.vnc/xstartup.turbovnc.
If that error came from that script file, setting following text to that file might fix it.


startxfce4 &

Package files on Comment #14 are built for 32bit ARM CPU on Jetson TK1.
Package files on Commont #17 are built for 64bit ARM CPU on Shield TV and using newer source codes.
Later one might be better for Jetson TX2.

So i tried to run the pacjage files in comment 17 and i think i almost get it to work but i get this after line 1 in the last code box of the comment:

do you know of any way this can be fixed?

Your screen shot is a same image you posted before.
Are you sure that link is right?

Sorry, i must have posted the wrong link, this is the correct one:

/opt/VirtualGL/bin/vglrun ./OpenGLProgram

It is just a example command. There is no OpenGLProgram executable.
When you run a OpenGL program from VNC client, that command needs to follow after /opt/VirtualGL/bin/vglrun.

vglrun is needed when you run a OpenGL program from a VNC client.
It is not needed when you run it on the desktop displayed on the display connected to your Jetson.
It is also not needed when you run a program which doesn’t use OpenGL.


This command start TurboVNC server

/opt/TurboVNC/bin/vncserver -kill :1

This command stop TurboVNC server

After you start TurboVNC server, you can connect to it from a VNC client and you will see xfce4 desktop.
TurboVNC server provide a desktop environment which is independent from a desktop environment you see on your display connected to a HDMI port on your Jetson.

so just to clarify, all of the lines in comment 17 are being ran in the jetson’s terminal or on the host computer?

comment #17 are executed in the jetson’s terminal, not on the host computer.
You can also connect to your Jetson from the host PC using SSH and do comment #17.

I added some explanation to comment #1 and #17.
I hope that will help you.

Hello demotomohiro
In the TX2 I have my script to open the camera and do object detection.
TX2 works well when I run with the display connected to TX2 but Now the TX2 is in the drone (embedded system-The TX2 is in the quadcopter).
So I want to see what is happening in the TX2 from another pc (remotely) for instance see the object detection from the pc (remotely) and control the TX2 from the PC (remotely)

Until now, I’ve been able to connect to the TX2 via SSH -Y jetson@“mi-ip” and I can control the TX2 but when I run the script to open the camera the video in PC(remotely) is slow

So, Is there any way to get the video remotely from the TX2 to the PC and control the TX2 from the PC?

Thanks in advance.

Hello alberto18_90,
My jetson broke and I have not used jetson for long time. I don’t know best way to solve your problem.
TurboVNC runs desktop environment in jetson and that desktop can be accessed from remote machine.
So most of GUI applications can be controlled remotely.
TurboVNC capture desktop image and encode it using libjpeg-turbo before sending it to the client.
If your script uses OpenGL, you would need to use VirtualGL.

VirtualGL, TurboVNC and libjpeg-turbo package files posted here are not tested on Jetson TK2.
If they don’t work on your jetson, you need to build them from source.

It seems there are other remote desktop work on Jetson TX2.
I don’t know which one is best.

Hello! Thanks for your answer!
I solved it!

  1. follow this tutorial to get a server in the TX2: https://www.rorymon.com/blog/how-to-rdp-to-ubuntu/
  2. In my case, the host machine is Ubuntu 18.04. Open Remmina Remote Desktop client(Installed by default) and put your IP(provided in the tutorial before), User, Password. In the option “Color depth” put “High Color 16 bpp”