lePotato, how to keep from freezing?

  • I transitioned to running Kodi on lePotato SBCs about 6 months ago. The transition went really smoothly at first. Everything worked, 4k content played easily, I was really happy with the setup. Everything was stable and working fine for a few months.

    I then started having Kodi freeze on me. Seemingly at random times. Sometimes during playback, sometimes sitting in screensaver mode, anywhere in the UI...or anywhere in between. I've turned on debug logging but not once have the logs pointed me at anything that seemed to be going wrong. The logs just stop while sending DEBUG info usually, and not the same debug logs.

    I've looked at all sorts of "how to stop kodi from freezing" blogs and videos. Some say it is usually your power input, I have tried literally dozens of different supplies (and cables) rated for 2.5a and none appear to make any difference. As the problem happens at idle as often as under load, I tend to doubt this is part of my problem. Others say that the userdata contents is generally the problem. I've now been able to reproduce my crash/hang with a fresh install of libreElec or CoreElec. Nothing changed after install of the base image. No Add-ons installed, no content scraped. I don't see how I can isolate my userdata directory any more than this. I've even been able to reproduce the hang with literally touching nothing after the base install, not even going through the base setup routine that auto-pops up.

    I am not familiar with debugging heat issues, but I have little stick-on heat-sinks on the CPU and memory and nothing appears even warm to the touch, never-mind hot. The OS generally shows in the vicinity of 45 degrees C and below. This appears to be no different than when everything appeared to be stable.

    I have swapped out the entire SBC with another board thinking my specific device may be at-fault, I hit the same issue. Also replaced the SD card with brand new variants, again, no change.

    I have installed generic Ubuntu (well, the LePotato version) and that image appears to stay stable on the systems under any load for as long as I want. Its only Kodi that appears to be hitting this stability issue.

    Can anyone think of any bright ideas? While I have made some changes to my library since everything was stable for me, like I mentioned above, the problem appears to have nothing to do with my library as the freeze happens with a base install and nothing altered. I've even added a firewall rule on my router so the device can't reach the internet (in case it is randomly reaching out somewhere that is a problem) and it happens with/without this rule.

    What else is there to eliminate? The versions of CoreElec and libreElec are the same versions that I was running months ago when these systems seemed to run just fine.

    I also tried disabling HDMI-CEC (which some people claimed to have caused stability problems), no change.

    I'm running out of ideas of how to narrow this problem further... Is there some sort of bootloader/firmware that might get automatically installed?

    Many thanks for any Help!

    • Official Post

    I guess you're using the LE 9.0 images? .. the only thing I can suggest is installing the mainline kernel images on Index of / (AMLGX) but while stability in the core OS is overall improved on the legacy kernels they are still "work in progress" for video and the test images are best used with AMLG12 hardware where the devices have enough grunt to disable hardware decoding and still have good 1080p (not 4k) playback.

  • If you go to LibreElec and select LePotato, it tells you to download this: LibreELEC-LePotato.arm-9.0.2.img It's been this image since I purchased my LePotato boards. On the CoreElec site, I chose 9.2.3 (Stable) and select LePotato and get this image: CoreELEC-Amlogic.arm-9.2.3-LePotato.img. Should these not be the current stable versions? Should I try to find older images? Nightly images?

    The thing that really confuses me is what changed between my multiple months of 100% stability and today? I'm using the same hardware, the same software images (I saved it locally, did not re-download) but now, all of a sudden, it just freezes on me randomly under any circumstances. A month ago, I had no freezing issues and I could play 1080 or 4k content without any issues whatsoever.

    I installed the nightly image of CoreElec today and, so far (cross my fingers), it has been stable. I've been able to scrape all my TV Shows without a freeze (first time in a month). The part I find strange is that 5.1 audio now doesn't work. If I change my output to stereo, my videos with a 5.1 track (or any others) will play fine. If I change the settings to output 5.1, I get no audio at all and the video stutters dramatically. With it set to 5.1, videos with a stereo track play fine, only videos with a 5.1 track have issues.

    I will try the nightly image of LibreElec you mentioned and see if I have any better luck there. Thank you for the help.

    At the moment, I don't need the latest/greatest, I would just like to have something that I can reliably watch for more than 5 minutes. Is there any image known to be stable/functional on the LePotato boards?

  • LE 9.0.2 has a major bug on Le Potato (segfault on file transfer), it is basically broken. The fix never made it to LE 9.0.2.

    The best images for Le Potato for now are CE nightlies (Amlogic-ng).

    Regarding your freezing issue - looks more like a hardware problem.

  • I really don't understand how it could be a hardware problem. I've replaced all the hardware and still have exactly the same issues. If I run regular Ubuntu Linux, it runs as long as I want and stays perfectly stable. Sure, Kodi may be exercising hardware that Ubuntu does not, but I can literally boot Kodi on a fresh install (of "Stable" CoreElec or LibreElec) and touch nothing, eventually it will hang.

    Nightly CoreElec seems to work (stay stable). Biggest issue so far is 5.1 audio. 5.1 audio causes major stuttering in the video and no audio at all. If I configure Kodi for 2.0 channel out, everything appears to work great. I am attempting to use audio out over HDMI (not 1/8"). This works fine in the "stable" images of both CoreElec and LibreElec (I just have to deal with the random freezing).

    Nightly LibreElec I have all sorts of problems. The Add-on repo doesn't contain the Extras add-on like it used to. Not the end of the world, but annoying. Also, I have not been able to find a single video file that will actually play. I just get an error pop-up saying that something went wrong and the video can't be played.

    I guess, for now, I run the currently nightly of CoreElec and watch for progress on getting the audio working properly. Certainly better than tossing all this hardware.

    Thanks for the help.

  • Well, my freezing issue was certainly not a hardware problem. For the past month, the longest I have been able to run without a freeze has been about an hour. Running last night's CoreElec nightly, I have now been able to run for 24 hours without any freezes.

    Isn't Le Potato supposed to be the "flagship hardware platform" of libre? Its been out for 3 years, they are talking about coming out with a new, re-designed version and yet they haven't figured out how to make it work reliably yet? Just seems crazy to me. Are there any old builds that work reliably?

    • Official Post

    The core OS is in awesome and super-reliable shape since we moved to mainline u-boot and modern kernels. Unfortunately the one thing we need to work well (hardware decoding) is in pissy shape .. and until there's a eureka moment on seeking/flushing support with GBM/V4L2 images aren't so usable. Raspberry Pi (also using stateful decoding) is now stuck at the same point so I'm hoping their considerably larger gene-pool of talent (Amlogic's is woefully small) will figure out something and then we'll be in better shape.