Plex app with a TV Tuner PCI-E Card

xaaronx

Cadet
Joined
Apr 1, 2024
Messages
4
Hi everyone,

I was wondering if anyone might be able to help. I'm starting to think what I'm trying to achieve is impossible. I'm not the best with Linux...

Basically I'm using TrueNAS Scale and I've been running a Plex server on it for quite a while and it's been great.

I wanted to add a DVB PCI-E TV Tuner card so I could stream free-to-air TV to my devices here in Australia.

I added the card, and went to TrueNAS > System Settings > Shell and ran: lcpsi -k

I can see the TV card with drivers correctly loaded:

Screenshot 2024-04-02 180152.png


Within Plex, it cannot find the card, even though it should work fine with Plex. I'm at a loss of what to do... I looked everywhere and found multiple xposts of this:

I was able to get this working with TrueNAS Scale 22.02.4 and the Plex app packaged by TrueCharts (plus Plex Pass, which is needed for Plex to support Live TV at all). Two non-default config changes were needed:

  1. In the Plex chart config, under "Configure Mount USB Devices", add a passthrough for /dev/dvb (same path on host and container). Default device permissions were fine for me. At this point, Plex could see the tuner, but scanning channels found almost none.
  2. It turns out there's a bug with this particular tuner on Linux. When I went to scan channels, dmesg filled up with cx23885 driver errors, which tipped me off to the fix. Basically, there's a workaround enabled by default for some hardware, but not for my setup (a 10400 CPU with a Z590 mobo). Adding the cx23885.dma_reset_workaround=2 option to the kernel command line forces the workaround on and allows the card to work properly.
You can make this kernel option persist across reboots and updates as follows:

$ sudo midclt call system.advanced.update '{"kernel_extra_options": "cx23885.dma_reset_workaround=2"}

However I have no idea where to find "Configure Mount USB Devices". If I select the Plex application and go to edit, I can add Additional Storage and select Host Path as the Type, and even though it's for storage I tried setting /dev/dvb for the mount path and the host path but that didn't seem to help.

If anyone could point me in the right direction that would be great, thanks a lot!
 

Johev

Contributor
Joined
Nov 26, 2014
Messages
107
@xaaronx I believe I found how it should be encoded. I was struggling with a similar issue for TVheadend and your quoted solution worked for me. So I will try to help you out, as I imagine that the same configuration will be present for Plex.

Under the Plex App chose "Edit"

Then under "Resources and Devices" you should see something similar to what I have:

Under "Mount USB devices" you need to put the host device path. In my case it's /dev/dvb/adapter0 and /dev/dvb/adapter1 (as my TV tuner has 2 tuners on the same PCIe card.

To find your device path try the following:
Under TrueNAS shell:

use the command: lspci -k
to try to identify if the card is well installed on your system

in my case the output was the following:
07:00.0 Multimedia controller: Digital Devices GmbH Cine V7
Subsystem: Digital Devices GmbH Cine V7
Kernel driver in use: ddbridge
Kernel modules: ddbridge

Then use the following command:
ls /dev/dvb

I got the output:
root@truenas[~]# ls /dev/dvb
adapter0 adapter1

then I just used the following output "/dev/dvb/adapter0" and the second one "/dev/dvb/adapter1"

I hope that this helps you and good luck :).


1712247319971.png
 

xaaronx

Cadet
Joined
Apr 1, 2024
Messages
4
Thanks a lot for your reply :)

I don't have the Mount USB Devices option at all under the GPU options.

Maybe this is because I'm using Scale instead of Core?

I can't work it out. :(
 

Johev

Contributor
Joined
Nov 26, 2014
Messages
107
Thanks a lot for your reply :)

I don't have the Mount USB Devices option at all under the GPU options.

Maybe this is because I'm using Scale instead of Core?

I can't work it out. :(
I'm using scale too, the latest stable version. Let me check how plex works as I don't use it anymore.
 

xaaronx

Cadet
Joined
Apr 1, 2024
Messages
4
I was wondering, if I put tvheadend onto my truenas server, can I add tvheadend to plex as a network dvb, similar to hdhomerun? That might be a workaround.
 
Top