Here's a fix that maybe 4 other people on earth will need. I had this happen on Ubuntu 24.10, but it's quite possible if you attempt to install Roonbridge on 24.04 (LTS) you'll have the same issues, depending on exactly when you reboot. To be honest, I'm not 100% sure of why the problem occurs. I think it's a timing/race condition, but it could also just be bad code. The instructions below should fix things either way.
Requirements: Ubuntu 24.x, RoonBridge 1.8 (build 1124 stable) and a Raspberry Pi 5.
Symptoms: After following installation instructions for RoonBridge playback via HDMI will cause Roon to skip through several tracks before saying "Too many errors."
Cause:
The issue has to do with the device description strings RAATServer caches in /var/roon/RAATServer/Settings. Since a Pi 5 has 2 HDMI ports, you'll find at least 2 JSON files here named device_(some big string).json. If you have a USB device connected you may find more, so be careful your files are HDMI related before editing. In Ubuntu 24 you'll see the string vc4hdmi, which is how you can tell you aren't editing the wrong kind of file. In any event, it's a simple edit once you know what the issue is.
Here's the first version of my JSON:
{"unique_id": "617c2b7a-8bf6-18d6-0243-1e918a7e673c", "external_config": {}, "output": {"name": "vc4-hdmi-1", "type": "alsa", "device": "hw:CARD=vc4hdmi1,DEV=0", "dsd_mode": "none"}, "volume": {"type": "alsa", "device": "hw:CARD=vc4hdmi1,DEV=0"}}
The problem is the device name should be hdmi:CARD.... As I mentioned, in some cases this may already be correct and you don't need to change a thing.
Fix:
Make sure you have rebooted at least once after ALSA library installation.
Just replace the hw: string highlighted above with hdmi: and you'll be playing 32 bit music through your HDMI port. Here's a finished version:
{"unique_id": "617c2b7a-8bf6-18d6-0243-1e918a7e673c", "external_config": {}, "output": {"name": "vc4-hdmi-1", "type": "alsa", "device": "hdmi:CARD=vc4hdmi1,DEV=0", "dsd_mode": "none"}, "volume": {"type": "alsa", "device": "hdmi:CARD=vc4hdmi1,DEV=0"}}
After these edits:
sudo systemctl restart roonbridge
What happened:
hw:CARD is the raw device name but hdmi:CARD is the ALSA virtual device. The big issue is that RAATServer talks PCM but the raw device does not. The raw device only talks IEC958. In order to talk PCM (S16_LE, S24_LE, etc.) through HDMI the RAATServer should use the virtual device which has the built in PCM to IEC958 translation goodness.
Since you have 2 HDMI devices you might as well fix both files now. Once you make these changes you'll notice the Roon DSP features like upsampling become available.
Why it happened:
This is an error during RoonBridge installation storing the raw device name instead of the virtual device name. It may be a race condition during installation, in the period between when the virtual devices get instantiated by the kernel and the RoonBridge scans the hardware or it could be bad installation code. It's possible the "fix" is a change to the installation instructions, to explicitly reboot after installing ALSA but before installing RoonBridge. I'll leave that up to Roon.
Alternative Installation Guide
As mentioned, a possible solution to this when installing a fresh Ubuntu 24 is to apt install alsa and then do a reboot BEFORE installing RoonBridge.
The theory why this might work is that just installing ALSA doesn't instantiate the virtual devices. That is, after apt install alsa the hdmi:CARD devies don't exist yet, because those get created each time the kernel starts up and not when the library is installed. By rebooting post-ALSA installation the hdmi:CARD virtual devices should exist and therefore, hopefully, the RoonBridge install will see them. If not, go through the steps above. Note that this only works during installation. What I do know is that once the device files are bad reboots alone won't fix the issue.
It's quite possible a number of Pi 5/Ubuntu/Roon users accidentally did this right, or somehow installed ALSA, rebooted and perhaps re-installed Roonbridge from scratch. So for those people this bug wouldn't occur. On the other hand, if you are trying to quickly stand up a minimum installation you really might not have. In my case I rebooted after a full upgrade but before the ALSA libraries were installed, so I suspect that's what kept things from working correctly.
Future Proofing
As mentioned or implied, above, I'm not sure when these files get crated or recreated, but to be sure the hdmi:CARD devices exist before RoonBridge starts you'll need to add an override to the RoonBridge service. There seems to be a difference in the startup sequence between Ubuntu 24.04 and 24.10 so this may be particularly important in 24.10. In any event, better safe than sorry. Let's force RoonBridge to wait for audio and networking to be done before starting. This way any future rewriting of these files by RoonBridge should hopefully happen in the right order.
First:
sudo systemctl edit roonbridge
Add these lines:
[Unit]
Description=RoonBridge
After=sound.target
After=network-online.target
Save and reboot. This will ensure that RoonBridge always starts after sound.target and the network is on. Hopefully then that means that future installations or updates will only recreate those JSON device files correctly. Who knows, this may also solve issues about USB DACs being discovered by RoonBridge or not after a reboot.
You are welcome.




