vmatare / thinkfan

The minimalist fan control program
GNU General Public License v3.0
552 stars 62 forks source link

thinkpad_acpi module doesn't load at boot #67

Closed zjeffer closed 5 years ago

zjeffer commented 5 years ago

I added thinkpad_acpi fan_control=1 to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub. I also added options thinkpad_acpi fan_control=1 to /etc/modprobe.d/thinkfan.conf, just to be sure.

Neither of these load the required module. I have to manually do sudo modprobe thinkpad_acpi to load the module.

Because it doesn't load at boot, thinkfan.service crashes, saying it can't find the /proc/acpi/ibm/fan, because the ibm directory doesn't exist if the module doesn't load.

EDIT: this is my /etc/thinkfan.conf:

######################################################################
# thinkfan 0.7 example config file
# ================================
#
# ATTENTION: There is only very basic sanity checking on the configuration.
# That means you can set your temperature limits as insane as you like. You
# can do anything stupid, e.g. turn off your fan when your CPU reaches 70°C.
#
# That's why this program is called THINKfan: You gotta think for yourself.
#
######################################################################
#
# IBM/Lenovo Thinkpads (thinkpad_acpi, /proc/acpi/ibm)
# ====================================================
#
# IMPORTANT:
#
# To keep your HD from overheating, you have to specify a correction value for
# the sensor that has the HD's temperature. You need to do this because
# thinkfan uses only the highest temperature it can find in the system, and
# that'll most likely never be your HD, as most HDs are already out of spec
# when they reach 55 °C.
# Correction values are applied from left to right in the same order as the
# temperatures are read from the file.
#
# For example:
# tp_thermal /proc/acpi/ibm/thermal (0, 0, 10)
# will add a fixed value of 10 °C the 3rd value read from that file. Check out
# http://www.thinkwiki.org/wiki/Thermal_Sensors to find out how much you may
# want to add to certain temperatures.

#  Syntax:
#  (LEVEL, LOW, HIGH)
#  LEVEL is the fan level to use (0-7 with thinkpad_acpi)
#  LOW is the temperature at which to step down to the previous level
#  HIGH is the temperature at which to step up to the next level
#  All numbers are integers.
#

# I use this on my T61p:
# tp_fan /proc/acpi/ibm/fan
# tp_thermal /proc/acpi/ibm/thermal (0, 10, 15, 2, 10, 5, 0, 3, 0, 3)

hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp2_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp3_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp4_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp5_input
hwmon /sys/devices/virtual/thermal/thermal_zone1/temp

(0, 0, 51)
(1, 50, 52)
(2, 51, 55)
(3, 54, 58)
(4, 56, 63)
(5, 60, 70)
(6, 66, 79)
(7, 74, 92)
(127, 85, 32767) 

How do I load the module at boot?

zjeffer commented 5 years ago

Adding a file called thinkpad.conf to /etc/modules-load.d/ with the line thinkpad_acpi fixed it. I don't know why the other things I tried don't make it load the module at boot.

vmatare commented 5 years ago

Well, the other two things you did are actually equivalent and they both only set the parameter on the thinkpad_acpi module, but they do nothing to load it. Loading is precisely what /etc/modules-load.d/ is for, just as the name suggests. That's the way it is designed in every modern Linux distribution.