Code Monkey home page Code Monkey logo

Comments (3)

anderswodenker avatar anderswodenker commented on August 23, 2024

I`ve managed it, but no success. (Kernel 5.8.0)

from thinkpad_acpi.2ndfan.patch.

civic9 avatar civic9 commented on August 23, 2024

Hi,
What do you mean by no success?
Sorry, but I am not using Ubuntu. But if you know how to make/compile and install such kernel on Ubuntu I can try to help.
With kernels 5.8.x or newer it is not neccesary to use patch from this repo, instead:

  • you have to modify the file drivers/platform/x86/thinkpad_acpi.c
  • locate line like:
    TPACPI_Q_LNV3('N', '2', 'O', TPACPI_FAN_2CTL), /* P1 / X1 Extreme (2nd gen) */
  • add just one new line after that:
    TPACPI_Q_LNV3('N', '2', 'N', TPACPI_FAN_2CTL), /* P73 */
  • compile/make, install and reboot.
  • check how many fans are visible to the system:
    ls /sys/class/hwmon/*/fan*
    in my case I get:
    /sys/class/hwmon/hwmon6/fan1_input /sys/class/hwmon/hwmon6/fan2_input

from thinkpad_acpi.2ndfan.patch.

buttertoad avatar buttertoad commented on August 23, 2024

Hi anderswodenker,

I thought I would just leave the way I do it in case it's helpful. I have a P73 and I'm running Ubuntu 20.04.

  1. Create a build directory and build from there.
    mkdir build_thinkpad_acpi
    cd build_thinkpad_acpi

  2. Download the source files. (After 20.04 changed to the 5.8-hwe kernel it needs to be specified)
    apt source linux
    or
    apt source linux-hwe-5.8

  3. Change to the source directory you just downloaded. It will be the only directory in your build directory and it will be something like:
    cd linux-hwe-5.8-5.8.0

  4. Add the line in drivers/platform/x86/thinkpad_acpi.c like civic9 says.

    • Search for:
      TPACPI_Q_LNV3('N', '2', 'O', TPACPI_FAN_2CTL), /* P1 / X1 Extreme (2nd gen) */
    • Add after it:
      TPACPI_Q_LNV3('N', '2', 'N', TPACPI_FAN_2CTL), /* P73 */
  5. Find out the kernel version you're building for.
    uname -r

  6. Update Makefile with the correct version.
    vi Makefile
    Make these values match your output from uname -r. For instance, 5.8.0-41-generic would be:
    VERSION = 5
    PATCHLEVEL = 8
    SUBLEVEL = 0
    EXTRAVERSION = -41-generic

  7. Copy .config and Module.symvers to your source directory.
    cp /lib/modules/`uname -r`/build/.config . -v
    cp /lib/modules/`uname -r`/build/Module.symvers . -v

  8. Build the module.
    make -j<number of processor threads> modules prepare

  9. When it completes copy the module to the kernel's updates directory.
    sudo cp -f drivers/platform/x86/thinkpad_acpi.ko /usr/lib/modules/`uname -r`/updates

  10. Update your system's available modules, remove the old one, and start the new one.
    sudo depmod -a
    sudo rmmod thinkpad_acpi
    sudo modprobe thinkpad_acpi

  11. Make sure it worked by checking the output of dmesg.
    dmesg

As long as it reports information about your laptop and doesn't give an error you should be good to go.

from thinkpad_acpi.2ndfan.patch.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.