🛠 Affichage numérique : kiosk double HDMI 4Kp60 sur CM4

Raspberry Pi Compute Module 4 (CM4, 2020) — Board Sheet · avance · Schéma : IMG-compute-module-4-avance-3-kiosk-double-hdmi-cm4.svg — CM4 sur IO Board avec deux écrans HDMI 2.0 côte à côte affichant un tableau de bord plein écran ; le décodage vidéo 4Kp60 (HEVC) du VideoCore VI est indiqué sur le module.

Objectives

The CM4 is the Pi board with the most display interfaces: dual HDMI 2.0 up to 4Kp60, 2 × MIPI DSI, 2 × CSI, and parallel DPI. This tutorial builds a real digital signage client: two screens in kiosk mode, accelerated 4K video playback (hardware HEVC 4Kp60 decoding on the BCM2711), and a session that restarts automatically — the use case targeted by the launch article (“over half of the seven million Raspberry Pi units we sell each year go into industrial and commercial applications”).

Hardware

Full code

# 1) Forcer 4Kp60 sur les deux sorties (config.txt)
sudo tee -a /boot/firmware/config.txt >/dev/null <<'EOF'
hdmi_force_hotplug:0=1
hdmi_force_hotplug:1=1
hdmi_group:0=1
hdmi_mode:0=97
hdmi_group:1=1
hdmi_mode:1=97
EOF
sudo reboot

# 2) Kiosque double écran sous labwc (Wayland)
sudo apt install -y labwc chromium cage
mkdir -p ~/.config/labwc
cat > ~/.config/labwc/autostart <<'EOF'
chromium --kiosk --noerrdialogs --disable-session-crashed-bubble \
  --window-position=0,0 --window-size=3840,2160 http://signage.local/ &
EOF

# 3) Session systemd qui relance le kiosque et l'écran de veille vidéo
sudo systemctl --user enable --now labwc

# 4) Test de décodage matériel 4K
mpv --hwdec=vaapi --loop http://tests.local/uhd_2160p_4k_hevc_10bit.mp4

Expected verification

wlr-randr (or xrandr --query under X11) shows HDMI-0 and HDMI-1 connected at 3840×2160 @ 60 Hz; the kiosk page occupies both screens; during 4K video, vcgencmd measure_temp rises but vcgencmd get_throttled remains at 0x0 with a heatsink; after killing a chromium process, the kiosk restarts automatically.

Common errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials