Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stayed on max even though temp dropped to 31'c #1

Open
StuartIanNaylor opened this issue Nov 5, 2022 · 5 comments
Open

stayed on max even though temp dropped to 31'c #1

StuartIanNaylor opened this issue Nov 5, 2022 · 5 comments

Comments

@StuartIanNaylor
Copy link

StuartIanNaylor commented Nov 5, 2022

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.

#!/bin/bash
stress-ng -c 8 --vm 8 --vm-bytes 512M&
echo start > temp.txt
while true
do
	echo $(cat /sys/class/thermal/thermal_zone*/temp)
	echo $(cat /sys/class/thermal/thermal_zone*/temp) >> temp.txt
	echo $(date +"%T")
	echo $(date +"%T") >> temp.txt
	sleep 20
done

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.

@pymumu
Copy link
Owner

pymumu commented Nov 5, 2022

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

@StuartIanNaylor
Copy link
Author

Prob that and I switched off before 180s :)

Thnx

@StuartIanNaylor
Copy link
Author

@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.

@pymumu
Copy link
Owner

pymumu commented Nov 6, 2022

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:
image

@StuartIanNaylor
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants