Skip to content

Commit

Permalink
Extend section for guides/sensors.md/fancontrol
Browse files Browse the repository at this point in the history
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:
hardkernel/linux#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.
  • Loading branch information
mwip committed Jan 4, 2021
1 parent 4fc86ee commit 54dff99
Showing 1 changed file with 40 additions and 2 deletions.
42 changes: 40 additions & 2 deletions guides/sensors.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# 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
$ 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
Expand Down Expand Up @@ -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*

0 comments on commit 54dff99

Please sign in to comment.