USB Audio issues on QNAP Docker installation (ref#G72PR8)

Hi! What’s not quite right with Roon?

· None of the above quite fits

None of the above quite fits

· None of these quite match

Tell us what's going on

· USB Audio on QNAP Docker installation

Tell us about your home network

· Router: Asus RT-AC88U
VPN: None

Good morning,

I am having issues with the detection of the USB DAC (SMSL M500 in this case) connected to my QNAP.

Previously, when I had ROON installed as a QNAP app, I didn’t have any problems and it always detected the DAC. However, since I switched to the Docker installation, every so often I have to restart the container where ROON is installed for it to detect it again.

The docker-compose I have deployed is this:

services:
roonserver:
image: Package roonserver · GitHub
container_name: roonserver
network_mode: host
environment:

  • ROON_INSTALL_BRANCH=production
  • TZ=Europe/Madrid
    volumes:
  • /share/Container/RoonServer/roonData:/Roon
  • /share/Multimedia/Music:/Music
  • /share/Container/RoonServer/roonBackup:/RoonBackups
  • /run/udev:/run/udev:ro
    restart: unless-stopped
    devices:
  • /dev/snd:/dev/snd
  • /dev/bus/usb:/dev/bus/usb
  • /dev/dri:/dev/dri
    group_add:
  • audio
    logging:
    driver: local

As you can see, I have the options configured for USB and HDMI detection. Is there any known bug or issue with USB?

Best regards

Dumb question: Is there any other application in QTS, like HybridDisc Station, Music Station, using the USB-output, or generating sounds which might be pushed out via USB?

Hi.

HybridDisc Station (or HybridDesk i don’t kwon XD) or Music Station is not running in the NAS.
The only way to restore ROON’s output to the USB DAC is by restarting the Docker container.

When I start it, it initially works correctly until (after some hours or days—I’m not sure) the USB DAC becomes unavailable again. I don’t see anything unusual related to this in the container logs.

Hey @Oscar_Martinez1,

Thanks for the report and for your troubleshooting steps tried so far. Based on your description, there are a few potential things that could be causing this issue.

The QNAP host OS may be suspending the USB device after inactivity. When Roon pauses (which it does after 5 seconds of idle), the host can power-gate the USB port. The RAATServer then can’t reopen the ALSA device and crashes. This is the most common cause of this exact pattern on QNAP Docker setups.

With that, as others have mentioned, if anything else on the QNAP host tries to claim the ALSA device (even briefly), RAATServer gets evicted.

In Docker, udev events from the host don’t always propagate correctly into the container. RAATServer may not see the USB device properly re-enumerate after a suspend/resume cycle.

Let’s see if any of the following help:

Disable USB autosuspend on the QNAP host

SSH into your QNAP and run:

# Find the SMSL USB device path
cat /sys/bus/usb/devices/*/product | grep -i smsl
# Then disable autosuspend for it - typically:
echo -1 > /sys/bus/usb/devices/1-2.2/power/autosuspend_delay_ms
echo on > /sys/bus/usb/devices/1-2.2/power/control

To make it permanent, add a udev rule on the QNAP host (not inside Docker):

# /etc/udev/rules.d/99-usb-audio-power.rules
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0x0x0d8c", ATTR{power/control}="on"

(Replace 0d8c with your SMSL’s actual vendor ID from lsusb.)

With that, I’d also run fuser /dev/snd/* on the QNAP host to see if anything else is trying to use the ALSA device. QNAP sometimes has its own audio daemons active.

We’ll be monitoring for your reply! :+1:

First thanks, and apologies for the delay in the response.

Since the last server reboot, the DAC is still visible through Roon Remote. Even so, I carry out the changes you mentioned and keep monitoring it.

Thanks.

Hello @Oscar_Martinez1,

No need to apologize for the delay at all! We are just glad to hear that your SMSL M500 is currently behaving and remaining visible in Roon.

Your docker-compose configuration is completely spot-on. You properly mapped /dev/snd, /dev/bus/usb, and attached the container to the host network with the audio group added. Because your configuration is practically perfect, Benjamin’s diagnosis is almost certainly what was causing the drops: the QNAP host operating system cutting power to the USB hub when the DAC falls idle, which breaks the container’s real-time hardware mapping.

Applying those autosuspend overrides and locking them in with a permanent udev rule directly on the QNAP host is the absolute gold standard fix for this behavior. It forces the NAS to keep that specific USB port continuously live, ensuring the Roon container never loses its hardware handle.

Since you have implemented those changes, we are going to mark this thread as resolved for now. However, please continue to keep a close eye on it over the next week. If the SMSL M500 vanishes again or requires another container restart, just post a quick update right here and we will jump straight back in to dig deeper into the Linux subsystem logs with you.

Enjoy the music, and have a wonderful week ahead!