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.