[Guide] Keep HDMI audio extractor working while the Touch Display UI runs on DSI

Dear Volumionauts,

Various attempts of this workaround have been discussed across a few threads, and more than once the conclusion was left as not possible on Volumio. I had the same doubts, so I approached it with diligence, reproduced the issue on Bookworm Beta, researched what is really happening, and I am sharing both the principle and a noob friendly, step by step path to verify it yourself.

The goal is simple to state but tricky in practice: keep HDMI active for audio extraction while the Touch Display UI runs on the DSI panel at DSI panel resolution with correct touch. The method here does not patch the kernel or change firmware. It changes one file only, /opt/volumiokiosk.sh, and shows exactly how to test each step, how to confirm outputs, and how to calculate the touch calibration so anyone can follow it and reproduce the result.

If you try this and something behaves differently on your setup, please share the log link from http://<volumio_IP>/dev and your xrandr output so we can compare notes.

Note:
This guide uses 800x480 as an example; if your display differs (official Raspberry Pi display, Waveshare, etc.), replace the xrandr resolutions and positions with your panel’s native values and recalculate the touch calibration matrix to match your layout.

Audience:

Beginners

Scope:

Volumio v4.xxx Bookworm Beta on Raspberry Pi 5, DAC/speakers extracting audio from HDMI0, 4.3 inch DSI panel.

Goal:

Show the UI on DSI at 800x480, keep HDMI active for audio, and make touch accurate

Why this was needed

  • Enabling the Touch Display plugin starts Xorg. On some Pi 5 kernels the vc4 HDMI driver throws a warning when it tries to program HDMI audio infoframes, which mutes HDMI audio. By putting the UI only on DSI and keeping HDMI lit for audio, we avoid that path and preserve sound.

What you will change

  • Only one file: /opt/volumiokiosk.sh
  • You will also verify output names with xrandr and apply a simple touch calibration matrix that matches your desktop layout

Back up first

  • sudo cp /opt/volumiokiosk.sh /opt/volumiokiosk.sh.bak
  • If anything goes wrong: sudo cp /opt/volumiokiosk.sh.bak /opt/volumiokiosk.sh && sudo chmod 755 /opt/volumiokiosk.sh && sudo systemctl restart volumio-kiosk

Step 1 - Replace /opt/volumiokiosk.sh with this complete version

  • Paste the entire content below, exactly as-is, then set permissions and restart the kiosk:
  • sudo nano /opt/volumiokiosk.sh (or your editor)
  • paste everything, save, exit
  • sudo chmod 755 /opt/volumiokiosk.sh
  • sudo systemctl restart volumio-kiosk

BEGIN FILE /opt/volumiokiosk.sh

#!/bin/bash
while true; do timeout 3 bash -c "</dev/tcp/127.0.0.1/3000" >/dev/null 2>&1 && break; done
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /data/volumiokiosk/Default/Preferences
sed -i 's/"exit_type":"Crashed"/"exit_type":"None"/' /data/volumiokiosk/Default/Preferences
if [ -L /data/volumiokiosk/SingletonCookie ]; then
  rm -rf /data/volumiokiosk/Singleton*
fi
openbox-session &
export DISPLAY=:0
timeout 5 bash -c 'until xrandr >/dev/null 2>&1; do sleep 0.5; done'
xrandr --output DSI-2 --mode 800x480 --primary --pos 0x0
xrandr --output HDMI-1-1 --mode 1920x1080 --pos 800x0
TS_DEV="$(xinput --list --name-only | grep -i -E 'ft5x06|touch|ts' | head -n1)"
if [ -n "$TS_DEV" ]; then
xinput set-prop "$TS_DEV" "libinput Calibration Matrix" 0.29411765 0 0 0 0.44444444 0 0 0 1 || xinput set-prop "$TS_DEV" "Coordinate Transformation Matrix" 0.29411765 0 0 0 0.44444444 0 0 0 1
fi
while true; do
  /usr/bin/chromium-browser \
    --simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT' \
    --force-device-scale-factor=1 \
    --load-extension= \
    --kiosk \
    --start-fullscreen \
    --window-position=0,0 \
    --window-size=800,480 \
    --touch-events \
    --no-first-run \
    --noerrdialogs \
    --disable-gpu-compositing \
    --disable-3d-apis \
    --disable-breakpad \
    --disable-crash-reporter \
    --disable-background-networking \
    --disable-remote-extensions \
    --disable-pinch \
    --user-data-dir='/data/volumiokiosk'     http://localhost:3000
done

END FILE

What this file does

  • Starts X, waits for it to be ready
  • Places DSI-2 at 0,0 at 800x480 and makes it primary
  • Places HDMI-1-1 to the right at 1920x1080 to keep HDMI clocking for your extractor
  • Launches Chromium sized exactly to 800x480 on the primary display
  • Sets a touch calibration matrix so touches only affect the DSI area

Step 2 - Verify outputs and layout

  • DISPLAY=:0 xrandr --query

  • Expected lines:

    • DSI-2 connected primary 800x480+0+0
    • HDMI-1-1 connected 1920x1080+800+0
    • Screen 0 current 2720 x 1080
  • Play audio in Volumio. You should have sound and a correct UI on the DSI panel.

Step 3 - Touch calibration math explained

  • Total desktop size in this layout: width_total = 800 + 1920 = 2720, height_total = max(480,1080) = 1080

  • DSI rectangle: x=0, y=0, w=800, h=480

  • Matrix values:

    • scaleX = w / width_total = 800 / 2720 = 0.29411765
    • scaleY = h / height_total = 480 / 1080 = 0.44444444
    • offsetX = x / width_total = 0 / 2720 = 0
    • offsetY = y / height_total = 0 / 1080 = 0
  • Calibration matrix format:

    • [ scaleX 0 offsetX ]
    • [ 0 scaleY offsetY ]
    • [ 0 0 1 ]
  • That is exactly what the script sets. If you move screens around, recompute with your numbers and replace the four values.

How to test each part

  • UI placement:

    • DISPLAY=:0 xrandr --query → check positions and sizes
  • Touch device:

    • DISPLAY=:0 xinput --list --name-only → confirm your touchscreen name is auto-detected by the grep
    • If needed, hardcode the exact name in TS_DEV=“your name”
  • Audio:

    • aplay -l → vc4hdmi0 and vc4hdmi1 should appear
    • Stop the kiosk: sudo systemctl stop volumio-kiosk → audio should still work
    • Start again: sudo systemctl start volumio-kiosk → audio should continue

If your output names differ

  • Some builds label outputs differently. Run:

    • DISPLAY=:0 xrandr --query
  • Replace DSI-2 and HDMI-1-1 in the two xrandr lines with your exact names.

Rolling back

  • Restore the backup and restart kiosk:

    • sudo cp /opt/volumiokiosk.sh.bak /opt/volumiokiosk.sh
    • sudo chmod 755 /opt/volumiokiosk.sh
    • sudo systemctl restart volumio-kiosk

Troubleshooting quick list

  • DSI stays blank:

    • Verify you did not force an EDID file in /boot/userconfig.txt
    • Check service: systemctl status volumio-kiosk
    • Read Xorg log: less /var/log/Xorg.0.log
  • Touch hits the wrong area:

    • Remove any map-to-output lines. Use only the calibration matrix as shown.
    • Verify matrix values match your layout math.
  • Audio drops when UI starts:

    • Ensure the UI is confined to DSI and HDMI remains at 1920x1080 to the right
    • If you edited flags, revert to the file above and retest
  • Sending logs for forum help:

    • Use the Volumio log link method: open http://<volumio_IP>/dev and paste the URL you get

Notes

  • Do not apt upgrade on Volumio. Use plugin updates and official images only.
  • This guide changes only the kiosk launcher. No kernel or firmware changes are required.
  • If you later change resolutions or move the screens, recompute the four matrix values and update the script.

Official [PLUGIN] Touch Display community thread.

Kind Regards,

2 Likes

Dear Voluminauts,

This is now implemented here.

Kind Regards,