CPU stuck at 800Mhz?

  • So I have a Intel NUC: NUC6CAYH

    CPU is a Intel Celeron J3455 / 1.5 GHz / 2.3Ghz turbo.

    But in LibreElec / Kodi (19) it is stuck at 800Mhz.

    I have checked everything in BIOS but all settings are at high perf.

    If I only swap the disk and boot Windows, speeds are ok.

    How to solve this?

    • Official Post

    It looks like a memory leak error, triggered by the Netflix add-on:

    Code
    ...
    2019-07-26 10:10:42.314 T:139900012103424   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                 - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                Error Type: <class 'urllib2.URLError'>
                                                Error Contents: <urlopen error [Errno 111] Connection refused>
                                                Traceback (most recent call last):
                                                  File "/storage/.kodi/addons/plugin.video.netflix/addon.py", line 33, in <module>
                                                    NAVIGATION.router(paramstring=REQUEST_PARAMS)
    ...

    Uninstall the add-on and see whether it solves the issue. Maybe a simple re-install makes Netflix work as expected.

  • Run this command in ssh:

    Code
    cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor

    If is says "powersave" - run this:

    Code
    echo performance > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor

    If this solves your issue you can make it permanent by adding it to /storage/.config/autostart.sh

  • Yep seems to me you might need a solution similar to what is towards the bottom here:

    Video stutter 25Hz Videoplayback with Hardwaredecoding Libreelec 9.0

    ....some sort of kernel param to force the CPU to a higher setting (as per the suggestion above). If you force the CPU up to a higher level, you'll use a bit more power but that's usually a much more liveable scenario than stutter effects...it might also be worth looking at the GPU side of things, although I don't think that is used for Netflix, that's all software decoded I think?

  • Yeah, setting GPU frequency to a max.setting is pretty much a must for most Intel LE boxes. I use 750 mhz GPU speed for my Gemini Lake box. However, I didn't have to change the CPU governor to "performance" because default "powersave" seem to work fine for me.

  • If that's a known thing (the need to set the GPU MHz), one wonders why it is not baked into Libreelec or at least in some sort of FAQ somewhere?

    It took me quite some effort to dig that up....

    Edited once, last by bossanova808 (July 28, 2019 at 8:23 AM).

  • Run this command in ssh:

    Code
    cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor

    If is says "powersave" - run this:

    Code
    echo performance > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor

    If this solves your issue you can make it permanent by adding it to /storage/.config/autostart.sh

    Added to autostart.sh and confirmed on performance now, it was on powersave.

    But still max 800Mhz and maxing it when Netflix is on.

    Also tried:


    (

    echo 750 > /sys/devices/pci0000:00/0000:00:02.0/drm/card0/gt_min_freq_mhz

    ) &

    nohup script.sh &


    I don't see any difference.

    But then that might not be the correct device for my nuc.

    Edited 2 times, last by SirMacke (July 28, 2019 at 9:25 AM).

  • That is the video clock of the GPU.

    Use

    Code
    cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq

    to see the current CPU core frequencies.

    cat: can't open '/sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq': No such file or directory


    Edit:

    Code
    LibreELEC:~ # lscpu | grep MHz
    
    CPU MHz:             799.149
    CPU max MHz:         1500.0000
    CPU min MHz:         800.0000

    But It never leaves 800, even when cores are at 100%

    Edited 2 times, last by SirMacke (July 28, 2019 at 1:48 PM).