Headless mode is not working

Hi,

I am running the Jetson Nano headless which means there is no screen attached.

The first thing that I noticed is that the GNOME shell does not start anymore. I am accessing the desktop via VNC and I only get to see the NVIDIA logo after connecting to the VNC server. In another thread I have already laid out my steps to avoid this problem. I have finally installed Xfce and LightDM because GNOME is a memory hog and Xfce does give me a desktop in headless mode via VNC. The real problem is that the VisionWorks demos are not running and I suspect this is connected to a missing “MetaMode” of the NVIDIA driver.

Output of “nvx_demo_feature_tracker”:

nvidia@jetson-nano:/usr/share/visionworks/sources/bin/aarch64/linux/release$ ./nvx_demo_feature_tracker
VisionWorks library info:
	 VisionWorks version : 1.6.0
	 OpenVX Standard version : 1.1.0

NvMMLiteOpen : Block : BlockType = 260 
NVMEDIA: Reading sys.display-size : status: 6 
NvMMLiteBlockCreate : Block : BlockType = 260 
Allocating new output: 1280x720 (x 10), ThumbnailMode = 0
OPENMAX: HandleNewStreamFormat: 3595: Send OMX_EventPortSettingsChanged: nFrameWidth = 1280, nFrameHeight = 720 
Error: Can't create a renderer

I have also tried several other demos and the error message was identical. The option “–nvxio_render=video” produces the same error message.

Content of “/var/log/Xorg.0.log” in headless mode:

[     9.357] 
X.Org X Server 1.19.6
Release Date: 2017-12-20
[     9.357] X Protocol Version 11, Revision 0
[     9.357] Build Operating System: Linux 4.4.0-138-generic aarch64 Ubuntu
[     9.357] Current Operating System: Linux jetson-nano 4.9.140-tegra #1 SMP PREEMPT Wed Mar 13 00:32:22 PDT 2019 aarch64
[     9.357] Kernel command line: tegraid=21.1.2.0.0 ddr_die=4096M@2048M section=512M memtype=0 vpr_resize usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb no_console_suspend=1 console=ttyS0,115200n8 debug_uartport=lsport,0 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec=0x1000@0xff780000 core_edp_mv=1075 core_edp_ma=4000  root=/dev/mmcblk0p1 rw rootwait console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0    root=/dev/mmcblk0p1 rw rootwait console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4 root=/dev/mmcblk0p1 rw rootwait
[     9.357] Build Date: 25 October 2018  04:10:37PM
[     9.357] xorg-server 2:1.19.6-1ubuntu4.2 (For technical support please see http://www.ubuntu.com/support) 
[     9.357] Current version of pixman: 0.34.0
[     9.357]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[     9.357] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[     9.357] (==) Log file: "/var/log/Xorg.0.log", Time: Mon Apr  8 18:33:20 2019
[     9.363] (==) Using config file: "/etc/X11/xorg.conf"
[     9.363] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[     9.366] (==) No Layout section.  Using the first Screen section.
[     9.366] (**) |-->Screen "Screen0" (0)
[     9.366] (**) |   |-->Monitor "Monitor0"
[     9.367] (**) |   |-->Device "Tegra0"
[     9.367] (==) Automatically adding devices
[     9.367] (==) Automatically enabling devices
[     9.367] (==) Automatically adding GPU devices
[     9.367] (==) Automatically binding GPU devices
[     9.367] (==) Max clients allowed: 256, resource mask: 0x1fffff
[     9.377] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[     9.378]    Entry deleted from font path.
[     9.378] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[     9.378]    Entry deleted from font path.
[     9.378] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[     9.378]    Entry deleted from font path.
[     9.382] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[     9.382]    Entry deleted from font path.
[     9.382] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[     9.382]    Entry deleted from font path.
[     9.382] (==) FontPath set to:
        /usr/share/fonts/X11/misc,
        /usr/share/fonts/X11/Type1,
        built-ins
[     9.382] (==) ModulePath set to "/usr/lib/xorg/modules"
[     9.382] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[     9.382] (II) Loader magic: 0x558784a010
[     9.382] (II) Module ABI versions:
[     9.382]    X.Org ANSI C Emulation: 0.4
[     9.382]    X.Org Video Driver: 23.0
[     9.382]    X.Org XInput driver : 24.1
[     9.382]    X.Org Server Extension : 10.0
[     9.387] (++) using VT number 7

[     9.387] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[     9.389] (II) no primary bus or device found
[     9.389] (WW) "dri" will not be loaded unless you've specified it to be loaded elsewhere.
[     9.389] (II) "glx" will be loaded by default.
[     9.389] (II) LoadModule: "extmod"
[     9.389] (II) Module "extmod" already built-in
[     9.389] (II) LoadModule: "glx"
[     9.391] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[     9.428] (II) Module glx: vendor="X.Org Foundation"
[     9.429]    compiled for 1.19.6, module version = 1.0.0
[     9.429]    ABI class: X.Org Server Extension, version 10.0
[     9.429] (II) LoadModule: "nvidia"
[     9.429] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[     9.468] (II) Module nvidia: vendor="NVIDIA Corporation"
[     9.468]    compiled for 4.0.2, module version = 1.0.0
[     9.468]    Module class: X.Org Video Driver
[     9.476] (II) NVIDIA dlloader X Driver  32.1.0  Release Build  (integ_stage_rel)  (buildbrain@mobile-u64-3531)  Wed Mar 13 00:27:48 PDT 2019
[     9.476] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[     9.477] (WW) Falling back to old probe method for NVIDIA
[     9.477] (II) Loading sub module "fb"
[     9.477] (II) LoadModule: "fb"
[     9.478] (II) Loading /usr/lib/xorg/modules/libfb.so
[     9.481] (II) Module fb: vendor="X.Org Foundation"
[     9.481]    compiled for 1.19.6, module version = 1.0.0
[     9.481]    ABI class: X.Org ANSI C Emulation, version 0.4
[     9.481] (II) Loading sub module "wfb"
[     9.481] (II) LoadModule: "wfb"
[     9.481] (II) Loading /usr/lib/xorg/modules/libwfb.so
[     9.484] (II) Module wfb: vendor="X.Org Foundation"
[     9.484]    compiled for 1.19.6, module version = 1.0.0
[     9.484]    ABI class: X.Org ANSI C Emulation, version 0.4
[     9.484] (II) Loading sub module "ramdac"
[     9.484] (II) LoadModule: "ramdac"
[     9.484] (II) Module "ramdac" already built-in
[     9.485] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[     9.486] (**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
[     9.486] (==) NVIDIA(0): RGB weight 888
[     9.486] (==) NVIDIA(0): Default visual is TrueColor
[     9.486] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[     9.486] (DB) xf86MergeOutputClassOptions unsupported bus type 0
[     9.486] (**) NVIDIA(0): Option "ConnectToAcpid" "Off"
[     9.486] (**) NVIDIA(0): Option "AllowEmptyInitialConfiguration" "true"
[     9.486] (**) NVIDIA(0): Enabling 2D acceleration
[     9.486] (II) Loading sub module "glxserver_nvidia"
[     9.486] (II) LoadModule: "glxserver_nvidia"
[     9.486] (II) Loading /usr/lib/xorg/modules/extensions/libglxserver_nvidia.so
[     9.736] (II) Module glxserver_nvidia: vendor="NVIDIA Corporation"
[     9.736]    compiled for 4.0.2, module version = 1.0.0
[     9.736]    Module class: X.Org Server Extension
[     9.736] (II) NVIDIA GLX Module  32.1.0  Release Build  (integ_stage_rel)  (buildbrain@mobile-u64-3531)  Wed Mar 13 00:26:03 PDT 2019
[     9.771] (--) NVIDIA(0): Valid display device(s) on GPU-0 at SoC
[     9.771] (--) NVIDIA(0):     DFP-0
[     9.771] (--) NVIDIA(0):     DFP-1
[     9.771] (II) NVIDIA(0): NVIDIA GPU NVIDIA Tegra X1 (nvgpu) (GM20B) at SoC (GPU-0)
[     9.771] (--) NVIDIA(0): Memory: 4059712 kBytes
[     9.771] (--) NVIDIA(0): VideoBIOS: 
[     9.771] (--) NVIDIA(0): No enabled display devices found; starting anyway because
[     9.771] (--) NVIDIA(0):     AllowEmptyInitialConfiguration is enabled
[     9.771] (II) NVIDIA(0): Validated MetaModes:
[     9.771] (II) NVIDIA(0):     "NULL"
[     9.771] (**) NVIDIA(0): Virtual screen size configured to be 1280 x 800
[     9.771] (WW) NVIDIA(0): Unable to get display device for DPI computation.
[     9.771] (==) NVIDIA(0): DPI set to (75, 75); computed from built-in default
[     9.771] (--) Depth 24 pixmap format is 32 bpp
[     9.772] (II) NVIDIA: Reserving 6144.00 MB of virtual memory for indirect memory
[     9.772] (II) NVIDIA:     access.
[     9.774] (EE) NVIDIA(0): Failed to allocate NVIDIA Error Handler
[     9.831] (II) NVIDIA(0): Setting mode "NULL"
[     9.835] (==) NVIDIA(0): Disabling shared memory pixmaps
[     9.835] (==) NVIDIA(0): Backing store enabled
[     9.835] (==) NVIDIA(0): Silken mouse enabled
[     9.835] (==) NVIDIA(0): DPMS enabled
[     9.835] (II) Loading sub module "dri2"
[     9.835] (II) LoadModule: "dri2"
[     9.835] (II) Module "dri2" already built-in
[     9.835] (II) NVIDIA(0): [DRI2] Setup complete
[     9.835] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia
[     9.835] (--) RandR disabled
[     9.843] (II) SELinux: Disabled on system
[     9.844] (II) Initializing extension GLX
[     9.844] (II) Indirect GLX disabled.
[     9.989] (II) config/udev: Adding input device tegra-hda HDMI/DP,pcm=3 (/dev/input/event0)
[     9.989] (II) No input driver specified, ignoring this device.
[     9.989] (II) This device may have been added with another device file.
[     9.990] (II) config/udev: Adding input device gpio-keys (/dev/input/event1)
[     9.990] (**) gpio-keys: Applying InputClass "libinput keyboard catchall"
[     9.990] (II) LoadModule: "libinput"
[     9.992] (II) Loading /usr/lib/xorg/modules/input/libinput_drv.so
[    10.004] (II) Module libinput: vendor="X.Org Foundation"
[    10.004]    compiled for 1.19.6, module version = 0.27.1
[    10.004]    Module class: X.Org XInput Driver
[    10.004]    ABI class: X.Org XInput driver, version 24.1
[    10.004] (II) Using input driver 'libinput' for 'gpio-keys'
[    10.004] (**) gpio-keys: always reports core events
[    10.005] (**) Option "Device" "/dev/input/event1"
[    10.005] (**) Option "_source" "server/udev"
[    10.006] (II) event1  - gpio-keys: is tagged by udev as: Keyboard
[    10.006] (II) event1  - gpio-keys: device is a keyboard
[    10.006] (II) event1  - gpio-keys: device removed
[    10.028] (**) Option "config_info" "udev:/sys/devices/gpio-keys/input/input1/event1"
[    10.028] (II) XINPUT: Adding extended input device "gpio-keys" (type: KEYBOARD, id 6)
[    10.028] (**) Option "xkb_model" "pc105"
[    10.028] (**) Option "xkb_layout" "us"
[    10.029] (II) event1  - gpio-keys: is tagged by udev as: Keyboard
[    10.029] (II) event1  - gpio-keys: device is a keyboard

Content of “/etc/X11/xorg.conf”:

# Copyright (c) 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"
    Option      "ConnectToAcpid" "Off"
#    Option      "ModeDebug" "true"
EndSection

#Section "Monitor"
#   Identifier    "DSI-0"
#   Option        "Ignore"
#EndSection

Section "Monitor"
   Identifier   "Monitor0"
   HorizSync    5.0-1000.0
   VertRefresh  5.0-200.0
   Modeline     "1280x800" 24.15 1280 1312 1400 1432 800 819 822 841
EndSection

Section "Screen"
   Identifier   "Screen0"
#   Monitor      "DSI-0"
   Monitor      "Monitor0"
   Device       "Tegra0"
   DefaultDepth 24
   Option       "UseEdid" "False"
   SubSection   "Display"
       Depth    24
       Modes    "1280x720"
       Virtual  1280 800
   EndSubSection
EndSection

Btw. my Jetson TX2 shows the same behavior after updating to JetPack 4.2. Is there any chance to solve this issue?

Thank you!

For the GNOME shell does not start anymore.
Try to use “L4T R31.1 Sample Root File System” instead of R32.1 Sample Root File System.

https://docs.nvidia.com/jetson/l4t/Tegra%20Linux%20Driver%20Package%20Development%20Guide/rootfs_custom.html#

Hi ShaneCCC,

thanks for your reply. I will try this on the weekend.

In the meantime: what would be the consequences if using the older version solved the problem?

I just checked the implementation of VisionWorks renderer. It seems it is based on glfw.
Honestly speaking, I don’t think visionworks support headless mode. I also wonder why you are creating a renderer when there is no physical monitor.

If you could run Glfw app by creating a fake one monitor, maybe it has chance visionworks would work too.