Im trying to build an electron app i kiosk mode on a Raspberry Pi5 and I want to wake connected screen if needed. Im trying to do this with echo "on 0" | cec-client -s -d 1 but without any luck. It turns out that a cec-client scan in container gives me * failed to open vchiq instance. In Balena host I can see that vchiq and cec* in /dev/ is missing. What could be the problem here? Does BalenaOS missing this support on Raspberry Pi 5?
LOG:
[Logs] [2025-01-15T13:18:14.388Z] [electron-app] init the display
[Logs] [2025-01-15T13:18:14.403Z] [electron-app] * failed to open vchiq instance
[Logs] [2025-01-15T13:18:14.456Z] [electron-app]
[Logs] [2025-01-15T13:18:14.463Z] [electron-app] X.Org X Server 1.21.1.11
[Logs] [2025-01-15T13:18:14.463Z] [electron-app] X Protocol Version 11, Revision 0
[Logs] [2025-01-15T13:18:14.463Z] [electron-app] Current Operating System: Linux 64995085caff 6.1.77-v8-16k #1 SMP PREEMPT Thu Feb 8 15:07:10 UTC 2024 aarch64
# Basimage för Raspberry Pi 5 och Electron
FROM balenalib/raspberrypi5-ubuntu-node:20250102
LABEL io.balena.features.dbus="1"
LABEL io.balena.features.firmware="1"
LABEL io.balena.features.x11="1"
LABEL io.balena.features.privileged="1"
# Aktivera UDEV
ENV UDEV=1
# Ställ in arbetskatalog
WORKDIR /usr/src/app
RUN apt-get update && apt-get install -y software-properties-common
# Aktivera universe
RUN add-apt-repository universe
# Installera nödvändiga paket
RUN apt-get update && \
apt-get install -y \
unclutter \
xserver-xorg \
x11-xserver-utils \
xserver-xorg-video-fbdev \
libgtk-3-0 \
libnss3 \
libxss1 \
libxtst6 \
libasound2t64 \
libasound2-plugins \
libx11-xcb-dev \
cec-utils \
matchbox-window-manager \
--no-install-recommends && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Skapa katalog för D-Bus socket
RUN mkdir -p /run/dbus
# Installera Electron globalt
RUN npm install -g electron@latest
# Kopiera projektfiler
COPY . .
# Installera projektets beroenden
RUN npm install
# Gör startskriptet körbart
RUN chmod +x start.sh
RUN cat ./start.sh
# Startkommandot
CMD ["./start.sh"]
Start.sh
#!/bin/bash
echo "=> Init the display"
export ELECTRON_ENABLE_LOGGING=true
export ELECTRON_DEBUG_NOTIFICATIONS=true
# Ta bort låsfil om den existerar
rm -f /tmp/.X0-lock
# Aktivera UDEV
if [ -e /etc/init.d/udev ]; then
/etc/init.d/udev start
fi
# Väcka TV om den är avslagen:
echo "on 0" | cec-client -s -d 1
# Sätt upp DISPLAY
export DISPLAY=:0
# Starta X-server
X &
# Vänta på att X-servern ska starta
sleep 3
# Starta matchbox utan muspekare
matchbox-window-manager -use_cursor no -use_titlebar no &
sleep 1
# Döljer pekaren "omedelbart" (idle=0) och på rotfönstret
unclutter -idle 0 -root &
# Inaktivera skärmsläckare och DPMS
xset s off
xset s noblank
xset -dpms
echo "\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#"
echo "\#\#\# START DISPLAY APP! Ver. 5 \#\#\#"
echo "\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#"
# Starta Electron-appen i fullskärmsläge
electron . --no-sandbox --enable-logging --disable-gpu
LOG
[Logs] [2025-01-16T13:22:34.513Z] [electron-app] => Init the display
[Logs] [2025-01-16T13:22:34.564Z] [electron-app] * failed to open vchiq instance
[Logs] [2025-01-16T13:22:34.606Z] [electron-app]
[Logs] [2025-01-16T13:22:34.606Z] [electron-app] X.Org X Server 1.21.1.11
[Logs] [2025-01-16T13:22:34.606Z] [electron-app] X Protocol Version 11, Revision 0
[Logs] [2025-01-16T13:22:34.606Z] [electron-app] Current Operating System: Linux cb96647d3cb8 6.1.77-v8-16k \#1 SMP PREEMPT Thu Feb 8 15:07:10 UTC 2024 aarch64
[Logs] [2025-01-16T13:22:34.606Z] [electron-app] Kernel command line: reboot=w coherent_pool=1M 8250.nr_uarts=1 pci=pcie_bus_safe snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1080 bcm2708_fb.fbdepth=16 bcm2708_fb.fbswap=1 smsc95xx.macaddr=2C:CF:67:75:47:B9 vc_mem.mem_base=0x3fc00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 rootfstype=ext4 rootwait dwc_otg.lpm_enable=0 rootwait console=null quiet splash vt.global_cursor_default=0 consoleblank=0 cgroup_enable=memory root=UUID=ba1eadef-76a1-4836-8bdd-1282f785044c
[Logs] [2025-01-16T13:22:34.606Z] [electron-app] xorg-server 2:21.1.12-1ubuntu1.1 (For technical support please see http://www.ubuntu.com/support)
[Logs] [2025-01-16T13:22:34.606Z] [electron-app] Current version of pixman: 0.42.2
[Logs] [2025-01-16T13:22:34.607Z] [electron-app] Before reporting problems, check http://wiki.x.org
[Logs] [2025-01-16T13:22:34.607Z] [electron-app] to make sure that you have the latest version.
[Logs] [2025-01-16T13:22:34.607Z] [electron-app] Markers: (--) probed, (**) from config file, (==) default setting,
[Logs] [2025-01-16T13:22:34.607Z] [electron-app] (++) from command line, (!!) notice, (II) informational,
[Logs] [2025-01-16T13:22:34.607Z] [electron-app] (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[Logs] [2025-01-16T13:22:34.607Z] [electron-app] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Jan 16 13:22:34 2025
[Logs] [2025-01-16T13:22:34.607Z] [electron-app] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[Logs] [2025-01-16T13:22:34.736Z] [electron-app] The XKEYBOARD keymap compiler (xkbcomp) reports:
[Logs] [2025-01-16T13:22:34.737Z] [electron-app] > Warning: Could not resolve keysym XF86CameraAccessEnable
[Logs] [2025-01-16T13:22:34.737Z] [electron-app] > Warning: Could not resolve keysym XF86CameraAccessDisable
[Logs] [2025-01-16T13:22:34.737Z] [electron-app] > Warning: Could not resolve keysym XF86CameraAccessToggle
[Logs] [2025-01-16T13:22:34.737Z] [electron-app] > Warning: Could not resolve keysym XF86NextElement
[Logs] [2025-01-16T13:22:34.737Z] [electron-app] > Warning: Could not resolve keysym XF86PreviousElement
[Logs] [2025-01-16T13:22:34.737Z] [electron-app] > Warning: Could not resolve keysym XF86AutopilotEngageToggle
[Logs] [2025-01-16T13:22:34.737Z] [electron-app] > Warning: Could not resolve keysym XF86MarkWaypoint
[Logs] [2025-01-16T13:22:34.737Z] [electron-app] > Warning: Could not resolve keysym XF86Sos
[Logs] [2025-01-16T13:22:34.737Z] [electron-app] > Warning: Could not resolve keysym XF86NavChart
[Logs] [2025-01-16T13:22:34.737Z] [electron-app] > Warning: Could not resolve keysym XF86FishingChart
[Logs] [2025-01-16T13:22:34.737Z] [electron-app] > Warning: Could not resolve keysym XF86SingleRangeRadar
[Logs] [2025-01-16T13:22:34.738Z] [electron-app] > Warning: Could not resolve keysym XF86DualRangeRadar
[Logs] [2025-01-16T13:22:34.738Z] [electron-app] > Warning: Could not resolve keysym XF86RadarOverlay
[Logs] [2025-01-16T13:22:34.738Z] [electron-app] > Warning: Could not resolve keysym XF86TraditionalSonar
[Logs] [2025-01-16T13:22:34.738Z] [electron-app] > Warning: Could not resolve keysym XF86ClearvuSonar
[Logs] [2025-01-16T13:22:34.738Z] [electron-app] > Warning: Could not resolve keysym XF86SidevuSonar
[Logs] [2025-01-16T13:22:34.738Z] [electron-app] > Warning: Could not resolve keysym XF86NavInfo
[Logs] [2025-01-16T13:22:34.741Z] [electron-app] Errors from xkbcomp are not fatal to the X server
[Logs] [2025-01-16T13:22:35.637Z] Releasing update locks
[Live] Device state settled
[Logs] [2025-01-16T13:22:38.587Z] [electron-app] \#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#
[Logs] [2025-01-16T13:22:38.587Z] [electron-app] \#\#\# START DISPLAY APP! Ver. 5 \#\#\#
[Logs] [2025-01-16T13:22:38.587Z] [electron-app] \#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#
[Logs] [2025-01-16T13:22:38.701Z] [electron-app] [102:0116/132238.701598:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[Logs] [2025-01-16T13:22:38.876Z] [electron-app] MESA: error: ZINK: vkCreateInstance failed (VK_ERROR_INCOMPATIBLE_DRIVER)
[Logs] [2025-01-16T13:22:38.876Z] [electron-app] glx: failed to create drisw screen
[Logs] [2025-01-16T13:22:38.955Z] [electron-app] [102:0116/132238.955703:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[Logs] [2025-01-16T13:22:38.956Z] [electron-app] [102:0116/132238.955777:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[Logs] [2025-01-16T13:22:38.957Z] [electron-app] [102:0116/132238.957349:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[Logs] [2025-01-16T13:22:38.957Z] [electron-app] [102:0116/132238.957601:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[Logs] [2025-01-16T13:22:38.957Z] [electron-app] [102:0116/132238.957629:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[Logs] [2025-01-16T13:22:38.958Z] [electron-app] [102:0116/132238.957670:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[Logs] [2025-01-16T13:22:38.958Z] [electron-app] [102:0116/132238.957851:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= /org/freedesktop/DBus: unknown error type:
[Logs] [2025-01-16T13:22:38.989Z] [electron-app] [102:0116/132238.989365:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[Logs] [2025-01-16T13:22:39.005Z] [electron-app] [131:0116/132239.004805:WARNING:gpu_memory_buffer_support_x11.cc(49)] dri3 extension not supported.
[Logs] [2025-01-16T13:22:39.006Z] [electron-app] [131:0116/132239.006645:WARNING:sandbox_linux.cc(430)] InitializeSandbox() called with multiple threads in process gpu-process.
[Logs] [2025-01-16T13:22:39.008Z] [electron-app] [131:0116/132239.008095:WARNING:viz_main_impl.cc(85)] VizNullHypothesis is disabled (not a warning)
[Logs] [2025-01-16T13:22:39.027Z] [electron-app] [102:0116/132239.027254:WARNING:bluez_dbus_manager.cc(234)] Floss manager service not available, cannot set Floss enable/disable.
[Logs] [2025-01-16T13:22:39.245Z] [electron-app] [102:0116/132239.245322:INFO:CONSOLE(2)] "%cElectron Security Warning (Insecure Content-Security-Policy) font-weight: bold; This renderer process has either no Content Security
[Logs] [2025-01-16T13:22:39.245Z] [electron-app] Policy set or a policy with "unsafe-eval" enabled. This exposes users of
[Logs] [2025-01-16T13:22:39.245Z] [electron-app] this app to unnecessary security risks.
[Logs] [2025-01-16T13:22:39.245Z] [electron-app]
[Logs] [2025-01-16T13:22:39.245Z] [electron-app] For more information and help, consult
[Logs] [2025-01-16T13:22:39.245Z] [electron-app] https://electronjs.org/docs/tutorial/security.
[Logs] [2025-01-16T13:22:39.245Z] [electron-app] This warning will not show up
[Logs] [2025-01-16T13:22:39.245Z] [electron-app] once the app is packaged.", source: node:electron/js2c/renderer_init (2)
@jaxwtf are you using docker-compose to deploy the project?
If you do, could you please share it?
If not, could you please use it, move the LABEL part from the Dockerfile in there, and share the docker-compose with us here, so we can try to reproduce?
Another thing, for Raspberry Pi 5 I can only select BalenaOS 5.3.22 but for Raspberry Pi 4 its 6.1.24. Is it a problem that I have BalenaOS 6 on a Raspberry Pi 5?