RPi5 with three TV tuners

  • Hi all,

    I've been running a RPi4 with three XBox TV tuners for quite a few years. Ive upgraded to a Pi5 and when I plug in two tuners it seems reasonably okay. As soon as I plug the third tuner in, it doesn't boot properly, doesn't connect to the network, etc. It doesn't better whether I plug the third tuner into the USB socket on the Pi, or if I plug all three into a UBS3 hub (so all on a USB3 socket).

    Has anyone else had a similar problem? I'm starting to think I will need to run one system (RPi4) as the TV server, and the RPi5 as the client!

    To give a bit more information about the problem, I have just enabled debug logging, and rebooted after plugging in the third tuner. I'm running LE21 RC (latest nightly build) although the stable build doesn't do better. The remote control (flirc adapter) now doesn't work, and it isn't connected to the network (it shows in my modem settings as connected but "This device either does not support or is not configured for IPv4 addressing."), so I'm going to have trouble getting the log files.

    This may help, although I don't understand the timeline. This was a freshly installed system this morning, so Feb 27 logging may indicate problems with the date and time.

    https://paste.libreelec.tv/normal-raven.log

    Best wishes,

    Mark

    Edited 3 times, last by elliottmc (March 9, 2024 at 10:56 AM).

  • As a follow-up, I've reconnected the same three tuners to the RPi4, and reinstalled, and they are working fine as before.

    So there's definitely something going on with the RPi5 and/or LE12 in this configuration.

    Best wishes,

    Mark

  • Power source issue? If you could connect those tuners thru (external) powered usb hub...

    The RPi5 has the official 27W (5A) power supply, so I don't think this is very likely. The RPi4 has a 3A power supply and has been working for years.

    I did try connecting the tuners to a hub, but not a powered one. I'm reluctant to spend more money on one in order to test this, although I may be able to put my hands on one.

  • I did try connecting the tuners to a hub, but not a powered one. I'm reluctant to spend more money on one in order to test this, although I may be able to put my hands on one.

    Try to get one powered hub at least for testing, no need to be USB3, one old could be good too. Just to check it what's happen if the tuners doesn't draw the power from RPi. I'm not saying that the problem can't be something else, but if with one or two (exactly the same) tuner it's working well, should be useful to exclude the power issue.

  • Your note that the FLIRC USB is not working makes this seem like a USB issue not related to PVR. Did you try USB devices individually in each port and see what lsusb shows.

  • This doesn't sound like a LibreELEC issue.

    And USB isn't something I know too much about.

    I'd suggest opening a kernel issue and describing the issue,

    where a USB expert may have better advice.


    If you can reproduce the issue with RPiOS then that would be even better (as there may be more debugging tools available).

  • Your note that the FLIRC USB is not working makes this seem like a USB issue not related to PVR. Did you try USB devices individually in each port and see what lsusb shows.

    The FLIRC works fine until the third TV tuner is plugged in.

    Unfortunately at that point, the Pi doesn't get an IP address, so I cannot connect to it via ssh.

    I've been plugging the tuners in first to the USB3 ports, and then only to the USB2. I wonder if it is a problem with the tuner and the USB2 port of the Pi, rather than simply the third tuner.

    Thanks for the suggestion. I will have a look and report back.

    Best wishes,

    Mark

  • Looks like the RPi5 is very sensitive to the power source.

    Delivering a maximum of 5.1V, 5A, it supports USB PD (Power Delivery), so Raspberry Pi 5
    can communicate with it and select the most appropriate power profile. This enables
    Raspberry Pi 5 to increase the USB current limit automatically from the default 600mA to
    1.6A, in order to provide extra power for devices connected to the four Type A USB ports.

    (https://datasheets.raspberrypi.com/power-supply/2…oduct-brief.pdf)

    The RPi4 have a maximum USB port output of 1.2A without to request a "genuine" power source.

    So... could be a possibility that the RPi5 to don't "recognize" the power source as a "genuine Raspberry 27W" power source (and limit the power delivery on USB)?

  • If you see anything like "needs the official PSU" written in documentation this is simply meaning "needs a PSU with the capabilities of the official PSU" as there is 100% no hardcoded requirement or secret handshaking to check whether the user has an official RPi branded PSU. RPi != Apple :)

  • Update with more testing after resolving my network issues and updating to the latest nightly build.

    If I have three tuners connected, I can ssh in and lsusb shows them all fine. But for some weird reason I cannot connect through the web interface to TVHeadEnd.

    If I remove one tuner, it all works fine. As soon as I plug the third tuner in, I don't get a response from TVHeadEnd.

    But the stability issues seem to be resolved. LibreElec doesn't seem to be crashing now.

  • Right, I've had a bit more time to look into this. I also updated to LE 12.0 final, as I figured it wouldn't hurt!

    So, with a powered USB hub, I seem to have the same problems with three tuners. Fine with two, but I have trouble connecting over the network with three plugged in. It doesn't seem to hang in the same way, but it's not good.

    So I guess I try to debug this with the tuners plugged in directly, so avoid complications?


    Would someone be able to advise me on what information is likely to be needed?


    Right, this may help. I know that partial logs are not always useful, but this is with two tuners.


    2024-05-05 13:25:15.711 [ NOTICE] START: HTS Tvheadend version 4.3-2180 ~ LibreELEC Tvh-addon v12.0.0.0 started, running as PID:399 UID:0 GID:39, CWD:/ CNF:/storage/.kodi/userdata/addon_data/service.tvheadend43
    2024-05-05 13:25:16.188 [ INFO] linuxdvb: adapter added /dev/dvb/adapter1
    2024-05-05 13:25:16.505 [ INFO] avahi: Service 'Tvheadend' successfully established.
    2024-05-05 13:25:16.654 [ INFO] scanfile: DVB-S - loaded 1 regions with 222 networks
    2024-05-05 13:25:16.654 [ INFO] scanfile: DVB-T - loaded 44 regions with 1081 networks
    2024-05-05 13:25:16.654 [ INFO] scanfile: DVB-C - loaded 18 regions with 62 networks
    2024-05-05 13:25:16.654 [ INFO] scanfile: ATSC-T - loaded 2 regions with 13 networks
    2024-05-05 13:25:16.654 [ INFO] scanfile: ATSC-C - loaded 2 regions with 6 networks
    2024-05-05 13:25:16.655 [ INFO] scanfile: ISDB-T - loaded 2 regions with 2540 networks
    2024-05-05 13:25:30.936 [ INFO] mpegts: 634.167MHz in DVB-T Network - tuning on Panasonic MN88472 #0 : DVB-T #0
    2024-05-05 13:25:30.937 [ INFO] subscription: 0001: "epggrab" subscribing to mux "634.167MHz", weight: 4, adapter: "Panasonic MN88472 #0 : DVB-T #0", network: "DVB-T Network", service: "Raw PID Subscription"
    2024-05-05 13:25:30.937 [ INFO] mpegts: 642.167MHz in DVB-T Network - tuning on Panasonic MN88472 #1 : DVB-T #0
    2024-05-05 13:25:30.937 [ INFO] subscription: 0002: "epggrab" subscribing to mux "642.167MHz", weight: 4, adapter: "Panasonic MN88472 #1 : DVB-T #0", network: "DVB-T Network", service: "Raw PID Subscription"

    And the following is with a shutdown, plug in the third tuner and then boot. At boot, I get a lot of fast scrolling text on the screen before the Kodi start screen, which isn't normal!

    2024-02-27 17:26:06.653 [ NOTICE] START: HTS Tvheadend version 4.3-2180 ~ LibreELEC Tvh-addon v12.0.0.0 started, running as PID:399 UID:0 GID:39, CWD:/ CNF:/storage/.kodi/userdata/addon_data/service.tvheadend43
    2024-02-27 17:26:06.995 [ INFO] linuxdvb: adapter added /dev/dvb/adapter1
    2024-02-27 17:26:07.505 [ INFO] avahi: Service 'Tvheadend' successfully established.
    2024-02-27 17:26:07.711 [ INFO] linuxdvb: adapter added /dev/dvb/adapter2
    2024-02-27 17:26:08.046 [ INFO] linuxdvb: adapter removed /dev/dvb/adapter1
    2024-02-27 17:26:08.113 [ INFO] scanfile: DVB-S - loaded 1 regions with 222 networks
    2024-02-27 17:26:08.113 [ INFO] scanfile: DVB-T - loaded 44 regions with 1081 networks
    2024-02-27 17:26:08.113 [ INFO] scanfile: DVB-C - loaded 18 regions with 62 networks
    2024-02-27 17:26:08.113 [ INFO] scanfile: ATSC-T - loaded 2 regions with 13 networks
    2024-02-27 17:26:08.113 [ INFO] scanfile: ATSC-C - loaded 2 regions with 6 networks
    2024-02-27 17:26:08.113 [ INFO] scanfile: ISDB-T - loaded 2 regions with 2540 networks
    2024-02-27 17:26:08.331 [ INFO] linuxdvb: adapter removed /dev/dvb/adapter0
    2024-02-27 17:26:09.654 [ INFO] linuxdvb: adapter added /dev/dvb/adapter0
    2024-02-27 17:26:09.927 [ INFO] linuxdvb: adapter added /dev/dvb/adapter1
    2024-02-27 17:26:09.927 [ INFO] linuxdvb: adapter removed /dev/dvb/adapter2
    2024-02-27 17:26:11.147 [ INFO] linuxdvb: adapter added /dev/dvb/adapter2
    2024-02-27 17:26:11.933 [ INFO] linuxdvb: adapter removed /dev/dvb/adapter1
    2024-02-27 17:26:11.944 [ INFO] linuxdvb: adapter removed /dev/dvb/adapter0
    2024-02-27 17:26:13.634 [ INFO] linuxdvb: adapter added /dev/dvb/adapter0
    2024-02-27 17:26:13.810 [ INFO] linuxdvb: adapter added /dev/dvb/adapter1
    2024-02-27 17:26:13.813 [ INFO] linuxdvb: adapter removed /dev/dvb/adapter2
    2024-05-05 13:32:22.538 [ INFO] epgdb: snapshot start
    2024-05-05 13:32:22.601 [ INFO] epgdb: queued to save (size 8247916)
    2024-05-05 13:32:22.601 [ INFO] epgdb: broadcasts 21973
    2024-05-05 13:32:22.601 [ INFO] epgdb: save start
    2024-05-05 13:32:22.745 [ INFO] epgdb: stored (size 1847841)
    2024-05-05 13:32:22.940 [ INFO] linuxdvb: adapter added /dev/dvb/adapter2
    2024-05-05 13:32:23.414 [ INFO] linuxdvb: adapter removed /dev/dvb/adapter1
    2024-05-05 13:32:23.555 [ INFO] mpegts: 634.167MHz in DVB-T Network - tuning on Panasonic MN88472 #0 : DVB-T #0

    That's the last line in the log, and I cannot connect to TVHeadEnd via the web interface. I just get a spinning wheel in my web browser.

    Best wishes,

    Mark

    Edited once, last by elliottmc: Merged a post created by elliottmc into this post. (May 5, 2024 at 2:39 PM).

  • I've recently been migrating Tvheadend documentation over to a new Docs/Wiki site https://docs.tvheadend.org and one of the text blocks I've moved talks about how multi-tuner setups on Raspberry Pi hardware can be troublesome. The issues flagged are power; as often you need to run tuners from a powered hub to ensure the current draw is handled instead of being directly connected to the Pi board, and bandwidth as this arrangement results in the tuners being connected to a single USB port. Then for extra credit it mentions that RPi 0/1/2/3/4 boards are sharing USB with Ethernet. RPi5 runs Ethernet from a proper PCI bus which should eliminate the latter issue, but the other issues are still possible.

    What happens with one tuner connected directly and other tuners connected via the hub? (experiment with different combinations)

  • Hi Chewitt,

    Thanks for the comments.

    So, the short version is I tried pretty much every permutation I could think of.

    I've been using a RPi4 with the three tuners for some years now, and it's rock stable.

    With two tuners connected, no matter how, the RPi5 works fine. As soon as I connect the third tuner, it all goes pear shaped. That is with all three tuners on the Pi, all three tuners on the powered hub, and everything in between.

    Looking at the logs, it seems that as soon as the third tuner is connected, it goes through a cycle of disconnecting the other ones.

    Best wishes,

    Mark

  • Can you compare the messages in dmesg when plugging in the three tuners on both the Pi4 and Pi5.

    If there are some error messages only on the Pi5 then that may help narrow it down.