No outputs with Roon Server on NixOS

Core Machine (Operating system/System info/Roon build number)

Os: NixOS
System: B550 motherboard, Ryzen 3700x, 64GB DDR4, 1TB NVME, 8TB RAIDZ
Roon: 1.7 Build 571

Network Details (Including networking gear model/manufacturer and if on WiFi/Ethernet)

AX200 wifi card, Netgear RAX200 router.

Audio Devices (Specify what device you’re using and its connection type - USB/HDMI/etc.)

Schiit modius connected via USB, onboard audio card.

Description Of Issue

I just set up Roon in my new media server, however I cannot see any outputs attached to the server. I can verify with aplay -l that the cards are all there:

viins ❯ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Modius [Schiit Unison Modius], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Generic [HD-Audio Generic], device 0: ALC1220 Analog [ALC1220 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I also disabled pulseaudio from this system. When I run the check script things seem to be OK:

viins ❯ /nix/store/b9qvalhlz2q09mn5q2m9dkdnz3z1ngx1-roon-server/opt/check.sh

Checking to see if RoonServer can run on this machine

    Checking for Binary Compatibility                            [   OK   ]
    Checking for ALSA Libraries                                  [   OK   ]
    Checking for ffmpeg or avconv                                [   OK   ]
    Checking for the mount.cifs command                          [   OK   ]

STATUS: SUCCESS

And even if I run it as the use the Roon server runs as things seem fine:

viins ❯ sudo su - roon-server -s /run/current-system/sw/bin/bash -c "/nix/store/b9qvalhlz2q09mn5q2m9dkdnz3z1ngx1-roon-server/opt/check.sh"

Checking to see if RoonServer can run on this machine

    Checking for Binary Compatibility                            [   OK   ]
    Checking for ALSA Libraries                                  [   OK   ]
    Checking for ffmpeg or avconv                                [   OK   ]
    Checking for the mount.cifs command                          [   OK   ]

STATUS: SUCCESS

However, upon inspecting the RAATServer logs I see this:

07/22 02:40:16 Info: Starting RAATServer v1.7 (build 571) stable on linuxx64
07/22 02:40:16 Warn: [RAATServer] detected no ALSA support

It’s clear that this machine supports ALSA, and I’ve verified that it works (by playing a tone through the Schiit Modius manually) however RAAT seems to be unable to detect it. How is RAAT trying to detect ALSA?

cc. @Jose_Albornoz who I know also uses NixOS.

Hi @Bernardo_Meurer_Cost,

Does this previous thread help?

Hi @noris,

I’m already running with the patch from that issue, which solved a separate issue which I did encounter at first. This problem of no outputs showing up is, as far as I can see, separate.

It really isn’t clear to me how RAATServer is checking for alsa. Should it just be linked in? Is it looking into LD_LIBRARY_PATH?

I ended up fixing this myself by using autoPatchelfHook to analyze all the binaries in the package and patch them with the correct libraries.

I have a patch up that fixes this in nixpkgs so that Roon will now work in NixOS for everyone: https://github.com/NixOS/nixpkgs/pull/93715

2 Likes

That’s fantastic news @Bernardo_Meurer_Cost, happy to hear you found the source of the issue and submitted a patch for it!

1 Like

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.