Stuttering due to high CPU load

  • Hello

    I listen to Radio paradise.flac with the addon Tunein2017.

    After about 30 minutes CPU-Kodi is rising to 118% and it stutters only.when playing with mp3 I have not yet noticed.

    Is this due to Kodi or the addon?

    Here is a Kodi.log

  • Must be a matrix problem.

    I have contacted Tunein2017 Addon developer who has the same problem with Matrix.

    After about 30 minutes of playing a flac stream the cpu load climbs so high that there are dropouts.

    Local flac files are not affected by this.

    Can you reproduce this?

  • When running with high cpu can you:

    Check with "top" to see which processes are using cpu (probably just kodi.bin, but check if anything else is significant).

    In top press H to see which threads are using cpu. That may narrow it down (e.g. LanguageInvoker is python)

    "perf top" may give more fine-grained information about functions where cpu is spending time.

    Can you post the significant entries for each of these (e.g. anything about 5%). "perf top" averages so wants to be left for at least 10 seconds to get a more accurate value.

  • Hmm. Not too illuminating. Feels like something is busy spinning in VideoPlayer.

    But not much(*) appears in debug log.

    If you enable component specific debug and enable all categories, do you get anything additional appearing when cpu usage is high?

    (*) You've got some jsonrpc messages appearing - are you controlling with a phone app?

  • Curious. I tried a debug master build of LE, thinking if it showed the high CPU I could capture a backtrace which might shed some light.

    But it's been running (strm file containing http://stream.radioparadise.com/rock-flac) for an hour.

    Audio is glitch free and VideoPlayer is showing 0.7%.

    I then ssh-ed into home system, and ran the same. And VideoPlayer is taking 66% after 20 minutes.

    Maybe it's addons or user settings? I've renamed .kodi so default settings/addons and it's still the same.

    I'll need to try a debug build of Matrix.

  • Debug build of Matrix was also high cpu.

    I bumped just kodi from the version in Matrix to version in master and it was still high cpu.

    I also bumped ffmpeg from the version in Matrix to version in master and it has low cpu again.

    It feels like a bug in ffmpeg that has been fixed.

    Can you test an LE nightly build, which I think won't have the issue?

  • I tried to boot the Raspi 4 with ""LibreELEC-RPi4.arm-11.0-nightly-20211006-9fefbf7.img.gz" and "LibreELEC-RPi4.arm-11.0-nightly-20211008-8696f6d.img.gz" which did not work.the raspi only boots up to the coloured boot screen.then the screen stays black.

    I installed "LibreELEC-RPi4.arm-10.0.0.img.gz" again and restored the backup.

  • I tried to boot the Raspi 4 with ""LibreELEC-RPi4.arm-11.0-nightly-20211006-9fefbf7.img.gz" and "LibreELEC-RPi4.arm-11.0-nightly-20211008-8696f6d.img.gz" which did not work.the raspi only boots up to the coloured boot screen.then the screen stays black.

    Did you do a fresh installation for those images? Otherwise it could be related to the KodiNerds repo, which eventually breaks the update.

  • Also with the "LibreELEC-RPi4.arm-11.0-nightly-20211010-4ec2af6.img.gz" my Raspi 4 does not boot.

    The start.elf is found (see attachment), then comes the coloured square and then a black screen. That was it.

    Please open a new thread for this, because your original issue is different. Make sure you are using an HDMI 2.0 or 2.1 cable (especially if you have a 4K TV connected). Try to login by SSH when black screen appears, and post a link to a kodi.log.