Hey @RedEyeNinja,
Great work getting this dual HDMI setup working! The amount of troubleshooting you put into this really shows, and documenting it helps the community immensely.
I wanted to add some context about why your audio routing works the way it does, since I’ve been researching this exact area. The key principle is that Xorg itself doesn’t route audio - it’s a display server - but how you configure outputs in Xorg directly affects whether the HDMI audio hardware remains accessible to ALSA.
When you use xrandr to position HDMI-2 (your soundbar) “to the right” of HDMI-1 with a valid mode like 1920x1080, you’re keeping that HDMI port active in the display system. Even though your UI only shows on HDMI-1, keeping HDMI-2 clocked and initialized prevents the kernel from shutting down the audio device associated with that port. HDMI carries both video and audio on the same physical connection, so the driver assumes if video is off, audio isn’t needed either.
That’s why your script works - by keeping both outputs active in non-overlapping virtual space, all the hardware stays powered and available to your audio subsystem.
I wrote a similar guide for keeping HDMI audio extractors working while running the Touch Display UI on DSI panels, tackling the same underlying issue from a different angle:
[Guide] Keep HDMI audio extractor working while the Touch Display UI runs on DSI
Your dual HDMI approach and the positioning logic in your fix-outputs.sh script are solid. Nice job working through all those power and hardware gotchas too!
Just wanted to flag this for the Volumio team (@volumio) - it might be worth considering some built-in support for advanced audio routing scenarios like this. Soundbars connected via HDMI are becoming increasingly common, and users are clearly running into these edge cases.
Also tagging @gvolt - this could be a valuable reference for adding optional logic to the Touch Display plugin, especially for handling multi-output configurations where audio needs to stay on a specific DSI/eDP/HDMI port.
Kind Regards,