HQ Player Embedded startup issue [Detection before network up, Solved]

Hi @jussi_laako (and other HQ Player Embedded experts)

I have recently purchased HQ Player Embedded 5 and migrated from Desktop. Thoroughly enjoying the new modulators and increased efficiency etc.

But I’m experiencing an issue where hqplayerd is not seeing my microrendu on startup. In the web configuration page the backend is ‘Network Audio’ but the Device at the foot of the page is blank. If I hit ‘apply’ however, then it finds ‘mrendu-00D020: X-SPDIF 2: USB Audio’ after the 10s wait and I can play music.

Now, full disclosure, I mucked around with my startup services trying to reduce boot time. This was quite successful and now the top 10 entries in systemd-analyze blame looks like this:

1.986s mnt-426A43FB6A43E9ED.mount
749ms nvidia-persistenced.service
664ms systemd-udev-settle.service
598ms dev-sdb1.device
569ms mnt-usb\x2dSanDisk_Cruzer_Blade_4C530000220411112382\x2d0:0\x2dpart1.mount
569ms mnt-12AA179BAA177A85.mount
401ms systemd-journal-flush.service
304ms cups.service
184ms apparmor.service
147ms user@1000.service

I have to confess that the trouble with hqplayerd started when I disabled systemd-udev-settle.service, As you can see I have since enabled it back and I have also removed and reinstalled hqplayerd_5.0.0-1_amd64.deb.

I saw a post on Audiophile Style (yes, ikr its their fault …) where a similar issue was solved by editing ‘After’ in hqplayerd.service to read:

After=rc-local.service roonserver.service networking.service ssh.service network-online.target sound.target systemd-udev-settle.service

My Requires and After now read:

Requires=network-online.target sound.target systemd-udev-settle.service
After=rc-local.service roonserver.service networking.service ssh.service network-online.target sound.target systemd-udev-settle.service local-fs.target remote-fs.target

Any suggestions ?

Usually the reason is that network has not become fully up yet when hqplayerd service is started.

If you have DHCP in use, that is the most typical culprit, as it is performed asynchronously. Static IP should be more reliable since it doesn’t involve roundtrip to DHCP server.

1 Like

Thanks Jussi,

I’ll fix a static IP and report back.

I’ve had a related issue since I started using Embedded, can you recommend a way to place a short delay in the startup script for hqplayerd to allow the network to spin up?

The network-online.target dependency should handle it, but for example with netplan it doesn’t seem to work as intended with DHCP. With systemd-networkd things work correctly with systemd-networkd-wait-online.target, which is how HQPlayer OS for example works.

But you can edit the hqplayerd.service file and add something like “ExecStartPre=/usr/bin/sleep 5”

2 Likes

Static IP didn’t solve the problem for me. I’ll try the microsleep and then systemd-networkd.

It does appear to be a network not up issue. Here are the first few lines from the log for normal startup followed by a restart after hitting ‘Apply’.

Normal startup

* 2023/06/08 20:27:13 Signalyst HQPlayer Embedded 5.0.0
+ 2023/06/08 20:27:13 Engine starting…
2023/06/08 20:27:13 asoundlib version: 1.2.6.1
2023/06/08 20:27:13 Found ALSA device: hw:CARD=PCH,DEV=0 - HDA Intel PCH: ALC892 Analog
2023/06/08 20:27:13 Found ALSA device: hw:CARD=NVidia,DEV=3 - HDA NVidia: HDMI 0
2023/06/08 20:27:13 Found ALSA device: hw:CARD=NVidia,DEV=7 - HDA NVidia: HDMI 1
2023/06/08 20:27:13 Found ALSA device: hw:CARD=NVidia,DEV=8 - HDA NVidia: HDMI 2
2023/06/08 20:27:13 Found ALSA device: hw:CARD=NVidia,DEV=9 - HDA NVidia: HDMI 3
2023/06/08 20:27:13 Found ALSA device: hw:CARD=NVidia,DEV=10 - HDA NVidia: HDMI 4
2023/06/08 20:27:13 Found ALSA device: hw:CARD=NVidia,DEV=11 - HDA NVidia: HDMI 5
2023/06/08 20:27:13 Found ALSA device: hw:CARD=NVidia,DEV=12 - HDA NVidia: HDMI 6
2023/06/08 20:27:13 network Audio IPv6 support disabled
2023/06/08 20:27:13 discovery from 0.0.0.0
# 2023/06/08 20:27:13 clNetEngine::DeviceLookup(): clNetEngine::Disco(): clSocket::SendTo(): sendto(): Network is unreachable
2023/06/08 20:27:13 CUDA offload requested

After hitting Apply:

2023/06/08 20:27:58 asoundlib version: 1.2.6.1
2023/06/08 20:27:58 Found ALSA device: hw:CARD=PCH,DEV=0 - HDA Intel PCH: ALC892 Analog
2023/06/08 20:27:58 Found ALSA device: hw:CARD=NVidia,DEV=3 - HDA NVidia: HDMI 0
2023/06/08 20:27:58 Found ALSA device: hw:CARD=NVidia,DEV=7 - HDA NVidia: HDMI 1
2023/06/08 20:27:58 Found ALSA device: hw:CARD=NVidia,DEV=8 - HDA NVidia: HDMI 2
2023/06/08 20:27:58 Found ALSA device: hw:CARD=NVidia,DEV=9 - HDA NVidia: HDMI 3
2023/06/08 20:27:58 Found ALSA device: hw:CARD=NVidia,DEV=10 - HDA NVidia: HDMI 4
2023/06/08 20:27:58 Found ALSA device: hw:CARD=NVidia,DEV=11 - HDA NVidia: HDMI 5
2023/06/08 20:27:58 Found ALSA device: hw:CARD=NVidia,DEV=12 - HDA NVidia: HDMI 6
2023/06/08 20:27:58 network Audio IPv6 support disabled
2023/06/08 20:27:58 discovery from 0.0.0.0
& 2023/06/08 20:27:58 discovered network audio: name=‘mrendu-00D020’ version=‘Signalyst Network Audio Daemon 4.4.0’ @192.168.20.13:43210
& 2023/06/08 20:27:58 discovered network audio: name=‘mrendu-00D020’ version=‘Signalyst Network Audio Daemon 4.4.0’ @192.168.20.13:43210
2023/06/08 20:27:59 connect to 192.168.20.13:43210 [ipv4]
2023/06/08 20:27:59 network endpoint: X-SPDIF 2: USB Audio (hw:CARD=X2,DEV=0)
2023/06/08 20:27:59 CUDA offload requested

This didn’t work, but sleep 10 did !

Thanks @jussi_laako

3 Likes

Thanks, that worked, with a longer sleep time because it looks like my DHCP server is on the slow side — not surprising, it’s on a very reliable but pretty old Ubiquiti router.

2 Likes

@jussi_laako @andybob Gents, lame question, apologies - how you set static IP on NAA? Is allocating an IP ourside DHCP range on router side is enough?

That’s what I did. But I only know enough to be dangerous.

2 Likes

Which OS are you using? The way it is done differs between different OS.

Hi @jussi_laako for NAA I use the latest image 440-x64ramfs. So I was wondering if setting this one static is possible.

Can you do it in your router?

yes, I can set fixed IP on the router outside of the main DHCP range (done already). And therefore my original questions

It is not practical to make changes to ramfs image, it is pretty complex procedure.

But there’s no need to set static IP for NAA OS or HQPlayer OS as long as there’s DHCP server available.

1 Like