Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation Guide for Ubuntu? #9

Open
anderswodenker opened this issue Jan 8, 2021 · 3 comments
Open

Installation Guide for Ubuntu? #9

anderswodenker opened this issue Jan 8, 2021 · 3 comments

Comments

@anderswodenker
Copy link

Hey,

first: I appreciate your work and want to donate!(?)

But I have trouble to install this on Ubuntu 20.x . Is there any chance for a step by step Guide? I'm not this much into Linux kernels and this Fans on my 3,4k Lenovo (P73) is annoying me.... I simply dont know how to patch this kernel.

thank you very much!

@anderswodenker
Copy link
Author

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

@civic9
Copy link
Owner

civic9 commented Jan 14, 2021

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

@buttertoad
Copy link

buttertoad commented Jan 31, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants