From 54dff997a178721e209b1ce922e37ed18f606d27 Mon Sep 17 00:00:00 2001 From: mwip Date: Mon, 4 Jan 2021 22:41:04 +0100 Subject: [PATCH] Extend section for guides/sensors.md/fancontrol Previous documenation about fancontrol was missing detailed information about how to use fancontrol to set up the temperature / fanspeed curves with fancontrol. See discussion here: https://github.com/hardkernel/linux/issues/408 This patch aims at providing more information to the new user who has not much experience with fancontrol. Also a sample config with accompanying information about its "real world implications" is provided. --- guides/sensors.md | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/guides/sensors.md b/guides/sensors.md index 9bb8472..5379731 100644 --- a/guides/sensors.md +++ b/guides/sensors.md @@ -1,7 +1,7 @@ # Sensors ## Background -In order to read the sensors on your board, new package **lm-sensors** must be installed. +In order to read the sensors on your board, the package **lm-sensors** must be installed. ```bash $ sudo apt update @@ -9,7 +9,7 @@ $ sudo apt install lm-sensors ``` ## Read sensors -After installing the package 'lm-sensros', the sensors of your ODROID can be read with the command 'sensors'. This command will show the current temperatures provided by CPU itself. The fan speed also can be provided when cooling fan is attached only when it provides TACH signals. +After installing the package 'lm-sensros', the sensors of your ODROID can be read with the command `sensors`. This command will show the current temperatures provided by CPU itself. The fan speed also can be provided when cooling fan is attached only when it provides TACH signals. ```bash $ sensors @@ -58,3 +58,41 @@ $ echo 0 | sudo tee /sys/class/hwmon/hwmon0/pwm1_enable $ sudo apt update $ sudo apt install fancontrol ``` + +To make sure fancontrol is started at system startup enable the service. + +```bash +$ sudo systemctl enable fancontrol +``` + +Fancontrol can be configured using pwmconfig. It provides a guided questionaire for tuning the fan speed. The configuration should be saved to `/etc/fancontrol` +```bash +$ sudo pwmconfig +``` + +Once the configuration has been saved, restart the fancontrol service to apply changes. + +```bash +$ sudo systemctl restart fancontrol +``` + + +### Sample config for ODROID-HC4 fan + +The following fancontrol configuration was created for an ODROID-HC4 (`/etc/fancontrol`) + +``` +# !!!USE AT YOUR OWN RISK!!! Configuration file generated by pwmconfig +INTERVAL=10 +DEVPATH=hwmon0=devices/virtual/thermal/thermal_zone0 hwmon2=devices/platform/pwm-fan +DEVNAME=hwmon0=cpu_thermal hwmon2=pwmfan +FCTEMPS= hwmon2/pwm1=hwmon0/temp1_input +FCFANS= hwmon2/pwm1=hwmon2/fan1_input +MINTEMP= hwmon2/pwm1=35 +MAXTEMP= hwmon2/pwm1=70 +MINSTART= hwmon2/pwm1=10 +MINSTOP= hwmon2/pwm1=10 +MINPWM= hwmon2/pwm1=10 +``` + +With an ambiant temperature of 22 °C these settings keep the max temp at ~53.8 °C during `sysbench cpu run --cpu-max-prime=100000000 --threads=4` which ran for 397 seconds, thus ensuring saturation. During the run the fan spins up to ~2800 RPM producing a slightly noticable but not in any way annoying hum. When idle (serving an instance of NextcloudPi to ~5 users, mdadm software RAID 1, 2 Seagate Ironwolf HDDs) the CPU temperature hovered around 47 °C with the fan inaudible at ~1600 RPM. *All temperatures and RPM measurements were acquired with lm-sensors*