Kodi/LE crashing when left alone

  • I've got an issue where Kodi/LibreELEC crashes when left alone with the TV off, typically overnight or during the day while I'm at work. The odd part is, it doesn't happen every night/day.

    I've just done a clean install of 9.0.2 to see if it still happens, and it does. Nothing in the Kodi library, no PVR set up, no custom advancedsettings.xml.


    Here are some logs I managed to salvage. It happened overnight just now but ,frustratingly, the logs for the overnight session have completely vanished - not even in the 'old' log or any of the zipped logs!
    Kodi.log:

    system.log:


    In fact, since restarting this morning, it's now doing the endless audio device scan: http://ix.io/1rc2
    It seems to do this a lot, too, but only when the TV is off, I think..?

  • awiouy

    Approved the thread.
  • Thanks, mglae. I've given that a go and will leave it overnight to see what happens.

    My only worry is that article frequently mentions AMD GPUs are not supported, but I'm running a Ryzen 3. However, the actual getedit script didn't seem to complain and in fact identified my GPU as "Intel/AMD", so I guess it's just outdated..?

  • Sadly, there's still an issue. I checked on it this morning and it was unresponsive, both on-screen and over SSH and Samba.


    Unfortunately, I didn't have debug logging enabled (I turned it off to watch a film last night), but LE has lost all trace of log files from last night anyway. It seems it's been merrily rebooting itself overnight, so the log below is the latest 01_KODI_CRASH.log from the LogFiles Samba share. I've since enabled Debug logging in case it happens again while I'm at work, but in the meantime you can see several crashes in the paste below, all ending with "ERROR: CAESinkALSA - snd_pcm_writei(-32) Broken pipe - trying to recover"



    Thanks for your help.

  • 1) Just to be sure: did you reboot after creating the custom EDID?


    2) Insert

    Code
    1. <loglevel hide="false">1</loglevel>
    2. <debug>
    3. <showloginfo>false</showloginfo>
    4. </debug>

    into your advancedsettings.xml and restart kodi to have debug logging without overlay.


    3) Please log in via ssh, type dmesg|paste and post the resulting URL here.

  • Yep, definitely rebooted. I ran the script and let it do its thing - rebooted itself at the end.


    I've added those lines and rebooted (with the TV on), then left it a few minutes before uploading the log. Is it worth repeating with the TV off?

    Log file: http://ix.io/1ru1

    For what it's worth, the TV is a Sony XF8096 running Android v8.0, just in case that raises any flags for anyone. Just thinking maybe it's the TV itself causing these issues...

    Thanks again.

  • Try to disable in bios anything that has to do with power saving. And maybe try to force the max. GPU frequency (not sure how to do this on AMD).

  • Well, it went again overnight. It seems to then get stuck in a rebooting loop..? See what you can make of it:


    It all works like a charm if I just turn it on when I want to watch something, but I was planning on leaving it running as a PVR server, too. Is there a way of closing Kodi without shutting down? Or perhaps have it automatically close Kodi when the TV switches off (if that's detectable)? But then of course starting Kodi again without me having to SSH in or anything like that...


    smp, there are hundreds of options in my BIOS, all with acronym names! But I found a couple of possibly power-saving-related settings - one is AMD's Cool'n'Quiet feature, and there were some graphics features I will look at. One thing at a time, though...

  • To my surprise video=HDMI-A-1:D is missing in your kernel command line.


    This is a known bug that seems to be forgotten to merge.


    1) Remove your current configuration

    Code
    1. getedid delete

    and reboot.


    2) Get the fixed script

    Code
    1. cd
    2. wget https://github.com/LibreELEC/LibreELEC.tv/raw/22ed317c897a11068f73bf171a40484623ae7858/packages/sysutils/busybox/scripts/getedid
    3. chmod +x getedid

    3) Create the new configuration

    Code
    1. /storage/getedid create

    4) Reboot and post dmesg|paste again.

  • I followed your steps; new dmesg output here: http://ix.io/1rz2


    It looks like video=HDMI-A-1:D is now in the command line, so I will leave it running today/overnight to see how it goes (unless there's anything else?).

    Thanks again.

  • It looks like video=HDMI-A-1:D is now in the command line, so I will leave it running today/overnight to see how it goes (unless there's anything else?).

    Good plan.


    I don't want to frighten you, but:

    Code
    1. [ 0.669046] WARNING: CPU: 2 PID: 1 at drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:1648 core_link_enable_stream+0xcc1/0x10cb

    dc_link.c:1648 is inside HDMI configuration and may be related to the crash.

  • Well, it's been almost a day, and I turned on the TV this morning, switched to the LE input and... it was still up and running!


    So that seems to have done it! Thanks for all your help.


    Edit: that extra bit about dc_link.c is (hopefully) not an issue in the end - and just as well, because I'm not really sure what I was looking at...

  • Fine that it's working.

    Edit: that extra bit about dc_link.c is (hopefully) not an issue in the end - and just as well, because I'm not really sure what I was looking at...

    As long there are no visible errors enjoy your system. Maybe the warning is fixed in upcoming LE 9.1.003 with at least kernel 5..2.