Ongoing & Sundry problems crippling Kodi

  • Guys, I'd appreciate any help anyone can offer. I posted this on the Kodi forum and they suggested I post here too.

    I can keep propping this thing up with babying and regular re-installs, but it's frustrating. It's so close to being totally awesome, but I could never, recommend it to my partner, for example, as she's not technically minded and wouldn't know up from down in this Kodi debug world. She just wants a box that works.

    My configuration is:

    Raspberry Pi 3b running LibreElec 9.2.6 & Kodi 18.9.
    Addons: HTS Tvheadend Server 4.2.21.1 - I can also see 9.2.0.123
    TVheadend Client 4.2.21.1.
    I'm using WiFi. I have disabled Bluetooth & Wired ethernet.
    I have a 1TB USB drive attached for recording.
    No login credenitals are defined for TVheadend to connect to the server. It uses the default.
    These problems have endured throught THREE ISPs and broadband routers, so I don't think it can be a network issue.
    A recent log is at http://ix.io/2Eal
    I shut down this system every night and start it in the morning because my partner is paranoid about the Wifi radiation.
    I have left it on for a few days, but it didn't fix the problem and it causes new ones - details below.
    I have recently changed to a new SD card, and a new power supply and a new cable with no change apparent.

    Problems:

    1. TV Tvheadend fails to connect
    Kodi UI shows it "loading 0%". No guide. No TV channels. No TV.
    If you wait several minutes, sometimes, it connects, and then some or all channels are available
    kodi.log shows:

    2020-11-14 17:00:29.085 T:1690223488 NOTICE: ES: Starting UDP Event server on port 9777
    2020-11-14 17:00:29.086 T:1690223488 NOTICE: UDP: Listening on port 9777 (ipv6 : false)
    2020-11-14 17:00:29.893 T:1774150528 NOTICE: Register - new cec device registered on cec->RPI: CEC Adapter (2708:100>
    2020-11-14 17:00:30.650 T:1629279104 ERROR: AddOnLog: Tvheadend HTSP Client: pvr.hts - unable to connect to 127.0.0>
    2020-11-14 17:07:15.268 T:1936810000 ERROR: Previous line repeats 45 times.
    2020-11-14 17:07:15.288 T:1936810000 ERROR: Control 1000 in window 13001 has been asked to focus, but it can't
    2020-11-14 17:07:15.296 T:1936810000 NOTICE: LoadJpeg: unable to load /usr/share/kodi/addons/service.libreelec.setti>
    2020-11-14 17:07:23.179 T:1629279104 ERROR: AddOnLog: Tvheadend HTSP Client: pvr.hts - unable to connect to 127.0.0>

    Sometimes a reboot fixes it. Sometimes a re-install of TVH server fixes it. Sometimes neither will fix it but a power cycle will. Sometimes I lose the will to watch TV and come back later. Always, eventually, I have to re-install the card, and my recordings database is lost and bla bla bla.
    Other problems along the way, just in case someone can drop a fix on me:

    2. When trying to watch a recording, always the first time, it waits for maybe 20 seconds, does nothing, then returns control to the remove. Trying a second time it always works, and all subsequent plays also work. Reboot - and we're back to the first-time-fail thing.

    3. I'm using my TV remote via the CEC adaptor, and it goes through periods of bad "key bounce". Kodi sees several key presses, so it will, for example, pause then immediately restart replay of a video. It might do that three times in a row. Character building.

    4. The Kodi YouTube app stopped logging in long ago, and although I tried to make my own API key (I have them for other reasons and theyr'e fine) I never got this to work. Shame because Google's YT app on my TV is very slow and has a memory leak and so it needs restarting every few videos.

    5. Artwork thumbnails have never worked.

    6. Only with the latest upgrade, I find that often, the home page left hand menu items I removed (like TV Shows, Movies) are back after a reboot.

    7. Some channels I've disabled in TVHeadend web interface keep coming back - notably the QVC family.

    8. Kodi crashes maybe 4 times during a day. Each time, when it reboots, it wakes up the TV if it's off or snatches the TV back from whatever I was watching with it (TV Youtbe app, mostly).

    OK, I admire the work being done to make Kodi and its addons - both technically, and for it's open source/free spirit.

    Thanks for time and any help you can offer.
    Chris

  • My entirely unscientific, undebugged experience was that trying to run a similar config yielded similar results to you. Having TVheadend server on a separate dedicated RPi made the Kodi system more stable. I was using 3 tuners to stream/record at the same time though which may have been an influence in terms of memory/bandwidth usage though, and I was doing this on earlier versions LE8 which may have been less stable than the current ones.

  • I'm using WiFi.

    ^ WiFi in all RPi devices is a bit horrible. I'd make the other half happy, by stopping using it and run an Ethernet cable. If you must use WiFi setup a router in Bridge mode so the Pi sees an "always on" Etthernet connection and set Kodi to "wait for network" on start. Get a flirc.tv - Your TV - PC Remote Companion device so you can use any decent IR remote instead of CEC (which normally works well, but depends on the specific TV and its firmware). Then as zomboided has suggested, separate the tuners (head end) from the playback client to reduce load on the local system.

  • My entirely unscientific, undebugged experience was that trying to run a similar config yielded similar results to you. Having TVheadend server on a separate dedicated RPi made the Kodi system more stable. I was using 3 tuners to stream/record at the same time though which may have been an influence in terms of memory/bandwidth usage though, and I was doing this on earlier versions LE8 which may have been less stable than the current ones.

    Thanks Zomboided. A useful reference point.

  • I have experienced all the issues listed by everyone. I guess I am an experienced user. All the listed fixes helped. in general I now have all the suggested fix above; separate backend and frontend, no WiFi, LE 9.2.5 down grade(now fixed with 9.2.6) but in the end I came to the conclusion the hard drive is the culprit. Once I removed it from communicating through the USB port, my rpi3b worked much better. I could never get the hard drive ever to be the direct recording location without the same issues you described above. Even with all the fixes listed above and an externally powered hard drive. I ended up buying a bigger sd card and recording to it. I moved the hard drive to a USB port on my router. I manually move the recordings to the hard drive if the sd card starts to get full.(I think that could easily be automated)

    As far as the TVheadend reshowing the qvc channel, make sure you do not delete the channels within tvheadend itself, but do disable within tvheadend and not libreelec pvr section. I could not specifically tell if that is what you are doing. After doing I this way, For me, When channels did reappeared, I found the broadcast channel for the station moved and tvheadend found it during a rescan and thought of it as a new station. I am extremely happy with my setup and it is my main pvr.