Adding old intel cpu patch to kernel

  • Hello All. First post.

    I am running 9.2, compiled with support for older intel graphics on a decommissioned hp desktop. I recently did a cpu upgrade and now require to implement this patch for it to work properly.

    intel_idle: Support C-states for Intel Core 2 family 6, model 23 CPUs.

    I followed the general instructions in this thread but when I run the command

    Code
    PROJECT=Generic ARCH=x86_64 ./scripts/build linux

    I end up with

    Code
       APPLY PATCH (project)      projects/Generic/patches/linux/intel-idle.patch
    patching file drivers/idle/intel_idle.c
    Hunk #1 succeeded at 54 (offset -12 lines).
    Hunk #2 succeeded at 112 (offset -12 lines).
    Hunk #3 succeeded at 1016 (offset -10 lines).
    Hunk #4 FAILED at 1120.
    1 out of 4 hunks FAILED -- saving rejects to file drivers/idle/intel_idle.c.rej

    Any pointers as to what is going wrong? I have edited the patch to match the INTEL CPU format in the existing intel_idle.c but I still run into the same error. The CPU runs at max and fans at 100% until I can figure this out.

    Edited 2 times, last by The_Thinkerer (June 5, 2021 at 9:08 PM).

  • Update: It turned out to be some errant whitespace. Once removed, I was able to patch the kernel and have the processor supported better.

    Initially, I got this message

    intel_idle: does not run on family 6 model 23

    That has now changed to,

    intel_idle: Please enable MWAIT in BIOS SETUP

    The HP BIOS is very limited and does not expose such an option in the setup.

    Code
    LibreELEC:~ #  cat /sys/devices/system/cpu/cpuidle/current_driver
    none

    No driver is reported active, as was the case before applying the patch, however, the processor now appears to be running at 80%, as opposed to max.

    Is there a way to activate acpi_idle instead?

    Update: A microcode update, combined with adding

    Code
    intel_idle.max_cstate=2

    to my boot configuration, sorted out my specific issue

    Edited once, last by The_Thinkerer: Update (June 11, 2021 at 5:15 PM).