Libreelec 8&9 Kernel regression (VAAPI)

  • Hello,

    I have been experiencing a problem for some time now: Kodi freezes when I watch SD content with VAAPI enabled. I posted about it here and we hunted it down to beeing a kernel bug.
    It does not happen on Ubuntu 16.04.1 LTS, it does not happen on a downgraded kernel version of Libreelec (the one posted on the TRAC ticket by fritsch).

    LE 9 Debug Log: DiPD dmesg: LHCL

    LE 8.1.1 Debug Log: OWYL

    LE 8 Debug log: UIQO
    Debug log Kodi beta3: WCDf
    dmesg after the freeze: HdUP
    gdb debug: MNhA
    File to reproduce: Die Ruhrpottwache-SAT.12017-02-1712-59.ts?dl=1


    Remark from fritsch:

    Quote


    From my first analysis it looks like something mesa intel driver vs. xserver vs. egl

    Thank you for looking into this, let me know if I can help any further.

    Edited 6 times, last by Mettbrot (September 26, 2017 at 1:02 PM).

    • Official Post

    There won't be any fixes here for the Kodi krypton 17.x series. You are better off trying a development build with kodi 18 as lot's has changed with video player and vaapi

  • I tested my latest build, #1004 (based on kernel 4.13.4) with your test file streamed over smb:// and didn't have a problem while using a NUC6i5SYH.

    Can you try disabling MPEG-2 VAAPI hardware acceleration as below, and see if that helps you?

    I have MPEG-2 VAAPI enabled, and it works fine - no freeze - but there's obviously a problem with your system/configuration so this might allow you to work around it.

    Looking at your dmesg, LHCL, there's a GPU hang being reported. Unfortunately that could be anything - a kernel bug, or (more likely) an Intel driver bug.

    If you wish to raise a bug, please follow the guidelines here, in section "1.1 DRM Kernel" - add "drm.debug=0x1e log_buf_len=2M" on your kernel command line, reproduce the bug, then open a bug report and attach all of the files documented in the "DRM Kernel" section.

  • Thank you for your answer!

    I can workaround the bug by disabling MPEG-2 VAAPI. Thats what I have to do since the last couple of versions :(

    If I remember correctly I tried with the build fritsch provided in the kodi trac and it worked with this one. Wouldn't this one hang too if it was a driver issue?

    How do I adapt the kernel command line? Is this something I can do at boot? Can it be done in a live environment? I like to boot "live" to have the stock image for testing.

    Can I append them like this in syslinux.cfg?

    Code
    LABEL live
      KERNEL /KERNEL
      APPEND boot=UUID=3108-2154 live quiet tty vga=current drm.debug=0x1e log_buf_len=2M

    just tried this, at least they show up in proc/cmdline so I guess thats fine. Running the test now..

    Edited 3 times, last by Mettbrot (October 6, 2017 at 11:56 AM).

  • OK, I think I got it. I had to restart the video ~20 times before it happened. Maybe you could confirm its a driver bug before I file it with them?

    Kodi.log: RfDH

    dmesg: eYSc

    Unfortunately, its only the last part of the dmesg, I guess the buffer was too small for that.

    error.gz?dl=1

    vbios.dump?dl=1

    Edited 3 times, last by Mettbrot (October 10, 2017 at 10:52 AM).