Roon delay starting tracks on Tidal

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

NUC i10 running ROCK OS 1.0 (build 227) and ROCK 1.7 (build 667)

  • 256GB SSD, 8GB RAM

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

UniFi network: USG, UCK Gen2+, AP AC-PROs x 3, 3 switches (no VLANs, running RSTP because of Sonos endpoints).
ROCK is connected via ethernet (though not to core switch currently; I have tried connecting it to core switch temporarily and have had same issue described below)
NAS (Synology 918+) connected via ethernet; note that I have NAS set to spin down after an hour, which means that when I listen locally I have to wait for it to spin back up, but that’s pretty fast usually
Comcast 100MB line (could have more up to 1GB, but have never needed it for any other purpose - Zoom calls, AppleTV, teens streaming, etc) with own modem

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

Sonos (9 zones; 4 have Ethernet, rest are SonosNet)
RopieeeXL x 2 (1 Ethernet, 1 WiFi)
Apple iPad & iPhone (used obviously over WiFi when using as endpoints)

Description Of Issue

Roon experiences significant latency at times with Tidal. Can manifest as 5-25 seconds of “spinning” - or rather the track line shifts to a darker blue and waves back and forth until the track starts playing. This only seems to manifest at the beginning / first track after I hit a play button; I’ve never noticed it in the middle of playing Roon Radio or within an album. It’s intermittent, and I think that once I’ve started a session of listening and am going to a new album it’s either less likely to occur or shorter and so I don’t notice it. It definitely doesn’t happen with my local library, but as I’ve found more HiRes Tidal recordings of my albums and added them to Roon and made them primary / preferred to local versions, it’s become more noticeable to me.

Things I’ve already done:

  • Multiple endpoints (happens when using RoPieee, Sonos, and iPhone as endpoints - the experience in the iPhone and iPad remote app is the same)
  • Multiple remotes
  • Logged out of Tidal and back in from Roon Settings (no difference, happened again almost immediately, have tried twice)
  • Checked if the same Master track played from the Tidal app had any issues immediately after (tried multiple times, never had any latency)
  • Checked to see if any IP conflicts or other logged issues on UniFi

Happy to provide logs. I’ve looked through logs to see if I can find some of the instances where it’s happened but I can’t tell what time zone it’s using - guessing GMT, but having a tough time finding the spot where it’s occurring (I can start using grep on my Mac if helpful, but I’ve punted on that till I talked to you first); I’ve started keeping note of when it occurs. A good example just happened - 10:49am EST on 12/9/20, it took more than 30 seconds for Easter Everywhere by the 13th Floor Elevators to start playing. I tried to grab my phone to take a video of the iPad screen, but it’s a pain to be constantly filming EVERY time I try to start a track so I haven’t caught one on film yet.

I know that this has come up before for other users, so not sure if there’s a standard playbook w.r.t. networking “check this first”.

Thanks!
John

Aha!

@support I think I figured something important out.

Roon tried to start playback somewhere in the region of 15:49:34:

12/09 15:49:34 Trace: [zone Office Bifrost 2] Playing 20 Items
12/09 15:49:34 Info: [zone Office Bifrost 2] OnPlayFeedback Stopped
12/09 15:49:34 Info: [zone Office Bifrost 2] Canceling Pending Sleep
12/09 15:49:34 Trace: [zone Office Bifrost 2] Playing TransportItem
12/09 15:49:34 Info: [zone Office Bifrost 2] Canceling Pending Sleep
12/09 15:49:34 Info: [library] recorded play for profile 5dc81ba3-ef1e-4b93-87cf-1efbdab052ce: mediaid=50:1:ccb7d88c-8434-4cc1-abeb-45a79bc9fe74 metadataid= contentid=168:0:54305317 libraryid=50:1:ccb7d88c-8434-4cc1-abeb-45a79bc9fe74 isfromswim=False
12/09 15:49:34 Trace: [zone Office Bifrost 2] Selecting Source state=Stopped
12/09 15:49:34 Info: [audio/env] [zoneplayer -> stream] All streams were disposed
12/09 15:49:34 Info: [audio/env] [zoneplayer -> stream -> endpoint] All streams were disposed
12/09 15:49:34 Trace: [Office Bifrost 2] [zoneplayer/raat] Endpoint Schiit Bifrost 2 Unison USB State Changed: Playing => Prepared
12/09 15:49:34 Trace: [Schiit Bifrost 2 Unison USB] [raatclient] SENT [128]{“request”:“end_stream”}
12/09 15:49:34 Debug: [raat/tcpaudiosource] disconnecting
12/09 15:49:34 Info: [audio/env] [zoneplayer] All streams were disposed
12/09 15:49:34 Trace: [Schiit Bifrost 2 Unison USB] [raatclient] GOT [126] {“status”:“Ended”}
12/09 15:49:34 Trace: [Schiit Bifrost 2 Unison USB] [raatclient] GOT [128] {“status”:“Success”}
12/09 15:49:34 Trace: [Office Bifrost 2] [Lossless, 16/44 TIDAL FLAC => 16/44] [100% buf] [LOADING @ 0:00] Slip Inside This House - Original [Extended] - The 13th Floor Elevators
12/09 15:49:34 Info: sleep 40ms after flush
12/09 15:49:40 Trace: [Office Bifrost 2] [Lossless, 16/44 TIDAL FLAC => 16/44] [100% buf] [LOADING @ 0:00] Slip Inside This House - Original [Extended] - The 13th Floor Elevators
12/09 15:49:45 Trace: [library] finished with 23022 dirty tracks 2177 dirty albums 4742 dirty performers 5792 dirty works 7069 dirty performances 0 clumping tracks, 0 clumping auxfiles 0 compute tracks, 0 deleted tracks, 0 tracks to (re)load, 0 tracks to retain, 0 auxfiles to (re)load, 0 auxfiles to retain, and 19781 changed objects
12/09 15:49:47 Info: [stats] 27093mb Virtual, 5565mb Physical, 2472mb Managed, 465 Handles, 129 Threads

And then there were literally 1000’s of lines that look like this:

12/09 15:50:42 Debug: [query] Sooloos.Broker.Music.LibraryAlbum: 2177 dirty items. rebuilding query instead of re-sorting item-by-item (internaltype=LibraryAlbum)

or this:

12/09 15:50:36 Debug: [query] Sooloos.Broker.Music.LibraryPerformer: 4742 dirty items. rebuilding query instead of re-sorting item-by-item (internaltype=LibraryPerformer)

with the occasional:

12/09 15:50:10 Trace: [Office Bifrost 2] [Lossless, 16/44 TIDAL FLAC => 16/44] [100% buf] [LOADING @ 0:00] Slip Inside This House - Original [Extended] - The 13th Floor Elevators

And then finally it started playback at 15:50:43- I’m not positive this is the right line, but it’s near where it started:

12/09 15:50:43 Info: [Office Bifrost 2] [zoneplayer] Starting playback

So basically a minute building query’s because I have dirty files. Not sure exactly what this means, but sounds like it was something where Roon was busy internally vs. there being a networking issue. But I don’t know how to fix the dirty issues.

Let me know if anything else you want me to check.

Thanks,
John

And… @support it looks like this dirty issue is also causing a bunch of other delays I have. Like when I sometimes sit with the pulsing Roon logo waiting at remote startup, the same type of behavior is happening.

I’m really wary of doing anything which undoes all the manual work I’ve done. I’ve read in other threads that you’ve suggested recreating libraries. This scares me… so many hours cleaning up, grouping, hiding, adding Tidal versions of MP3 files, etc.

@support hope you can respond & help me out before the holiday… the SAF in the face of software lagginess goes down very rapidly.

Realize you don’t advertise specific response times, so I hate to be pushy given Q has only been up a couple days. But I could definitely use some help!

Thanks!

Hi @Johnny_Ooooops — Thanks for reaching out, and apologies for the trouble.

The “dirty tracks” traces you’re seeing in logs typically aren’t anything to worry about and shouldn’t be causing an issue like this.

Most frequently we see delays from streaming stemming from ISP DNS solutions. We recommend setting Google or Cloudflare DNS in your router’s settings. Can you give that a try and let us know if it helps?

Thanks @dylan really appreciate it!

It’s already been set up as 8.8.8.8 and 8.8.4.4 for a while (before i set up Roon). Picture below is my former set-up. I just switched to 1.1.1.1 with 8.8.8.8 as my backup and I’ll let you know how that goes. But assuming that does not do the trick (which it might not, since I’ve been on Google for some time), I’ll also try to capture timing when this text occurs so if we need to pull logs we can.

John

Ok, @support same problem manifested. I set DNS to 1.1.1.1 with backup of 8.8.8.8 and started playing music.

Sure enough, got a 45-second plus delay at 7:46 pm eastern when I started to play Dil De Dil by Chan Ke.

And just keeping additional notes for troubleshooting - around 10:50pm to 10:54pm ET today, having very slow starts to multiple albums (by The Story, and Phish) playing from Tidal, as well as loading artist pages and search pages. Both Roon “pulsing cursor” and slow start times for albums. Am going to switch DNS now to 8.8.8.8 primary and 1.1.1.1 secondary to see if any good comes of it.

And… at 12:14 today (ET) in the middle of an album, paused for 30 seconds in the middle of an album, right before “over and under” on “the Big Bang”. While it was paused I couldn’t open any Roon pages (other than a cached version of discover); now playing, the album page, etc all resulted in the “pulsing Roon logo”.

And again at 12:24, same album. Long delay, can’t open Roon screens that aren’t cached. But interestingly, this is a local album, not Tidal.

Ok @dylan — so now that I have seen the behavior with local files as well as with tidal files, does that change the approach? Like I said, it’s sporadic. But seems like when it gets into a “bad state” the core becomes unresponsive for a minute or two. Happens sometimes during an album playback, sometimes when I find a new album and hit play, sometimes when I’m browsing.

I rebooted the ROCK and this recurred afterwards. Not sure what else to try.

Hi Johnny,

Just curious, what is the model of the SSD you are using for the RoonOS? Is it Transcend?

cheers
Daniel

@Rugby - Crucial; not sure if there is any “lower level” performance monitoring or benchmarking I can do to see what CPU utilization / memory / IOPS etc look like.

Not if you are using ROCK. You can create a Live Boot Linux USB, boot to the Linux image, and then run diagnostic modes on the memory and/or drive.

Hi @Johnny_Ooooops,

Can you please try a fresh database on ROCK and verify if you still have issues?

  • Create a Backup of your Roon database
  • Stop RoonServer from running in ROCK’s WebUI
  • Navigate to your Roon’s Database Location
  • Find the folder that says “RoonServer”
  • Rename the “RoonServer” folder to “RoonServer_old”
  • Restart the RoonServer in the WebUI to generate a new Roon database folder
  • Use the fresh database for a few days to check if same behavior occurs

This test should allow us to separate weather something in the old database is triggering this behavior or if we should investigate elsewhere.

What kind of switches are these, are they managed or unamanged switches? What is the model/manufacturer?

Thanks @noris I’ll try the backup and report back; for what it’s worth, I haven’t seen issues in the last two days (since the new build came out?) but I’ll keep an eye out and keep the thread updated with any symptoms.

To answer your question on networking, I have all unifi networking gear. My core switch is a 24 port PoE, and I have 2 of the 8-port PoE. They are managed switches, but I am not running any vlans, and very minimal port management. I do enable RSTP in order to keep my wired Sonos gear functional with more than one PLAY, and the weights are set correctly as far as I know. I have a separate LAN for VOIP, but that sits above my switches at the USG level.

John

1 Like

Hi Johnny,

Did you read/review this paragraph in the Roon Network Best Practices Faq

Managed Switches

Managed switches can be very robust, but they are often designed for professional installation, so in many cases the out-of-box configuration is not right. If your switch has a “flow control” setting, please make sure that it is enabled. Also, make sure that the switch is not performing any sort of throttling that might impact communication between cores, storage, remotes, and/or audio endpoints. Finally, ensure that the switch is configured to pass multicast and broadcast traffic. If in doubt about any of this, try temporarily replacing your managed switch with a “dumb” switch to see if things improve.

1 Like

@Rugby Thanks for that article - I read with care, and turned off the few features that I thought might be problematic, including “Auto-Optimize” which does have the potential to turn off multicast and broadcast for WiFi. I checked flow control. I’m not going to replace all my switches with dumb switches (way too much work), but I made mine as dumb as I can at this point. This is a layer of complexity that I was initially surprised by, but I think on reflection I can understand why Roon is more demanding of networking than other applications I’m running (Sonos effectively runs its own network). I tried asking on another thread about Unifi owners; no one seems to have run into trouble. That doesn’t mean it’s not my problem, but I’m going to chase other paths first.

@noris Thanks, have followed your recommendation to backup, rename the RoonServer folder to RoonServer_old, and rebuild the library. However, I really hope the plan is to go back to the old version - In the new library I now have lost the hundreds of hours of work I put into cleaning up my library and would have to redo that work. I’m not going to do any clean-up on the assumption that this is purely diagnostic and the plan is to go back to the old version.

I’ll report back once the full import is done, but I’ve been playing from Tidal during the import, and I’ve had a couple tracks pause for a few seconds in the middle of playing (eg, sounds like buffering) this morning, both before I started the re-import (eg, on the old library) and after (on the new library). When this happened, it was a few seconds after the beginning of the song - like maybe 10 seconds into the song it paused, then started again after 5-10 seconds.

Thanks, and happy holidays.

1 Like

Hi @Johnny_Ooooops,

If this is occurring on a fresh database, there might be an issue elsewhere, possibly in the networking or even hardware side of things.

I would keep testing the fresh database and seeing if the behavior is still occurring across multiple zones at the same time.

If this is still happening on the fresh database and all imports/analysis is completed (no activity spinner), I’d also check the SSD and RAM integrity as @Rugby suggested.

Happy Holidays!

Hi @Rugby can you point me to a how-to? I don’t worry about my ability to create a Linux but USB, but rather which image to use and which tests to run in diagnostic mode? Thanks!