Fan running at full speed despite manual intervention


The fan supplied with Ten64 is running at full speed. I am unable to change its speed.

root@OpenWrt:~# ls /sys/devices/platform/soc/2000000.i2c/i2c-0/0-002f/hwmon/
root@OpenWrt:~# cat /sys/class/hwmon/hwmon2/fan1_input
root@OpenWrt:~# echo 3500 > /sys/class/hwmon/hwmon2/fan1_target

# my ears do not notice any change, and after few minutes still:
root@OpenWrt:~# cat /sys/class/hwmon/hwmon2/fan1_input

Temperature does not seem to be high

root@OpenWrt:~# cat /sys/class/hwmon/hwmon1/temp*

Version of OpenWrt:

root@OpenWrt:~# uname -a
Linux OpenWrt 5.4.61 #0 SMP PREEMPT Mon Dec 21 00:08:33 2020 aarch64 GNU/Linux
root@OpenWrt:~# cat /etc/banner
  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 OpenWrt SNAPSHOT, r0-6efa060

Modules loaded:

root@OpenWrt:~# lsmod | grep emc
emc17xx                16384  0
emc181x                16384  0
emc2301                16384  0
hwmon                  20480  5 ath10k_core,pac1934,emc2301,emc181x,emc17xx

However dmesg shows less information than the documentation page (Fan Control - Traverse Ten64 Documentation)

root@OpenWrt:~# dmesg | grep emc
[   15.103966] emc2301 0-002f: EMC2301 detected

Any suggestions?

The OpenWrt version on the NAND (with kernel 5.4) has an older version of the fan driver which does not enable fan speed control without external intervention.

The two solutions at the moment are:

  1. Install OpenWrt on a block device (SSD/USB/etc.) which will use the 5.10x kernel.
    You should notice the fan will spin down to a lower speed once the fan driver is loaded on bootup.
    (The fan speed will be governed by the Linux thermal subsystem to ensure you don’t cook your CPU)

  2. Enable PWM manually in U-Boot before booting
    The command to do this in U-Boot is:

=> fan enable_pwm emc2301@2f 0 1
enable_pwm argc: 5
Found controller emc2301@2f

Updating the NAND OpenWrt to the 5.10 kernel is on the TODO list, it’s lagging behind at the moment as 5.10 involved a “new” hardware target.

Option 2 works. Thanks!