nsamakers.blogg.se

Fancontrol
Fancontrol






fancontrol

I've attached the cpp source and a binary built for x86_64 running DSM 6.2 using Synology's build environment (ds.圆4-6.2). I suspect this will also work on similar Terramaster NASes that use the same chip for fan control but I have only tested on the F4-220 since that's what I own. fancontrol 0 37 150 10 50 80 0 0 0 0 (use PWM value 150 initially and disable PID by setting all coefficients to 0, this would be like hard-coding the PWM to 150 forever)Īnyway, I hope other Terramaster users find this useful. fancontrol 0 37 255 (use the maximum PWM value initially before entering the PID loop) fancontrol 1 40 (enable debug logging, setpoint = 40) fancontrol -h to see how to use the script.

fancontrol

My argument parsing is really simple, you can use. I chose this after looking at various suggestions online, it seems 30-40 C is the safest range to maintain for average temps in terms of drive failure rate, so 37 C should give some buffer in case of sudden spikes in utilization that PID doesn't react to quickly enough. By default the script uses a setpoint of 37 C but again this can be overridden. With defaults I find it settles to reasonable values in about 30 minutes.

fancontrol

I just modified the script to make all of these things overridable in case someone wants to play around with it further without having to recompile. Read the max hard drive temperature and use a PID loop to calculate a new PWM value to drive the max hard drive temperature to some setpointĪfter playing with the PID values for a few days I concluded that just using a P value was sufficient to give decent behavior so I just left kp = 1, ki = kd = 0. I'm guessing it wouldn't be hard to also drive the LEDs to the right colors as well but I haven't spent time on that since I never look at the LEDs anyway. I'm sharing it here so others can take advantage of it. I noticed that there is already a kernel driver for this chip, but since I only needed very limited capabilities (just the ability to write the fan PWMs) I decided to just write a custom script to do this. So I discovered the hardware contains an IT8772E chip for which Google helpfully brings up this datasheet: I had read elsewhere there is some BIOS option to drive the fans faster, but lacking the VGA dongle to get into the BIOS I figured I'd investigate how to control them from Linux. I noticed the hard drives were consistently operating at a very high temperature (50+ C while idle) so I decided to investigate how to control the fans. I recently installed Xpenology on a Terramaster F4-220 I picked up during the holiday sales that were going on.








Fancontrol