[BPI-R4] CPU fan setup

I got my R4 and installed OWRT last snapshot. Unfortunalely I can’t set up the fan to start at a certain temperature. I got it working with my R3 and last OWRT stable by setting the threshold temperature:

echo xxxxx > /sys/class/thermal/thermal_zone0/trip_point_2_temp

For R3 the trip_point_2_temp is representing the threshold where the fan is switched on.

I see that in R4 is all same:

  • thermal_zone0 is the CPU-FAN I can read the temp by:
cat /sys/class/thermal/thermal_zone0/temp

Unfortunately the trip_point_2_temp is not working. The fan is starting at the boot and cannot be stopped by any command

Any Idea? Is may be missing any package to be loaded?

Sergio

Imho pwm is not yet supported by our current codebase.

Hi Frank thanks for the answer. Do you think a temp of around 48° using only a passive heat sink would be ok? What is the working temp range for the CPU?

Imho it is ok…70°C would be bad,but not critical

i defined 105°C for thermal shutdown trigger as from datasheet it was afair 120 as critical.

I’m using a 50x61x13.8 heatsink (GPU/VGA type heatsink) with a 5v 4000 rpm fan, no PWM support, but it’s quiet (not silent). Not more than 40db, aka quiet library. Needed to trim just a couple edges off to keep it from touching any other board components.

Attached with some thermal tape (0.5mm on the cpu, 1mm on the emmc and ram).

root@bpi-r4:~# sensors; stress -c 4 -t 120; sensors; echo "sleeping 30 sec"; sleep 30; sensors
cpu_thermal-virtual-0
Adapter: Virtual device
temp1:        +34.7 C  

nvme-pci-20100
Adapter: PCI adapter
Composite:    +34.9 C  (low  =  -0.1 C, high = +86.8 C)
                       (crit = +89.8 C)
Sensor 1:     +34.9 C  (low  = -273.1 C, high = +65261.8 C)

stress: info: [20539] dispatching hogs: 4 cpu, 0 io, 0 vm, 0 hdd
stress: info: [20539] successful run completed in 120s
cpu_thermal-virtual-0
Adapter: Virtual device
temp1:        +40.8 C  

nvme-pci-20100
Adapter: PCI adapter
Composite:    +35.9 C  (low  =  -0.1 C, high = +86.8 C)
                       (crit = +89.8 C)
Sensor 1:     +35.9 C  (low  = -273.1 C, high = +65261.8 C)

sleeping 30 sec

cpu_thermal-virtual-0
Adapter: Virtual device
temp1:        +36.1 C  

nvme-pci-20100
Adapter: PCI adapter
Composite:    +35.9 C  (low  =  -0.1 C, high = +86.8 C)
                       (crit = +89.8 C)
Sensor 1:     +35.9 C  (low  = -273.1 C, high = +65261.8 C)

root@bpi-r4:~# 

Ambient room temp of 25C at the moment.

120mm bequiet silentwing @5v, cools not only cpu but also SFP and all components, absolutely silent :slight_smile: Looks just a bit… nerdy :slight_smile:

what is “stress”? is this some binary or a shell script?

edit: found it in opkg, will update my output when its done

the output after stress:

cpu_thermal-virtual-0
Adapter: Virtual device
temp1:        +45.0°C  (crit = +125.0°C)

sfp1-isa-0000
Adapter: ISA adapter
VCC:           3.32 V  (crit min =  +3.00 V, min =  +3.10 V)
                       (max =  +3.50 V, crit max =  +3.60 V)
temperature:  +29.5°C  (low  = -35.0°C, high = +85.0°C)
                       (crit low = -40.0°C, crit = +95.0°C)
TX_power:    280.00 uW (max = 501.00 uW, min = 126.00 uW)
                       (lcrit = 100.00 uW, crit = 631.00 uW)
RX_power:     27.00 uW (max = 501.00 uW, min =   5.00 uW)
                       (lcrit =   3.00 uW, crit = 794.00 uW)
bias:         11.00 mA (crit min =  +0.00 A, min =  +0.00 A)
                       (max =  +0.06 A, crit max =  +0.07 A)

mt7615_phy0-pci-10100
Adapter: PCI adapter
temp1:        +45.0°C  

sleeping 30 sec

started with 41°C, so guess thats perfectly fine

lol, there’s “nerdy” and then there’s “overkill”. :slight_smile:

I do like the bequiet fans, they have a 80mm one that would probably be better for you. Lower current draw and would fit the board better. You can technically drive them at 5v also, it just reduces their static pressure and some airflow (due to reduced RPM), but since you’re not using an enclosure and have several times the airflow needed already, that’s not going to be an issue.

Very interesting solution: how do you place the fan on bpi-r4?

it has a grill which protects the blades and the r4. its just laying on it, not fixated or so

Can, I ask a question?

1 Like

<sarcasm on>No, you are only allowed to give answers<sarcasm off>

I saw this fix ported in snapshots some days ago: mediatek: fix version tag in thermal patches mediatek: fix version tag in thermal patches Some backported thermal patches ended up with the wrong… …“mediatek: backport a hell of thermal commits”) Is this having impact on the fan management?

Any way to force the fan to just turn on via sysfs without setting a threshold? I just got this fan from AliExpress:

https://www.aliexpress.us/item/1005006544838058.html

As a passive heatsink it seems to be doing “meh” (sensors reports ~47°C when idle, ~52°C when running stress on all four cores) but I’d like to see how it performs when the fan is actually on (LOL).

For reference, here’s what it looks like attached and plugged in:

BTW: If you’re curious about that open-top case: That’s a parametric OpenSCAD 3D-printable case I’m working on. I’ll post it here (and Github) when it’s done (still haven’t coded the front plate yet). When it’s done you’ll be able to specify how much space you want above/below the board, whether and where you want antenna holes, whether or not to include various mounting options, etc. Neat feature: I made it so you can feel/press the WPS and Reset buttons via little flexure tabs/buttons (no need to get a needle hehe) :+1:

2 Likes

My fan is always on and cannot shitch off. I have to disconnect the fan connector to switch it off. Which owrt version are you running?

Which fan do you use?

This one: https://it.aliexpress.com/item/32370780805.html?spm=a2g0o.detail.pcDetailTopMoreOtherSeller.2.1b3e6G4k6G4ksZ&gps-id=pcDetailTopMoreOtherSeller&scm=1007.40000.327270.0&scm_id=1007.40000.327270.0&scm-url=1007.40000.327270.0&pvid=5c8ab15b-8b95-48e1-994d-fd1a4147a29e&_t=gps-id:pcDetailTopMoreOtherSeller,scm-url:1007.40000.327270.0,pvid:5c8ab15b-8b95-48e1-994d-fd1a4147a29e,tpp_buckets:668%232846%238111%231996&pdp_npi=4%40dis!EUR!3.51!3.51!!!3.72!3.72!%402103868a17097614075032407eb95c!12000036715510357!rec!IT!2070446172!&utparam-url=scene%3ApcDetailTopMoreOtherSeller|query_from%3A)

I’m using the same heatsink with this fan and I can’t get the fan to spin. Please let me know if you find a solution.

Strange. Are ou sure you connected the rigth pins? starting from the heatsink red,black and yellow(the farest from the heatsink? I would love to find a solution, but at the moment there is not. I build yesterday the snapshot, and the thermal patches did not have any impact on this issue. Let’s wait and see.

I’m not sure daniel have already tested pwm and the fan socket…maybe there is additional work needed as we focus currently on network parts (ethernet/wifi).

Basicly for fan control you need thermal patches (lvts with infracfg-reset as depency) for reading temparature,then pwm for controlling the fan and finally the definition of cooling maps to bring both together.

I don’t think we’ll get the fan working until PWM support is added to OpenWRT (for this hardware).

For reference, I was able to get my heatsink fan spinning by manually pressing some 3.3V (would’ve used 5V but 3.3V was handy :person_shrugging:) jumper wires to the positive (red) and negative (black) pins on the connector. Though it seemed to be spinning the wrong way (sucking air in from above as opposed to blowing it up and out). At least I can confirm that the fan does work :+1:

BTW: It was nice and quiet. Nearly silent :+1:

Based on this info I know the BPi-R4 isn’t supplying power via that “FAN” connector with the latest OpenWRT image (which I downloaded two days ago). I wonder where in the kernel tree we’d need to mess with things in order to add PWM support?