|
【General】
Stock fan going full tilt on idle: software solution
Posted at 7/13/2022 02:06:38
View:1547
|
Replies:1
Print
Only Author
[Copy Link]
1#
If you are like me and your fan on ROC-3588S-PC goes full speed when the board is idle then in this thread you are going to find a way to fix it:
I have the v0.1 revision of the board, 3 pin fan header, fan and heatsink integrated together. OS - Ubuntu Minimal. When the board is powered up the fan doesn't spin, but as soon as the OS boots up the fan starts spinning full speed. This is not really what I want - below 50C there's no need to spin the fan at all, so I started digging, and this is what I have found:
There's a systemd service responsible for fan control:
- systemctl status firefly-fan.service
Copy the code
It clearly works not the way I want so I checked out the code of the service. For ROC-3588S-PC in the end it starts /usr/bin/firefly_fan_control which is a binary executable. And there's no manual for this firefly_fan_control.
I have quickly reverse engineered this thing and figured out a way to control this fan the way I want:
- echo 0 > /sys/class/hwmon/hwmon1/pwm1
Copy the code
This is how the fan speed is set for v0.1 board. 0 = full tilt, 255 = stop.
- cat /sys/class/thermal/thermal_zone*/temp
Copy the code
This is how the firefly_fan_control gets the temperature reading. You can take all thermal zones and average, or pick one of them, it's up to you.
Knowing all that you can get the fan curve that you like disabling firefly_fan.service and coding up your own fan control script that gets temperature and writes the desired fan speed as suggested above. I will put my script in the next post after I figure out good parameters for it.
Final thoughts:
A typical PWM fan goes full tilt when there's no PWM signal (for safety reasons I suppose). The fact that for board v0.1 the fan doesn't start spinning right after the board is powered suggests that on v0.1 the fan PWM control is not done as it's done usually. Probably in the board v1.0 with the 4 pin fan connector the fan control is implemented as it usually is and as a result we get an issue with the fan on 0.1 board, caused by software not being aware of the difference between 0.1 and 1.0 boards.
Suggestion to Firefly devs: maybe you add an if branch in firefly_fan_control for v0.1 board to fix this issue or make fan control a human readable script so that people without executable files parsing skill can play with the fan? I certainly know that a lot of people like to setup custom fan curves, they gonna love it.
However even if firefly does nothing about it people with 0.1 board can now fix this issue and everyone who wants a custom fan curve can do that. |
|