I have a ASUS TP301UJ laptop with dual-boot and my fan is quite loud all the time. I am trying to configure my fan speed in Ubuntu (I did it easily in Windows 10), but I am having problems.
Here is what I did:
I installed lm-sensors, psensor and fancontrol. psensor worked well, and read the fan speed and all temperatures.
Ran
sudo sensors-detect
which only said that I needed to add coretemp to/etc/modules
. coretemp was already in modules so I did not do anything.Rebooted. Ran
sudo pwmconfig
and it output:Found the following devices:
hwmon0 is acpitz
hwmon1 is coretemp
hwmon2 is asusFound the following PWM controls:
hwmon2/pwm1 current value: 0hwmon2/pwm1 is currently setup for automatic speed control.
In general, automatic mode is preferred over manual mode, as it is more efficient and it reacts faster. Are you sure that you want to setup this output for manual control? (n)Entered "y" and the output was:
Giving the fans some time to reach full speed...
Found the following fan sensors:
hwmon2/fan1_input current speed: 0 ... skipping!
There are no working fan sensors, all readings are 0.Make sure you have a 3-wire fan connected.
You may also need to increase the fan divisors.
See doc/fan-divisors for more information.
So my fan enters "manual mode" and starts running at full speed but pwmconfig
exits, leaving my fan running at full speed. Changing the number in /sys/class/hwmon/hwmon2/pwm1_enable
from 1 back to 2, makes it automatic again.
Here is my problem (I think): When my fan is in "manual mode", sensors
shows -1
as its speed. It is not detected! But in automatic mode, there is no problem at all. This makes it impossible for me to configure the fan with pwmconfig
.
I have already tried adding acpi_enforce_resources=lax
to the variable GRUB_CMDLINE_LINUX_DEFAULT
in the grub file. The result is the same.
What should I do?
Start out by
man fancontrol
to get a feel for what variables can be used in/etc/fancontrol
. You will need the following when building the config: INTERVAL, FCTEMPS, FCFANS, MINTEMP, MAXTEMP, MINSTART, MINSTOP.Actual Sample:
The [[:print:]] represent the hwmon number. You can use the actual number or the [[:print:]], sometimes the number changes between boots and the [[:print:]] allows it to find the correct hwmon number.
The issue will be FCFANS, whether fan1_input has valid data, and if not, whether fancontrol will continue to work without that.
Alternatively, you could attempt to write your own script that would set the value of hwmon2/pwm1, it ranges between 0 and 255.
The nct6775 has the possibility to control the fan in hardware. It allows for setting a certain temp source as input and then control fans in steps based on the temperature. So no script needed other than to load the settings of the chip. The fancontrol tool from above has the disadvantage that when it is stuck, has an error or bug it might not function.
In the /sys/devices/platform/nct6775.656/hwmon/hwmonX directory.
X below is the FAN. Some settings might already be set by the bios.
pwmX_mode sets the fan mode. 0 is PWM, 1 Voltage controlled. You can set it. But reading always gives 1.
pwmX_temp_sel is which temp sensor feeds this fan.
echo 5 > to the pwmX_enable sets the fan in smart mode. This means the hardware (the nct6775 chip) is controlling the fan.
The pwmX_auto_point1_pwm to pwmX_auto_point5_pwm set the fan speed steps. Values from 0 to 255. My fans start spinning around 85. So I have 85 90 100 140 255 as steps.
The corresponding temps are set in the pwmX_auto_point(1-5)_temp. Values in celcius.