Fan control for Linux


You wanna build your own case? It will cost you a loooot I think :blush:

We have cooling fan for VIM2, but just cannot mount rightly inside the current arcylic case, and if you still want one just PM to me. :wink:


@Gouwa I was thinking of doing one as a hobby project :wink: nothing special (still thinking what material would be better, wood or acrylic or something else).



The fan for the VIM2 is well suited to the housing cover, which comes complete with fan for VIM1. Almost everything fits need screws to screw in with little effort in the fan casing. The holes in the fan casing VIM2 slightly less than the diameter of the screws from the VIM1. Iโ€™ve in the photo is just such an option. Cover and screws from VIM1, fan for VIM2 . I also increased the height of the cover with the fan above the Board. For this I changed the distribution of plates from the housing (moved one from the bottom to the top) and added on top of the nuts from the kit that had sent from Khadas to my for VIM1. By the way, it is possible to set the radiator size 22ั…22ั…10. :slight_smile:


Yep, I saw the photoes you posted, just thought that itโ€™s great for DIY or makers, but seems not as friendly enought for many other users, thatโ€™s the reason why we havenโ€™t launched cooling fan for VIM2 (but seem that many users need it)

Yep, but it means that we have to designed a new one and the supplier will request a large quantity order from us first.

Actually we research many different fans with different dimension, but no luck for both tiny dimension and thin thickness. :frowning_face:


I think it is possible to produce several different kit options for cooling the VIM2.

  1. The standard that is being developed Khadas.

  2. Universal-1. Which can enter. Pay attention, the fan is located on top of the cover (not inside the case).

a. Standard top cover with additional opening (40 mm) and 4 additional holes for fastening screws of the fan.

b. Fan, such as the link (his current consumption allows you to connect a standard fan connector to the VIM2).

I have VIM1 works almost the same fan but slightly less (35*35), but his passport a current of 0.2 when connected to the contacts โ€œ3.3 Vโ€ works without noise and with enough performance to turn on and off automatically when you turn on and off the VIM1.

c. Adapter, for connection to the connector on the Board VIM2 and connect the fan connector.
Alternatively, use the same as included for VIM1 , but with a mate for the connector on the Board VIM2. By the way, it is very desirable to produce a set of adapters to connect the three main connectors that are used for fans.

d. Heatsink with thermal pad. For example.





When you connect the fan to terminals โ€œ3.3 Vโ€ on 40-pin connector, the fan and the radiator, can be used on any model of VIM1 and VIM2 (in regular equipment). Enough to drill a hole in the top cover for the fan. The fan can be mounted without screws using a few drops of glue instead of screws.


Script for fan control on Linux (3.14 and 4.9).

External power for VIM2 & Fan port

The firmware for the VIM2 with Ubuntu (kernel 4.9), I have trigger values 73 and 74. As it should be ?


The PIN number is 73 and 74 on 4.9.26 kernel
The PIN number is 74 and 75 on 4.9.40 kernel
I think it need to fix up. The same PIN number is necessary on different kernel version.


Updated the script fan control. Default enabled auto control the temperature. Temperature parameters can be edited (this is the first variable in the script). For the startup script at system start, add in โ€œ/etc/rs.localโ€ line to invoke it in the background โ€œ/boot/ &โ€

The script automatically tries to determine the kernel version and uses the appropriate variables. The script when run performs automatic testing of the fan in all modes.


Hello, The script is working well.
I setโ€ฆ
I set the TIMER_SEC=45.
So fan turns on MAX at 57c, fan will run for 45 seconds, if temp falls under 57c in this time, fan shuts off.

The idea was to turn fan on at the temperature threshold, but delay turning it off until the temp falls several degrees. This keeps the fan from turning on and off a lot.

Would it be possible to have the fan, once on, stay on until temperatures fall 6-7c below turn-on threshold?

Thanks balbes150. As usual, great work.:+1:


Adding hysteresis (temperature difference switch on / off) is planned in future versions.