TODO: this guide is not finished.
Control (lower) fanspeeds on Ubuntu PC.
On Ubuntu/Debian (Proxmox) this can be achieved by installing the lm-sensors
package to read the CPU temperature data and fancontrol
to control the fan speeds.
Open a shellsession session to the server and login.
Install the lm-sensors
and fancontrol
packages.
sudo apt update && sudo apt install lm-sensors fancontrol
Configure lm-sensors as follows:
sudo sensors-detect
Answer YES (y
) to all YES/no questions. Be careful if you have a different mainboard. I read that it might give problems if non-existing sensors are being read.
At the end of sensors-detect, a list of modules that need to be loaded will be displayed. Type yes
or y
to have sensors-detect insert those modules into /etc/modules.
Load the added modules. This will read the changes you made to /etc/modules in the previous step, and insert the new modules into the kernel.
sudo service kmod start
Now configure fancontrol.
sudo pwmconfig
This script will stop each fan for a few seconds to find out which fans can be controlled by which PWM handle. For me only one channel was found as the case fans do not use PWM.
If you get an error
/usr/sbin/pwmconfig: There are no pwm-capable sensor modules installed
, first try to reboot your machine. If that doesn't work, addnct6775
to/etc/modules
.
You will have to specify what sensors to use to link the fanspeed to temperature changes. For the CPU fan make sure to use a sensor that measures your core CPU temperature to base the fan speed on.
This is a bit tricky as the sensor is named differently in fancontrol and lm-sensors. I ran sensors
in another shellsession to help me find the right sensor. In my case the CPU temperature sensor coretemp-isa-0000
was named at hwmon1
in fancontrol, so I took hwmon1/temp1_input
to correlate the fanspeed to the temperature.
Now run through the prompts and save the changes to the default location. Optionally you can make adjustments to fine-tune /etc/fancontrol
, but I took all the default values. Apply your changes by restarting the fancontrol service.
sudo systemctl restart fancontrol
To make the fancontrol service run automatically at system startup run:
sudo systemctl start fancontrol
Sources:
https://manpages.debian.org/stretch/fancontrol/fancontrol.8.en.html
https://manpages.debian.org/stretch/lm-sensors/sensors.1.en.html
https://iandw.net/2014/10/12/fancontrol-under-ubuntu-14-04-resolving-usrsbinpwmconfig-there-are-no-pwm-capable-sensor-modules-installed/
https://askubuntu.com/questions/22108/how-to-control-fan-speed/46135#46135
https://stackoverflow.com/questions/49377334/usr-sbin-pwmconfig-there-are-no-pwm-capable-sensor-modules-installed-msi-ubun
https://mypkb.wordpress.com/2015/09/19/linux-mint-17-2-on-asus-z87-pro-retrieving-fan-information/