So today I setup a Win10 Pro Hyper-V VM on my Server 2019, and installed Plex. Networking was setup so that basically the 2nd NIC on my system was used directly to the Win10 Pro VM. Testing went flawless - so here I am tonight doing the following:
Backing up the registry key and Plex Media Server to my ReFS Volumes, where my media sits
Downloading Drivers and Software (Nvidia Drivers, Motherboard Drivers, etc.)
Loading Win10 Enterprise (which supports ReFS) overtop my C:\ volume - which is a motherboard/Intel Rapid Storage raid 5 array of four 224GB SSDs
Re-installing Plex, bringing my HyperV VMs back over, and then using my AppleTV via Enhanced Video Player
Having the same issue, only occurs with the enhanced player. Server is Win10 based, tried on two different Win 10 Pro machines, same delay on my 4 Apple TVās and my iPad. Please fix this⦠it makes plex very unfun to use.
I donāt think you are having the same issue. I went through a lot of logs before and after switching from Server 2019 to Win10 Enterprise (Pro worked too, but needed ReFS support).
Whatās your playback settings on the AppleTV, and whatās your server connection look like? and bitrate of the file?
We have 4 Apple TV 4ks in the house, 2 iPhones, and 2 iPads. All of them have a 10 to 20s delay when playing any videos only with the enhanced player. Playing with a browser on a PC or old player works perfectly, playback is instant and we can skip around the file with zero lag. With the enhanced player on x265 videos take about 20s to play, x264 take 5 to 10 seconds. Every time you skip in the episode, same lag. Itās making plex kind of unfun.
I just replaced my Win 10 Pro Intel NUC PMs server install with a much more powerful Win 10 desktop server installation. Identical lag issues, even with radically more powerful hardware behind the server now. Almost all my devices but the mobiles are on our 1000 Mbps Ethernet lan. Thereās literally no reason for the delay on every video play network or hardware wise and it only occurs with the enchanted video player on. Once the video starts playing itās always direct play, no transcoding is in play.
After stumbling upon this buffering issue myself on an iPhone after a recent in-place upgrade from Server 2016 to 2019, I did some digging. Looking at a packet capture in Wireshark of a buffering stream, I noticed frequent TCP Retransmissions during that time and the RTO was 20ms.
After some research, I came across the Get-NetTCPSetting PowerShell command and found a very familiar number there. (Hint: Itās 20)
PS C:\WINDOWS\system32> Get-NetTCPSetting | ft -AutoSize
SettingName CongestionProvider MinRto(ms) InitialRto(ms) CwndRestart DelayedAckTimeout DelayedAckFrequency AutoTuningLevelEffective
----------- ------------------ ---------- -------------- ----------- ----------------- ------------------- ------------------------
Automatic
InternetCustom CUBIC 300 3000 False 40 2 Local
DatacenterCustom CUBIC 20 3000 False 10 2 Local
Compat NewReno 300 3000 False 200 2 Local
Datacenter CUBIC 20 3000 False 10 2 Local
Internet CUBIC 300 3000 False 40 2 Local
Now that familiar number of 20 appears under the Datacenter config as MinRto which is the minimum Retransmission timeout. So I tried increasing it to the max value of 300 using:
After making this change and restarting my Plex client app on the iPhone, I no longer came across buffering nor TCP retransmissions after a few minutes of playback. Perhaps there are other parameters that can be tweaked, but this seems like a simple fix. Let me know how it goes for you.
PS, if you want to fully reset your TCP settings, you can run netsh int tcp reset.
I checked the TCP profile defaults with the first command, and they did match yours. I then checked TCP connections for one of my Apple TV 4Ks, and it was using the Datacenter profile as well. I then set the 2 profilesā MiniRto to 300ms, restarted my server (and my Apple TV, for the hell of it), enabled EVC on the Apple TV, and testing a couple of videos out.
I started with the same video file I used for my original tests months ago, forcing PGS subtitles as well. Playback started high around 95 Mbps, but then smoothed out to a very constant 40 Mbps. That playback was so very steady at 40 Mbps, which was excellent. And, no buffering!
I then tested my most network intensive 4K movie, with PGS subtitles enabled as well, and the playback stream varies from 76 Mbps to 113 Mbps. Whatever the stream size, it played perfectly as well, even after 20 minutes of testing.
I will enable EVP on all my Apple TVs, but Iām very certain this fix will work. Since Windows Updates may change TCP stack settings, I know I can troubleshoot by checking the TCP profile settings.
@cursedZeroX, thank you so very much. I thought it was a network setting, but I didnāt go far enough in my testing, and never checked TCP profile settings. Hopefully this is the fix that will work long term.
Glad it worked out for you. I watched from my iPhone for several hours yesterday with no buffering issues as well. Also, I saw the fix take effect once I restarted my Plex app on the iPhone. The TCP profile changes seem take effect on any new TCP connections, not existing, so restarting the server can be a quick fix for all your clients instead of restarting individual client apps in case there are any lingering connections.
@cursedZeroX Thank you for the fix. It seems to be working as expected. Do we know for sure that this wonāt have any negative implications on the rest of my serverās functions? I use it as a file server, hyper-v server etc⦠Thanks!
Agreed that just restarting the Windows Server itself is the easiest way to ensure TCP connections get reset.
My server is used for more than just Plex, so I also need to see if the TCP change has any negative impact on anything like backups and other stuff (though I donāt think it will).
I did change the profile settings for both āDatacenterā and āDatacenterCustomā as you did, though is there a reason why you changed DatacenterCustom? I only ask because both of the Apple TVs I checked in my home were just using the Datacenter profile.
Since applying the changes recommended by @cursedZeroX, I have applied updates to Windows Server 2019, Apple TV, and the Plex client on Apple TV. MiniRTO settings have not changed, and everything still plays great with EVP enabled. Iāve marked the post by @cursedZeroX as the Solution.
Very nice troubleshooting process, explanation, and fix, @cursedZeroX.
Microsoft recently changed the default TCP congestion control algorithm for Windows 10 and Server 2019 to CUBIC. (Linux, Android, iOS & MacOS had already made that change.)
The Windows MinRtoMs default was also changed recently, when Microsoft enabled Hystart++. Iām not sure if it was done concurrently with the change to CUBIC or after. It is definitely related code.
Before seeing @cursedZeroXās change, I was going to suggest reverting from CUBIC to the previous CTCP algorithm. That still might be worthwhile, because Iām sure Microsoft would take it very seriously: āYou changed the default congestion control algorithm and broke basic TCP/IP interoperability!ā
It could also be interesting if somebody with Server 2016 enabledCUBIC to see if that causes the same problem, for the same reason.
I think itās very unlikely to have noticeable negative implications.
You probably arenāt getting all of the hypothetical benefits from Hystart++ on your home āDatacenterā network.
In the very worst case something else could break. I think thatās unlikely for several reasons -
Before the CUBIC and Hystart++ changes, before MinRtoMs was changed to 20, it was 300. So you had been using that value on your local network before Microsoft changed the default.
Additionally, the MinRtoMs value is still 300 for the other profiles. You have already been using that value to communicate with every other device on the Internet.
Mostly I wanted to say Iām impressed, @cursedZeroX.
I am having this identical issue with 3 Apple TV devices, an iPad, and an iPhone all in network. My PMS is running the latest Windows 10 build and Iāve had the weird delay playing videos for a while now and it drives us crazy!
So I was all excited when I saw a solution, then I ran the command and my TCP settings show everything PLEX in network and out of network itās talking to is considered the INTERNET profile not data center. Thatās surprised me, not sure if I should change anything or how I could get Windows or detect my in LAN subnet Apple devices as DataCenter not internet.
EDIT: Iāve found this is due to me having PMS installed on Windows 10 Pro, not Windows server. Windows 10 pro seems to default to Internet and I canāt use the following command due to OS restrictions. Now Iām really not sure how to fix this long tedious delay on the Apple devices.