Airplay Dropouts using Linux

Roon Core Machine

Roon server on Ubuntu 20.04.2 LTS (i5 8600K, 16 Gb RAM, 512 Gb SSD, ZFS pool 52 TB)

Networking Gear & Setup Details

End points and server are wired, connected to a HP Procurve Switch at 1 Gbps, LAN performance is very good.

Connected Audio Devices

3 Apple TV 4K wired, 6 Nvidia Shields wired and some other airplay end points (AV receiver and Homepod mini)

Library Size

At this time, very few tracks, I’m just evaluating Roon. I use Qobuz integration.

Description of Issue

Airplay endpoints exhibit dropouts every minute whether it requires conversion (downsample) or direct playback. Using local files and Qobuz.

The other endpoints work perfectly.

If I set up the Roon server on my old Macbook Air, a more modest computer and connected to wifi. Airplay works perfectly and there are no dropouts.

Are there any Airplay - Linux compatibility issues?

Package: ffmpeg
Version: 7:4.2.4-1ubuntu0.1
Priority: optional
Section: universe/video
Origin: Ubuntu
Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com
Original-Maintainer: Debian Multimedia Maintainers debian-multimedia@lists.debian.org
Bugs: OpenID transaction in progress
Installed-Size: 2.058 kB
Depends: libavcodec58 (= 7:4.2.4-1ubuntu0.1), libavdevice58 (= 7:4.2.4-1ubuntu0.1), libavfilter7 (= 7:4.2.4-1ubuntu0.1), libavformat58 (= 7:4.2.4-1ubuntu0.1), libavresample4 (= 7:4.2.4-1ubuntu0.1), libavutil56 (= 7:4.2.4-1ubuntu0.1), libc6 (>= 2.29), libpostproc55 (= 7:4.2.4-1ubuntu0.1), libsdl2-2.0-0 (>= 2.0.10), libswresample3 (= 7:4.2.4-1ubuntu0.1), libswscale5 (= 7:4.2.4-1ubuntu0.1)

Suggests: ffmpeg-doc
Breaks: libav-tools (<< 6:12~~), qt-faststart (<< 7:2.7.1-3~), winff (<< 1.5.5-5~)
Replaces: libav-tools (<< 6:12~~), qt-faststart (<< 7:2.7.1-3~)
Homepage: https://ffmpeg.org/
Task: ubuntustudio-video, ubuntustudio-audio, ubuntukylin-desktop, ubuntu-mate-desktop, ubuntu-budgie-desktop
Download-Size: 1.453 kB
APT-Manual-Installed: yes
APT-Sources: Index of /ubuntu focal-updates/universe amd64 Packages

Description: Tools for transcoding, streaming and playing of multimedia files
FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge.

This package contains:

  • ffmpeg: a command line tool to convert multimedia files between formats
  • ffplay: a simple media player based on SDL and the FFmpeg libraries
  • ffprobe: a simple multimedia stream analyzer
  • qt-faststart: a utility to rearrange Quicktime files

This is a playback session, I don’t appreciate errors:

--[ SignalPath ]---------------------------------------------
SignalPath Quality = HighQuality
Elements:
    Source Format=Flac 96000/24/2 BitRate=2917 Quality=Lossless
    UpgradeBitDepth FromBitsPerSample=24 ToBitsPerSample=64 Quality=Lossless
    SampleRateConversion FromSampleRate=96000 ToSampleRate=44100 Algorithm=HighQuality Quality=HighQuality
    Truncate FromBitsPerSample=64 ToBitsPerSample=16 Quality=HighQuality
    Output OutputType=AirPlay Quality=HighQuality SubType= Model=AudioAccessory5,1
------------------------------------------------------------
08/18 07:47:50 Trace: [Homepod] [HighQuality 21,3x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 0:05/4:21] What Do You Want from Me - Pink Floyd
08/18 07:47:56 Trace: [Homepod] [HighQuality 21,3x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 0:10/4:21] What Do You Want from Me - Pink Floyd
08/18 07:47:56 Info: [stats] 3634mb Virtual, 517mb Physical, 181mb Managed, 0 Handles, 95 Threads
08/18 07:48:01 Trace: [Homepod] [HighQuality 21,3x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 0:15/4:21] What Do You Want from Me - Pink Floyd
08/18 07:48:06 Trace: [Homepod] [HighQuality 21,3x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 0:21/4:21] What Do You Want from Me - Pink Floyd
08/18 07:48:11 Info: [stats] 3616mb Virtual, 499mb Physical, 119mb Managed, 0 Handles, 95 Threads
08/18 07:48:12 Trace: [Homepod] [HighQuality 21,2x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 0:26/4:21] What Do You Want from Me - Pink Floyd
08/18 07:48:17 Trace: [Homepod] [HighQuality 21,3x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 0:31/4:21] What Do You Want from Me - Pink Floyd
08/18 07:48:22 Trace: [Homepod] [HighQuality 21,2x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 0:36/4:21] What Do You Want from Me - Pink Floyd
08/18 07:48:26 Info: [stats] 3616mb Virtual, 500mb Physical, 126mb Managed, 0 Handles, 95 Threads
08/18 07:48:28 Trace: [Homepod] [HighQuality 21,2x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 0:41/4:21] What Do You Want from Me - Pink Floyd
08/18 07:48:33 Trace: [Homepod] [HighQuality 21,2x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 0:47/4:21] What Do You Want from Me - Pink Floyd
08/18 07:48:38 Trace: [Homepod] [HighQuality 21,2x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 0:52/4:21] What Do You Want from Me - Pink Floyd
08/18 07:48:42 Info: [stats] 3616mb Virtual, 500mb Physical, 139mb Managed, 0 Handles, 95 Threads
08/18 07:48:43 Trace: [Homepod] [HighQuality 21,2x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 0:58/4:21] What Do You Want from Me - Pink Floyd
08/18 07:48:48 Trace: [Homepod] [HighQuality 21,2x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 1:02/4:21] What Do You Want from Me - Pink Floyd
08/18 07:48:54 Trace: [Homepod] [HighQuality 21,2x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 1:08/4:21] What Do You Want from Me - Pink Floyd
08/18 07:48:57 Info: [stats] 3616mb Virtual, 500mb Physical, 147mb Managed, 0 Handles, 95 Threads
08/18 07:48:59 Trace: [Homepod] [HighQuality 21,2x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 1:13/4:21] What Do You Want from Me - Pink Floyd
08/18 07:49:04 Trace: [Homepod] [HighQuality 21,2x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 1:18/4:21] What Do You Want from Me - Pink Floyd
08/18 07:49:09 Trace: [Homepod] [HighQuality 21,2x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 1:23/4:21] What Do You Want from Me - Pink Floyd
08/18 07:49:12 Info: [stats] 3616mb Virtual, 500mb Physical, 152mb Managed, 0 Handles, 95 Threads
08/18 07:49:14 Trace: [Homepod] [HighQuality 21,2x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 1:29/4:21] What Do You Want from Me - Pink Floyd
08/18 07:49:20 Trace: [Homepod] [HighQuality 21,1x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 1:34/4:21] What Do You Want from Me - Pink Floyd
08/18 07:49:25 Trace: [Homepod] [HighQuality 21,1x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 1:39/4:21] What Do You Want from Me - Pink Floyd
08/18 07:49:27 Info: [stats] 3616mb Virtual, 500mb Physical, 159mb Managed, 0 Handles, 95 Threads
08/18 07:49:30 Trace: [Homepod] [HighQuality 21,1x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 1:44/4:21] What Do You Want from Me - Pink Floyd
08/18 07:49:35 Trace: [Homepod] [HighQuality 21,1x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 1:50/4:21] What Do You Want from Me - Pink Floyd
08/18 07:49:40 Trace: [Homepod] [HighQuality 21,1x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 1:55/4:21] What Do You Want from Me - Pink Floyd
08/18 07:49:41 Info: [stats] 3621mb Virtual, 504mb Physical, 170mb Managed, 0 Handles, 93 Threads
08/18 07:49:45 Trace: [Homepod] [HighQuality 21,1x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 2:00/4:21] What Do You Want from Me - Pink Floyd
08/18 07:49:50 Trace: [Homepod] [HighQuality 21,1x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 2:05/4:21] What Do You Want from Me - Pink Floyd
08/18 07:49:56 Trace: [Homepod] [HighQuality 21,1x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 2:10/4:21] What Do You Want from Me - Pink Floyd
08/18 07:49:56 Info: [stats] 3626mb Virtual, 509mb Physical, 178mb Managed, 0 Handles, 92 Threads
08/18 07:50:01 Trace: [Homepod] [HighQuality 21,1x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 2:15/4:21] What Do You Want from Me - Pink Floyd
08/18 07:50:06 Trace: [Homepod] [HighQuality 21,1x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 2:20/4:21] What Do You Want from Me - Pink Floyd
08/18 07:50:11 Trace: [Homepod] [HighQuality 21,1x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 2:26/4:21] What Do You Want from Me - Pink Floyd
08/18 07:50:12 Info: [stats] 3616mb Virtual, 499mb Physical, 117mb Managed, 0 Handles, 92 Threads
08/18 07:50:17 Trace: [Homepod] [HighQuality 21,1x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 2:31/4:21] What Do You Want from Me - Pink Floyd
08/18 07:50:22 Trace: [Homepod] [HighQuality 21,1x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 2:36/4:21] What Do You Want from Me - Pink Floyd
08/18 07:50:27 Info: [stats] 3616mb Virtual, 499mb Physical, 125mb Managed, 0 Handles, 92 Threads
08/18 07:50:27 Trace: [Homepod] [HighQuality 21,0x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 2:41/4:21] What Do You Want from Me - Pink Floyd
08/18 07:50:32 Trace: [Homepod] [HighQuality 21,1x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 2:47/4:21] What Do You Want from Me - Pink Floyd
08/18 07:50:38 Trace: [Homepod] [HighQuality 21,1x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 2:52/4:21] What Do You Want from Me - Pink Floyd
08/18 07:50:42 Info: [stats] 3616mb Virtual, 499mb Physical, 135mb Managed, 0 Handles, 92 Threads
08/18 07:50:43 Trace: [Homepod] [HighQuality 21,1x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 2:57/4:21] What Do You Want from Me - Pink Floyd
08/18 07:50:48 Trace: [Homepod] [HighQuality 21,1x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 3:02/4:21] What Do You Want from Me - Pink Floyd
08/18 07:50:53 Trace: [Homepod] [HighQuality 21,1x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 3:08/4:21] What Do You Want from Me - Pink Floyd
08/18 07:50:57 Info: [stats] 3616mb Virtual, 499mb Physical, 143mb Managed, 0 Handles, 91 Threads
08/18 07:50:58 Trace: [Homepod] [HighQuality 21,1x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 3:13/4:21] What Do You Want from Me - Pink Floyd
08/18 07:51:04 Trace: [Homepod] [HighQuality 21,0x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 3:18/4:21] What Do You Want from Me - Pink Floyd
08/18 07:51:10 Trace: [Homepod] [HighQuality 21,0x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 3:23/4:21] What Do You Want from Me - Pink Floyd
08/18 07:51:13 Info: [stats] 3616mb Virtual, 499mb Physical, 148mb Managed, 0 Handles, 91 Threads
08/18 07:51:15 Trace: [Homepod] [HighQuality 21,0x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 3:29/4:21] What Do You Want from Me - Pink Floyd
08/18 07:51:20 Trace: [Homepod] [HighQuality 21,0x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 3:34/4:21] What Do You Want from Me - Pink Floyd
08/18 07:51:25 Trace: [Homepod] [HighQuality 21,0x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 3:40/4:21] What Do You Want from Me - Pink Floyd
08/18 07:51:28 Info: [stats] 3616mb Virtual, 499mb Physical, 156mb Managed, 0 Handles, 91 Threads
08/18 07:51:30 Trace: [Homepod] [HighQuality 21,1x, 24/96 FLAC => 16/44] [100% buf] [PLAYING @ 3:44/4:21] What Do You Want from Me - Pink Floyd

Hi @Joan_Pallas, thanks for the detailed report. Can you reproduce the error a few times and make a note of the time playback stops for each instance as well as the name of the track it stops on? After then, please use the directions found here and send us over a set of logs using a shared Dropbox link (or any other file sharing service). I’ll take a look at the logs for these instances and see if I can get more info. Thanks!

Hi,

I’ve played Alan Parsons’ Sirius + Eye in the Sky. These are the dropouts:

Sirius:

0:28
0:52
1:13

Eye in the Sky:

0:12
0:42
1:22
1:48
2:16
2:21
2:59
3:26
3:53
3:57

I’ll send you the logs in a couple of minutes.

Thanks!

Here are the logs:

Hi Joan,

I would seriously recommend checking you network.
I thought my network was rock solid until i had dropouts, it was a faulty switch (port).
After swapping the switch with a Cisco 2960 everything was pink unicorns and fluffy clouds.

At the moment i stream my music over airplay to my Hegel, because of just moving to a new house and needed music fast…
My core is a Mac Mini i7 with Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-81-generic x86_64)
The Hegel is connected with old powerline devices, i do not have the house cabled yet.
No dropouts and the same pink unicorns and fluffy clouds.

Thanks. I have ordered a new switch, but I don’t think this will fix the problem.

Other more modest servers connected to the switch do not have dropouts.

Apart from an audio server, it is a video server. On the weekend, four 4K movies with a bitrate of 60 Mbps were played simultaneously and the playback was smooth without latency.

Anyway I will change the switch for a better one to see what happens.

Hi Joan,

That was my thought as well with the faulty switch.
Video was not a problem at all, stable and smooth.
But, audio did not play well, first i thought it was the streamer, but found ait by swapping the switch that it was the switch.
I happened to have switch lying around, so it was easy to test.

My motto on such issues; “Assume nothing”.

Good luck!

1 Like

Video will fill in r skip missing chunks and carry on. Roon needs to be much more coherent on the network.

Hi,

I’ve got the new switch, a Cisco SG250 series and dropouts still exist. It’s strange, dropouts only exist using Airplay and the linux server, if I use another computer as server, there are not dropouts, but I need to make it work in my linux server.

Thanks

Sometimes instead of dropouts there is a slowdown in playback speed.

Hi Joan,
Sorry to hear that.
If it is not the network, there could be factors like the NIC (network card) in your Core etc.
Can you test by installing a core on another machine and use airplay from that one?
You can test local files and streamed from Cobuz, maybe your connection to the outside world is wonky (though you stated it is not :wink: ).

FYI, my Core is on an Mac Mini i7 late 2012 with Ubuntu connected to a Cisco 2960CG and communicating with the endpoint over an old set of Powerline adapters.

Hi,

Dropouts only occur using Airplay on this particular machine, which is my home media server and is where the Core should be installed. All other endpoints work perfectly. If I install the Core on another computer then the airplay players work perfectly.

If I ping the Roon server at any Airplay endpoint, it is always less than 1 ms for a long time and no packets are lost.

I’m desperate, I really like Roon, but if I can’t use Airplay on my server it will be tricky to keep using it.

Thanks and best regards.

Hi @Joan_Pallas — I took a look at the logs but I need some additional feedback from the QA team. I’ve passed this along to them and I’ll follow up once we have their feedback.

1 Like

Hello @Joan_Pallas,

I’m using Roon Server on a similarly spec’d machine running Ubuntu 20.04.2 LTS and not encountering any dropouts or errors streaming 24/96 Qobuz content to a Homepod. My best guess at this point is that this is related to the switch configuration, but we don’t have enough data to say that with confidence at this point.

We’ve gone ahead and enabled an advanced diagnostic flag on your account. You should restart Roon Server on your Ubuntu box to ensure that the flag has registered. Once you’ve reproduced the issue please upload a new set of logs so that we can send them over to the QA team for analysis.

-John

1 Like

Hi,

Here’s the log after server reboot and the issue is reproduced.

Thanks

Hi @Joan_Pallas,

Thanks, I’ve now disabled the flag to reduce the amount of verbosity in the logs. A restart of the Roon Server process should get things in sync.

I’ve forwarded your logs to the QA team, let’s see what they have to say.

-John

1 Like

Today I received an iFi Zen Stream that connects directly to the DAC of my receiver (RAAT), after hours of playback no dropouts occurred, even playing music at 192 Khz and also DSD64 5.1 (requires conversion). The problem is very specific to Airplay.

A post was split to a new topic: Trouble with Airplay playback

Hello @Joan_Pallas ,

Thank you for that additional data point.

Does your Ubuntu machine have WiFi capabilities? Can you please confirm if the same issue occurs via WiFi?

Can you please confirm, if you try to output to your Macbook as a Roon Remote and then use the Macbook System Output to Airplay over to your devices (while still keeping the Ubuntu Core), do you notice similar behavior? Or does the issue only occur when you try to Airplay directly to these devices?

Thank you.

Hi,

The Ubuntu server does not have wifi capabilities.

I did a similar test, I used my iPhone as an endpoint, then if I use my iPhone to send music to another endpoint using Airplay, playback is perfect. Problems only happen on the core’s Airplay server.

Thanks