OpenGL app on JetsonTX2 without a real monitor via x11vnc


Sorry for posting this recurring question.

The most similar one to my question is this.
Jetson TX1 Desktop Sharing Resolution Problem Without Real Monitor

Let me summarize my situation and understanding.

  1. in general, vnc operates on its own :x remotely
  2. 1 means even opengl command is executed remotely
  3. virtualgl can help 2, but still on :x
  4. x11vnc directly operates on :0 like windows desktop

Actually, I am satisfied by the speed of 4,
but found one big problem.

$ nvidia-detector

And in my X log,

[     8.321] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[     8.322] (==) NVIDIA(0): RGB weight 888
[     8.322] (==) NVIDIA(0): Default visual is TrueColor
[     8.322] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[     8.322] (**) NVIDIA(0): Option "ModeDebug"
[     8.322] (**) NVIDIA(0): Option "AllowEmptyInitialConfiguration" "true"
[     8.322] (**) NVIDIA(0): Enabling 2D acceleration
[     8.324] (--) NVIDIA(0): Valid display device(s) on GPU-0 at SoC
[     8.324] (--) NVIDIA(0):     DFP-0
[     8.324] (II) NVIDIA(0): NVIDIA GPU NVIDIA Tegra X2 (nvgpu) (GP10B) at SoC (GPU-0)
[     8.324] (--) NVIDIA(0): Memory: 8042776 kBytes
[     8.324] (--) NVIDIA(0): VideoBIOS: 
[     8.324] (==) NVIDIA(0): 
[     8.324] (==) NVIDIA(0): No modes were requested; the default mode "nvidia-auto-select"
[     8.324] (==) NVIDIA(0):     will be used as the requested mode.
[     8.324] (==) NVIDIA(0): 
[     8.324] (--) NVIDIA(0): No enabled display devices found; starting anyway because
[     8.324] (--) NVIDIA(0):     AllowEmptyInitialConfiguration is enabled
[     8.325] (II) NVIDIA(0): Validated MetaModes:
[     8.325] (**) NVIDIA(0): Virtual screen size configured to be 1920 x 1240
[     8.375] (II) NVIDIA(0): Setting mode "NULL"

My app is kivy, which utilizes SDL2.
And SDL2 won’t get initialized because it can’t find the NVIDIA driver.

I got stuck at this point.
I would appreciate any advice to set NVIDIA driver correctly in this headless mode.


I’ve never used “nvidia-detector”…perhaps this was intended for a PCIe-based GPU instead of the integrated GPU (wired directly to the memory controller instead of over PCIe). I see the package which provides this program is “ubuntu-drivers-common”, so I’m thinking this may not work and anything depending on it wouldn’t understand the memory controller version of a GPU (I’m speculating, but I also see “none” on my PC which is running a PCIe card…perhaps this only works with the Nouveau driver).

Oh, thanks for checking! I can see only two programs starting with “nvidia-”, so simply thought it works as its name suggests.

But anyway, "Setting mode “NULL” is obviously wrong, right?


Sorry that I am not familiar with vnc and SDL2. Could you share more about the actual issue?

I guess this method may help if you want to configure such usecase. Take tx1 for example, DSI panel is configured in device tree and xrandr can still detect it even w/o physical device.

For example, I flashed my tx1 with p2371-2180.conf, which enables one DSI panel in head0(primary).

The xrandr shows
nvidia@tegra-ubuntu:~$ xrandr
Screen 0: minimum 8 x 8, current 1200 x 1920, maximum 16384 x 16384
DSI-0 connected primary 1200x1920+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1200x1920 60.00*

Yes. Thanks for asking.

An actual issue is that SDL2 fails to get initialized by leaving an error message “no available displays”,
only when my traffic analysis app is launched remotely(vnc) without no physical monitor connected to Jetson TX2.

It works fine when running locally with a connected monitor.
Also, I confirmed glxgears can be launched remotely(vnc) without a monitor, and stay running without any problem.
So, the problem lies in the combination of vnc + SDL2 + headless.

I have installed sdl2 library via apt, whose version is 2.0.4.
From the source code, I found the error message comes from here.

So it checks displays from xrandr.

Interesting. Then, SDL could successfully get initialized.
But is it possible to try on TX2 as well?

Here’s an output of xrandr, executed in a remote display.

nvidia@tegra-ubuntu:~$ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1240, maximum 32767 x 32767
HDMI-0 disconnected primary (normal left inverted right x axis y axis)

TX2 should also work but much more tricky. TX2 has plugin-manager in dts and only enables those panels when connector is detected. However, those part can be removed.

I see, thanks. At this point, I don’t want to redefine our validation process of the production including flushing.

So, I will attach a fake HDMI dongle.