Hi
We attempted to get a desktop environment working on a Raspberry Pi CM4 on a custom board (the host image is Raspberry Pi CM4 IO Board). HDMI0 is connected to a monitor and we get a splash screen, but it fails to start X. See log below.
The example from Running a full desktop in a container failed to build because of a dependency on an old distro version, so we updated it to buster.
The GPU is given 256MB shared RAM.
Here is the dockerfile:
FROM balenalib/%%BALENA_MACHINE_NAME%%-debian:buster-run
# Install XORG
RUN install_packages xserver-xorg-core \
xserver-xorg-input-all \
xserver-xorg-video-fbdev \
xorg \
xinit \
xfce4 \
xfce4-terminal \
x11-xserver-utils \
dbus-x11 \
matchbox-keyboard \
xterm
# Disable screen from turning it off
RUN echo "#!/bin/bash" > /etc/X11/xinit/xserverrc \
&& echo "" >> /etc/X11/xinit/xserverrc \
&& echo "rm -f /tmp/.X0-lock" >> /etc/X11/xinit/xserverrc \
&& echo 'exec /usr/bin/X -s 0 dpms -nolisten tcp "$@"' >> /etc/X11/xinit/xserverrc
# Setting working directory
WORKDIR /usr/src/app
COPY . ./
ENV UDEV=1
# Avoid requesting XFCE4 question on X start
ENV XFCE_PANEL_MIGRATE_DEFAULT=1
CMD ["bash", "start_x86.sh"]
Here is start_x64.sh:
#!/usr/bin/bash
export DISPLAY=:0.0
export DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket
# start desktop manager
echo "STARTING X"
startx
Here is output from journalctl on the host OS:
Sep 24 12:55:09 206eb30 balena-supervisor[210288]: [event] Event: Service restart {"service":{"appId":1,"serviceId":1,"serviceName":"main","commit":"10ca12e1ea5e","rele>
Sep 24 12:55:09 206eb30 e9ccf1b90d0b[2170]: STARTING X
Sep 24 12:55:09 206eb30 systemd-udevd[655932]: Using default interface naming scheme 'v250'.
Sep 24 12:55:09 206eb30 e9ccf1b90d0b[2170]: hostname: No address associated with hostname
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: xauth: (stdin):1: bad display name "206eb30:0" in "add" command
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]:
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]:
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: X.Org X Server 1.20.4
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: X Protocol Version 11, Revision 0
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: Build Operating System: Linux 6.1.0-20-arm64 aarch64 Debian
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: Current Operating System: Linux 206eb30 5.15.92-v8 #1 SMP PREEMPT Wed Feb 8 16:47:50 UTC 2023 aarch64
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=HDMI-A->
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: Build Date: 15 April 2024 11:30:14AM
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: xorg-server 2:1.20.4-1+deb10u14 (https://www.debian.org/support)
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: Current version of pixman: 0.36.0
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: Before reporting problems, check http://wiki.x.org
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: to make sure that you have the latest version.
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: Markers: (--) probed, (**) from config file, (==) default setting,
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: (++) from command line, (!!) notice, (II) informational,
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: (==) Log file: "/var/log/Xorg.0.log", Time: Tue Sep 24 12:55:10 2024
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: (==) Using system config directory "/usr/share/X11/xorg.conf.d"
Sep 24 12:55:10 206eb30 systemd-udevd[656050]: Using default interface naming scheme 'v250'.
Sep 24 12:55:10 206eb30 systemd-logind[1820]: Watching system buttons on /dev/input/event0 (vc4)
Sep 24 12:55:10 206eb30 systemd-logind[1820]: Watching system buttons on /dev/input/event1 (vc4)
Sep 24 12:55:10 206eb30 systemd-journald[1192]: Missed 1 kernel messages
Sep 24 12:55:10 206eb30 kernel: broken atomic modeset userspace detected, disabling atomic
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: (EE)
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: Fatal server error:
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: (EE) AddScreen/ScreenInit failed for driver 0
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: (EE)
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: (EE)
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: Please consult the The X.Org Foundation support
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: at http://wiki.x.org
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: for help.
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: (EE)
Sep 24 12:55:10 206eb30 e9ccf1b90d0b[2170]: (EE) Server terminated with error (1). Closing log file.
At this point we are stuck and can’t get a graphical environment up, even just a simple app like xterm. Does anyone have any suggestions as to what we can try next?