Open StuartIanNaylor opened 1 year ago
When below the required temperature, the fan still spins for a certain amount of time to assist in cooling. https://github.com/pymumu/fan-control-rock5b/blob/main/src/fan-control.c#L50-L56 The longest time is 180s
Prob that and I switched off before 180s :)
Thnx
@pymumu There is something a bit weird about the pwm control and not your software. Or at least there is with the fan I have got.
echo 5000 > /sys/devices/platform/fd8b0010.pwm/pwm/pwmchip1/pwm0/duty_cycle gives nothing (50%) needs approx echo 5500 > /sys/devices/platform/fd8b0010.pwm/pwm/pwmchip1/pwm0/duty_cycle (55%)
But also echo 7500 > /sys/devices/platform/fd8b0010.pwm/pwm/pwmchip1/pwm0/duty_cycle (75% but over time you can hear the fan speed change)
I have no idea part from wtf as pwm can definitely control a fan at less than 50% mark-space even 10% Its almost like its linear control but something more is wrong than that as even linear would not wobble the speed as it does. I can tell from your software where 50% is the 1st minimum which is an odd choice you where likely as easily confused.
There is a minimum current requirement for fan spin. the pwm value of my fan is 5500, it stops when it is lower than 5500. You can adjust the initial value according to the requirements of your fan.
Picture of my fan:
Nope I am same as the vcc5v_sys doesn't seem to be able to suplly the current if I run stress-ng I can hear the fan slow down and when ends it speeds back up with no control change. I just have an aliexpress 5v 0.20a fan and it acts exactly as yours as approx below 5500 it stalls. But its sort of weird as after some play I understand more now and you are running @ 100Khz which guess is ok but 25Khz for fans is more normal but at 25Khz its even worse and know why you upped it to 100Khz. I think your software works perfectly but beginning to doubt the hardware implementation that might need a revision for the fan.
Not sure what happened but for some reason stayed on max even though temp dropped to 31'c
Didn't do any checks but had a rough script running.
When I hot ctrl+c to escape the script the fan was already fast at 50c but heard up go up another notch and there it stuck even though temps where back down to 31c
PS the cpu freq buffs to get 2400000Mhz have turned this exceptionally cool SoC into a bit of a hot one.