The FAN_EN transistor is connected to GPIO3_A0/MAC_TXD2/SPI4_RXD_d.
It’s not a hardware PWM pin, so no hardware speed control.
Workarounds:
Software PWM.
Do it from the kernel, expose it as software pwm so a real fancontrol program can pick it up.
Won’t be too heavy – we can lower the frequency to 50Hz or even 10Hz.
Technically, the current fan control script is a 85.7% PWM at 0.028Hz
Use the 40pin GPIO connector to loopback a real PWM pin to pull the leveler.
Use the GPIO connector from the keyboard to loopback a real PWM pin. Stupidly amusing.
#!/bin/bash
cd /sys/class/pwm/pwmchip0
echo 0 > export
cd pwm0
# 50_000_000ns, 50ms period
echo 50000000 > period
# enable it...
echo 1 > enable
# ramp it...
for i in {20000000,30000000,35000000,40000000,42000000,44000000,46000000,47000000,48000000,49000000,50000000}
do
echo $i
echo $i > duty_cycle
read a
done
Yet pwmconfig doesn’t detect it Once we figure it out we can have fancontrol taking over (maybe more advanced fan control? the last steps in the ramps are rather exponential).
PWM-enabled fan control daemon:
Weekend project done in the first night
Strangely satisfying.
To help people looking for the same problem, on my (new) A06 the script is located at /usr/local/bin/temp_fan_daemon_a06.py, the default MAX_TEMP was set to 66000 (which I guess means 66°C), but rather crucially, the systemd service is called differently - clockworkpi-a06-fan-daemon, but it has been disabled by default.
To check the status, use the command systemctl status clockworkpi-a06-fan-daemon, if it says disabled or killed, do systemctl enable clockworkpi-a06-fan-daemon & systemctl restart clockworkpi-a06-fan-daemon.
BTW you can use the command sensors to quickly check the temperatures (apt install lm-sensors).
aaand… there are two of these scripts. They seem to do approximately the same thing (at least regarding the fan), with some differences in which cores are switched on.
One is indeed at /usr/local/bin/temp_fan_daemon_a06.py, in the .deb package devterm-fan-daemon-cpi-a06. , and you control it with systemctl status devterm-fan-temp-daemon-a06. This one has MAX_TEMP=66000
The other is at /usr/share/clockworkpi-a06-fan-daemon/bin/temp_fan_daemon_a06.py, in the armbian-bsp-cli-clockworkpi-a06 package, and you control it with systemctl status clockworkpi-a06-fan-daemon. This one has MAX_TEMP=55000, with a comment saying “Replace fan-on temperature w/ 55C, rather than 70C which doesn’t seem to be enough to avoid overheating”