Not releasing Tuners on HDHomeRun from Linux Docker

This seems to be an issue on various Plex server host operating systems, not just Linux or Docker. The general issue where Plex doesn’t signal a HDHomeRun tuner’s stream closure is over two years old.

History

I’ve got a new Quad tuner HDHomeRun Connect Quatro. I can view four different channels, one at a time, and on the fifth channel I receive a different error based on the playback device.

Plex Web
“Playback Error: Could not tune channel. Please check your tuner or antenna.”

AppleTV 4
“Recording Failed: Live TV - Session”

Looking at the logs on the HDHomeRun Quatro, I can see, for example, Tuner0 isn’t being reused for the new channel I select. Instead, Tuner1 is used for the new channel i’m currently viewing and Tuner0 is still on the old channel nobody is using. Either Plex or HDHomeRun eventually catch up or time out after about 15min and terminate the session on the tuners that aren’t in use. Super frustrating.

Here’s a snippet from my HDHomeRun system log where you can see what i’m describing…

20200331-02:40:10 Tuner: tuner0 tuning 2.1 KCBS-HD (8vsb:575MHz-1)
20200331-02:40:11 Tuner: tuner0 streaming http to 10.10.10.10:62765
20200331-02:40:27 Tuner: tuner1 tuning 4.1 NBC4-LA (8vsb:605MHz-3)
20200331-02:40:28 Tuner: tuner1 streaming http to 10.10.10.10:62863
20200331-02:40:36 Tuner: tuner2 tuning 5.1 KTLA-DT (8vsb:599MHz-3)
20200331-02:40:36 Tuner: tuner2 streaming http to 10.10.10.10:62938
20200331-02:40:45 Tuner: tuner3 tuning 7.1 KABC-DT (8vsb:177MHz-1)
20200331-02:40:46 Tuner: tuner3 streaming http to 10.1.1.11:62993
20200331-02:40:54 HTTP: rejecting request from 10.10.10.10 - all tuners in use
20200331-02:55:58 Tuner: tuner0 http stream ended (remote closed)
20200331-02:56:11 Tuner: tuner1 http stream ended (remote closed)
20200331-02:56:20 Tuner: tuner2 http stream ended (remote closed)
20200331-02:56:28 Tuner: tuner3 http stream ended (remote closed)