Setup:
- Jetson Orin Nano devkit (8Gb)
- OS 6.4.0
- local mode
I try to start a X11 server in a docker container in order to show GUI on an attached screen.
To start with, I started with this repository GitHub - balena-io-experimental/jetson-sample-new: Jetson samples for CUDA and OpenCV on Nano, TX2, Xavier and Orin
It seems to completely answer to what I need but… It doesn’t work !
I follow the README in OPENCV container but when I run X
, it doesn’t work and end up with the following error:
root@eec4309d29a3:/usr/src/app# cat /var/log/Xorg.0.log
[ 2813.664]
X.Org X Server 1.21.1.4
X Protocol Version 11, Revision 0
[ 2813.664] Current Operating System: Linux eec4309d29a3 5.15.148-l4t-r36.4-1012.12 #1 SMP PREEMPT Thu Oct 10 15:09:40 UTC 2024 aarch64
[ 2813.664] Kernel command line: mminit_loglevel=4 console=ttyTCU0,115200 firmware_class.path=/etc/firmware fbcon=map:0 video=efifb:off console=tty0 console=null quiet splash vt.global_cursor_default=0 consoleblank=0 l4tver=36.4.3 rootdelay=1 roottimeout=60 sdhci_tegra.en_boot_part_access=1 rootwait video=efifb:off root=LABEL=resin-rootA bl_prof_dataptr=2031616@0x271E10000 bl_prof_ro_ptr=65536@0x271E00000
[ 2813.664] xorg-server 2:21.1.4-2ubuntu1.7~22.04.14 (For technical support please see http://www.ubuntu.com/support)
[ 2813.664] Current version of pixman: 0.40.0
[ 2813.664] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 2813.664] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 2813.665] (==) Log file: "/var/log/Xorg.0.log", Time: Tue May 13 07:38:42 2025
[ 2813.665] (==) Using config file: "/etc/X11/xorg.conf"
[ 2813.665] (==) Using config directory: "/etc/X11/xorg.conf.d"
[ 2813.665] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 2813.665] (==) No Layout section. Using the first Screen section.
[ 2813.665] (==) No screen section available. Using defaults.
[ 2813.665] (**) |-->Screen "Default Screen Section" (0)
[ 2813.665] (**) | |-->Monitor "<default monitor>"
[ 2813.665] (==) No device specified for screen "Default Screen Section".
Using the first device section listed.
[ 2813.665] (**) | |-->Device "Tegra0"
[ 2813.665] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[ 2813.665] (==) Automatically adding devices
[ 2813.665] (==) Automatically enabling devices
[ 2813.665] (==) Automatically adding GPU devices
[ 2813.665] (==) Automatically binding GPU devices
[ 2813.665] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 2813.665] (WW) The directory "/usr/share/fonts/X11/misc" does not exist.
[ 2813.665] Entry deleted from font path.
[ 2813.665] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 2813.665] Entry deleted from font path.
[ 2813.665] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[ 2813.665] Entry deleted from font path.
[ 2813.665] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[ 2813.665] Entry deleted from font path.
[ 2813.665] (WW) The directory "/usr/share/fonts/X11/Type1" does not exist.
[ 2813.665] Entry deleted from font path.
[ 2813.665] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[ 2813.665] Entry deleted from font path.
[ 2813.665] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[ 2813.665] Entry deleted from font path.
[ 2813.665] (==) FontPath set to:
built-ins
[ 2813.665] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 2813.665] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 2813.665] (II) Loader magic: 0xaaaac62e1010
[ 2813.665] (II) Module ABI versions:
[ 2813.666] X.Org ANSI C Emulation: 0.4
[ 2813.666] X.Org Video Driver: 25.2
[ 2813.666] X.Org XInput driver : 24.4
[ 2813.666] X.Org Server Extension : 10.0
[ 2813.666] (EE) dbus-core: error connecting to system bus: org.freedesktop.DBus.Error.FileNotFound (Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory)
[ 2813.666] (--) using VT number 2
[ 2813.666] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[ 2813.667] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 2813.667] (II) Platform probe for /sys/devices/platform/13800000.display/drm/card0
[ 2813.677] (II) xfree86: Adding drm device (/dev/dri/card1)
[ 2813.677] (II) Platform probe for /sys/devices/platform/bus@0/13e00000.host1x/drm/drm/card1
[ 2813.678] (II) no primary bus or device found
[ 2813.678] falling back to /sys/devices/platform/13800000.display/drm/card0
[ 2813.678] (WW) "dri" will not be loaded unless you've specified it to be loaded elsewhere.
[ 2813.678] (II) "glx" will be loaded by default.
[ 2813.678] (II) LoadModule: "extmod"
[ 2813.678] (II) Module "extmod" already built-in
[ 2813.678] (II) LoadModule: "glx"
[ 2813.678] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 2813.680] (II) Module glx: vendor="X.Org Foundation"
[ 2813.680] compiled for 1.21.1.4, module version = 1.0.0
[ 2813.680] ABI class: X.Org Server Extension, version 10.0
[ 2813.680] (II) LoadModule: "nvidia"
[ 2813.680] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[ 2813.682] (II) Module nvidia: vendor="NVIDIA Corporation"
[ 2813.682] compiled for 1.6.99.901, module version = 1.0.0
[ 2813.682] Module class: X.Org Video Driver
[ 2813.682] (II) NVIDIA dlloader X Driver 540.3.0 Release Build (bugfix_main) (buildbrain@mobile-u64-6367-d8000) Mon May 6 10:09:22 PDT 2024
[ 2813.682] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[ 2813.795] (II) Loading sub module "fb"
[ 2813.795] (II) LoadModule: "fb"
[ 2813.795] (II) Module "fb" already built-in
[ 2813.795] (II) Loading sub module "wfb"
[ 2813.795] (II) LoadModule: "wfb"
[ 2813.795] (II) Loading /usr/lib/xorg/modules/libwfb.so
[ 2813.795] (II) Module wfb: vendor="X.Org Foundation"
[ 2813.796] compiled for 1.21.1.4, module version = 1.0.0
[ 2813.796] ABI class: X.Org ANSI C Emulation, version 0.4
[ 2813.797] (II) NVIDIA(0): Creating default Display subsection in Screen section
"Default Screen Section" for depth/fbbpp 24/32
[ 2813.797] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[ 2813.797] (==) NVIDIA(0): RGB weight 888
[ 2813.797] (==) NVIDIA(0): Default visual is TrueColor
[ 2813.797] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[ 2813.797] (**) NVIDIA(0): Option "AllowEmptyInitialConfiguration" "true"
[ 2813.797] (**) NVIDIA(0): Enabling 2D acceleration
[ 2813.797] (II) Loading sub module "glxserver_nvidia"
[ 2813.797] (II) LoadModule: "glxserver_nvidia"
[ 2813.798] (II) Loading /usr/lib/xorg/modules/extensions/libglxserver_nvidia.so
[ 2813.804] (II) Module glxserver_nvidia: vendor="NVIDIA Corporation"
[ 2813.804] compiled for 1.6.99.901, module version = 1.0.0
[ 2813.804] Module class: X.Org Server Extension
[ 2813.804] (II) NVIDIA GLX Module 540.3.0 Release Build (bugfix_main) (buildbrain@mobile-u64-6367-d8000) Mon May 6 10:07:17 PDT 2024
[ 2813.804] (II) NVIDIA: The X server supports PRIME Render Offload.
[ 2813.809] (EE) NVIDIA(GPU-0): Failed to select a display subsystem.
[ 2813.810] (EE) NVIDIA(0): Failing initialization of X screen
[ 2813.810] (II) UnloadModule: "nvidia"
[ 2813.810] (II) UnloadSubModule: "glxserver_nvidia"
[ 2813.810] (II) Unloading glxserver_nvidia
[ 2813.810] (II) UnloadSubModule: "wfb"
[ 2813.810] (==) NVIDIA(G0): Depth 24, (==) framebuffer bpp 32
[ 2813.810] (==) NVIDIA(G0): RGB weight 888
[ 2813.810] (==) NVIDIA(G0): Default visual is TrueColor
[ 2813.810] (==) NVIDIA(G0): Using gamma correction (1.0, 1.0, 1.0)
[ 2813.810] (**) NVIDIA(G0): Enabling 2D acceleration
[ 2813.810] (II) NVIDIA: The X server supports PRIME Render Offload.
[ 2813.810] (EE) NVIDIA(GPU-1): Failed to initialize the NVIDIA graphics device!
[ 2813.811] (EE) NVIDIA(G0): Failing initialization of X screen
[ 2813.811] (II) UnloadModule: "nvidia"
[ 2813.811] (II) UnloadSubModule: "wfb"
[ 2813.811] (EE) Screen(s) found, but none have a usable configuration.
[ 2813.811] (EE)
Fatal server error:
[ 2813.811] (EE) no screens found(EE)
[ 2813.811] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 2813.811] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 2813.811] (EE)
[ 2813.875] (EE) Server terminated with error (1). Closing log file.
In the main terminal (where I run balena push), I can see the following things at startup (I don’t know if it is linked or not):
[Logs] [2025-05-13T07:42:30.557Z] [opencv] Found nvidia_drm
[Logs] [2025-05-13T07:42:30.557Z] [opencv] rmmod: ERROR: Module nvidia_drm is in use
Content of xorg.conf:
root@288e985e7a0e:/usr/src/app# cat /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"
EndSection
Remark : when I launch X, screen blinks then come back to Balena logo so it looks like it sends data to the screen. I tried with 2 different screens and have the same behavior.
What I’ve already tried
- Screen is detected (
cat /sys/class/drm/card0-DP-1/status
returns “connected”) - I tried to add dbus label to solve the first error (see error logs) using
ENV DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket
andio.balena.features.dbus: '1'
and still have the same issue:
root@254841b5cc24:/usr/src/app# cat /var/log/Xorg.0.log | grep EE
[ 3199.471] Current Operating System: Linux 254841b5cc24 5.15.148-l4t-r36.4-1012.12 #1 SMP PREEMPT Thu Oct 10 15:09:40 UTC 2024 aarch64
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 3199.614] (EE) NVIDIA(GPU-0): Failed to select a display subsystem.
[ 3199.627] (EE) NVIDIA(0): Failing initialization of X screen
[ 3199.627] (EE) NVIDIA(GPU-1): Failed to initialize the NVIDIA graphics device!
[ 3199.627] (EE) NVIDIA(G0): Failing initialization of X screen
[ 3199.627] (EE) Screen(s) found, but none have a usable configuration.
[ 3199.627] (EE)
[ 3199.627] (EE) no screens found(EE)
[ 3199.627] (EE)
[ 3199.627] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 3199.627] (EE)
[ 3199.712] (EE) Server terminated with error (1). Closing log file.
- I tried to use Jetson Linux 36.4 BSP instead of 36.3 (changed nothing)