dr.sputnik
Posts: 2
Joined: Thu Aug 30, 2018 3:31 pm

PoE HAT Fan Speed adjustment

Thu Aug 30, 2018 4:01 pm

Hi,

I saw the notes in ETA for Official POE Hat for 3B+, and decided to try this on one of mine.

After editing, compiling and copying over the file to the overlays folder, the fan no longer works. Also the faint high pitch noise made by the PoE HAT during boot is absent. Copying the original overlay file back and rebooting results in it all working again.

I downloaded the code from https://github.com/raspberrypi/linux/ra ... verlay.dts and edited it as follows:

Code: Select all

[email protected]:~/fan-control $ cat rpi-poe-overlay.dts
/*
 * Overlay for the Raspberry Pi POE HAT.
 */
/dts-v1/;
/plugin/;

/ {
        compatible = "brcm,bcm2708";

        [email protected] {
                target-path = "/";
                __overlay__ {
                        fan0: [email protected] {
                                compatible = "raspberrypi,rpi-poe-fan";
                                firmware = <&firmware>;
                                cooling-min-state = <0>;
                                cooling-max-state = <3>;
                                #cooling-cells = <2>;
                                cooling-levels = <0 50 150 255>;
                                status = "okay";
                        };
                };
        };

        [email protected] {
                target = <&cpu_thermal>;
                __overlay__ {
                        trips {
                                threshold: [email protected] {
                                        temperature = <50000>;
                                        hysteresis = <5000>;
                                        type = "active";
                                };
                                target: [email protected] {
                                        temperature = <55000>;
                                        hysteresis = <2000>;
                                        type = "active";
                                };
                                cpu_hot: [email protected] {
                                        temperature = <60000>;
                                        hysteresis = <2000>;
                                        type = "active";
                                };
                        };
                        cooling-maps {
                                map0 {
                                        trip = <&threshold>;
                                        cooling-device = <&fan0 0 1>;
                                };
                                map1 {
                                        trip = <&target>;
                                        cooling-device = <&fan0 1 2>;
                                };
                                map2 {
                                        trip = <&cpu_hot>;
                                        cooling-device = <&fan0 2 3>;
                                };
                        };
                };
        };
};
[email protected]:~/fan-control $
and then ran:

Code: Select all

dtc [email protected] -I dts -O dtb -o rpi-poe.dtbo rpi-poe-overlay.dts
That command produces warnings:

Code: Select all

[email protected]:~/fan-control $ dtc [email protected] -I dts -O dtb -o rpi-poe.dtbo rpi-poe-overlay.dts
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected] has a unit name, but no reg property
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected]/__overlay__/[email protected] has a unit name, but no reg property
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected] has a unit name, but no reg property
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected]/__overlay__/trips/[email protected] has a unit name, but no reg property
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected]/__overlay__/trips/[email protected] has a unit name, but no reg property
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected]/__overlay__/trips/[email protected] has a unit name, but no reg property
[email protected]:~/fan-control $
After copying it to the

Code: Select all

/boot/overlays/
folder, after rebooting the PI the fan does nothing - not even when the temperature gets up above 65degC.

Additionally, after applying it, I ran dmesg -w and noticed that I'm now getting over-current warnings: I don't have any devices plugged into the PI at all; its headless and I connect over SSH.

Code: Select all

[email protected]:~ $ sudo dmesg -C
[email protected]:~ $ dmesg -w
[   72.037711] usb 1-1-port2: over-current change
[   72.131720] usb 1-1.1-port2: over-current change
[   72.271588] usb 1-1-port3: over-current change
[   72.371592] usb 1-1.1-port3: over-current change
[   72.511585] usb 1-1-port4: over-current change
[   93.891759] usb 1-1.1-port2: over-current change
[   94.053660] usb 1-1-port2: over-current change
[   94.131606] usb 1-1.1-port3: over-current change
[   94.301594] usb 1-1-port3: over-current change
[   94.371595] usb 1-1.1-port2: over-current change

(this goes on and on and on...)

Any thoughts? Help!

Thanks!

martinrowan
Posts: 71
Joined: Wed Aug 26, 2015 11:00 am
Location: Berkshire, UK
Contact: Website Twitter

Re: PoE HAT Fan Speed adjustment

Thu Aug 30, 2018 7:35 pm

On the over-current warnings, this is something being tracked in this thread: https://www.raspberrypi.org/forums/view ... 5&t=220984
Sorry due to the over-current issues, I've not experimented with altering the fan profile myself.

martinrowan
Posts: 71
Joined: Wed Aug 26, 2015 11:00 am
Location: Berkshire, UK
Contact: Website Twitter

Re: PoE HAT Fan Speed adjustment

Sun Sep 02, 2018 5:29 pm

I too had the same issue with the updated overlay not working. It looks like 4 days ago there was a code change submitted (https://github.com/raspberrypi/linux/co ... c65db65959) which modified the file: rpi-poe-overlay.dts

Since the new driver that included the rest of the changes isn't released yet, it's necessary to get the older version of the file or just undo the simple change.

Change:

Code: Select all

compatible = "raspberrypi,rpi-poe-fan";
Back to:

Code: Select all

compatible = "rpi-poe-fan";
Or download the older version of the file: https://raw.githubusercontent.com/raspb ... verlay.dts


Also running the command as root ensure the files are created with root owner and group as per the original file:

Code: Select all

sudo dtc [email protected] -I dts -O dtb -o rpi-poe.dtbo rpi-poe-overlay.dts
Hopefully that will get your fan working once again and able to change the thresholds.
Thanks Martin

dr.sputnik
Posts: 2
Joined: Thu Aug 30, 2018 3:31 pm

Re: PoE HAT Fan Speed adjustment

Tue Sep 04, 2018 12:24 pm

That's sorted it! Many thinks.

hansamann
Posts: 7
Joined: Fri Mar 22, 2013 7:40 pm

Re: PoE HAT Fan Speed adjustment

Fri Oct 12, 2018 5:34 pm

If someone else feels the POE fan needs more user-controllable settings, please consider voting / starring for an issue I created =:
https://github.com/raspberrypi/linux/is ... 3Aopen+poe

TLDR: make the fan user controllable with different operating levels in raspi-config.

thx
Sven

jordipalet
Posts: 2
Joined: Sun Dec 09, 2018 8:18 pm

Re: PoE HAT Fan Speed adjustment

Sun Dec 09, 2018 8:29 pm

New with Raspberry and using the Pi 3 Model B+ with the PoE Hat.

Had the same problem with the fans running too much even with normal 45C, so followed those instructions and changed in the code published by dr.sputnik, compatible = "rpi-poe-fan"

I still got
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected] has a unit name, but no reg property
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected]/__overlay__/[email protected] has a unit name, but no reg property
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected] has a unit name, but no reg property
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected]/__overlay__/trips/[email protected] has a unit name, but no reg property
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected]/__overlay__/trips/[email protected] has a unit name, but no reg property
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected]/__overlay__/trips/[email protected] has a unit name, but no reg property

after the sudo dtc [email protected] -I dts -O dtb -o rpi-poe.dtbo rpi-poe-overlay.dts

ignored it, done a chmod +x and copied over to /boot/overlay (backed up first).

However, no results with sudo dmesg -C
and sudo dmesg -w, doesn't provide anything ... need to ^c, as not coming back to the prompt

Is that normal?

Or there is an alternative way to do this since september with this thread was published -?

(I've everything updated to the last version)

Thanks!
martinrowan wrote:
Sun Sep 02, 2018 5:29 pm
I too had the same issue with the updated overlay not working. It looks like 4 days ago there was a code change submitted (https://github.com/raspberrypi/linux/co ... c65db65959) which modified the file: rpi-poe-overlay.dts

Since the new driver that included the rest of the changes isn't released yet, it's necessary to get the older version of the file or just undo the simple change.

Change:

Code: Select all

compatible = "raspberrypi,rpi-poe-fan";
Back to:

Code: Select all

compatible = "rpi-poe-fan";
Or download the older version of the file: https://raw.githubusercontent.com/raspb ... verlay.dts


Also running the command as root ensure the files are created with root owner and group as per the original file:

Code: Select all

sudo dtc [email protected] -I dts -O dtb -o rpi-poe.dtbo rpi-poe-overlay.dts
Hopefully that will get your fan working once again and able to change the thresholds.
Thanks Martin

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6177
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: PoE HAT Fan Speed adjustment

Tue Dec 11, 2018 4:25 pm

It's a bit simpler now. Restore the original overlay.

https://github.com/raspberrypi/firmware ... ADME#L1646

In config.txt:

Code: Select all

dtparam=poe_fan_temp0=55000,poe_fan_temp1=60000
That should turn the fan on at 55C

jordipalet
Posts: 2
Joined: Sun Dec 09, 2018 8:18 pm

Re: PoE HAT Fan Speed adjustment

Tue Dec 11, 2018 5:32 pm

Thanks a lot, it worked only issue is that params seems to work this way:
dtparam=poe_fan_temp0=55000,poe_fan_temp1=60000

ShiftPlusOne wrote:
Tue Dec 11, 2018 4:25 pm
It's a bit simpler now. Restore the original overlay.

https://github.com/raspberrypi/firmware ... ADME#L1646

In config.txt:

Code: Select all

dtparam=poe_fan_temp0=55,poe_fan_temp1=60
That should turn the fan on at 55C

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6177
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: PoE HAT Fan Speed adjustment

Tue Dec 11, 2018 6:06 pm

Yes, sorry I was in a hurry. I'll edit the post so it doesn't trip others up.

bobbyiliev
Posts: 1
Joined: Sat Feb 09, 2019 8:57 pm
Contact: Website Twitter

Re: PoE HAT Fan Speed adjustment

Sat Feb 09, 2019 9:03 pm

This works great!
ShiftPlusOne wrote:
Tue Dec 11, 2018 4:25 pm
It's a bit simpler now. Restore the original overlay.

https://github.com/raspberrypi/firmware ... ADME#L1646

In config.txt:

Code: Select all

dtparam=poe_fan_temp0=55000,poe_fan_temp1=60000
That should turn the fan on at 55C
https://bobbyiliev.com

maltwix
Posts: 3
Joined: Mon May 27, 2019 5:32 pm

Re: PoE HAT Fan Speed adjustment

Mon May 27, 2019 5:36 pm

ShiftPlusOne wrote:
Tue Dec 11, 2018 4:25 pm
It's a bit simpler now. Restore the original overlay.

https://github.com/raspberrypi/firmware ... ADME#L1646

In config.txt:

Code: Select all

dtparam=poe_fan_temp0=55000,poe_fan_temp1=60000
That should turn the fan on at 55C
Hi ShiftPlusOne,
unfortunately this does not work on my RPI. I have the newest version of raspbian (downloaded 2 days ago). I added the following in my config.txt:
dtoverlay=rpi-poe:poe_fan_temp0=59000,poe_fan_temp1=60000

and output from vcdbg log msg:
002294.543: Loaded overlay 'rpi-poe'
002294.598: dtparam: poe_fan_temp0=59000
002301.831: dtparam: poe_fan_temp1=60000

But Fan does still turn on at 50000...

It would be great if you can help me.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6177
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: PoE HAT Fan Speed adjustment

Wed Jun 05, 2019 4:21 pm

Just tried your settings and it seems to work for me.

What's in /sys/class/thermal/thermal_zone0/trip_point_1?

Are you sure it's coming on at 50 and you're not just seeing it remain on while the temperature drops down from 59?

maltwix
Posts: 3
Joined: Mon May 27, 2019 5:32 pm

Re: PoE HAT Fan Speed adjustment

Mon Jun 10, 2019 3:46 pm

The files are named like this:


-r--r--r-- 1 root root 4096 Jun 9 15:18 cdev0_trip_point
-r--r--r-- 1 root root 4096 Jun 9 15:18 cdev1_trip_point
-rw-r--r-- 1 root root 4096 Jun 9 15:18 trip_point_0_hyst
-r--r--r-- 1 root root 4096 Jun 9 15:18 trip_point_0_temp
-r--r--r-- 1 root root 4096 Jun 9 15:18 trip_point_0_type
-rw-r--r-- 1 root root 4096 Jun 9 15:18 trip_point_1_hyst
-r--r--r-- 1 root root 4096 Jun 9 15:18 trip_point_1_temp
-r--r--r-- 1 root root 4096 Jun 9 15:18 trip_point_1_type

And now I have the correct settings in it because I rebuilt the dtbo file with the settings I want to have. This is wokring now...

Kondziu
Posts: 1
Joined: Thu Jul 11, 2019 5:46 pm

Re: PoE HAT Fan Speed adjustment

Thu Jul 11, 2019 5:47 pm

I'm in the same boat - configuration for the PoE hat in /boot/config.txt does nothing for me, while .dtbs modifications do the trick.

bibou65
Posts: 1
Joined: Tue Jan 14, 2020 7:32 pm

Re: PoE HAT Fan Speed adjustment

Tue Jan 14, 2020 7:48 pm

Hi all,

I have a Raspberry Pi 4 (4GB) and a POE HAT and I also encounter difficulties to manage the fan of the POE HAT.

I have a standard Pi4 case (red and white) and my Pi only have a Ubiquiti controler and PiHole installed. The temperatur of the PI is always around 75 C° when the system is running (let say idle state). If I start playing with the Ubiquiti controler and the PiHole, it easily get to 82 C° and I'm scared that something start braking due to the temperature to high.

For the moment I have disabled the fan because it ran like 5 seconds every 15 seconds and it is very noisy/annoying.
I have tried to follow the steps above in this post but with my poor linux and dev knowledge, I can't figure out what I have to do.

I have tested the line:

Code: Select all

dtparam=poe_fan_temp0=55000,poe_fan_temp1=60000
in the /boot/config.txt and change the values to test but nothing is changing the fan still run every 15 seconds etc.

I have tried to check the links below but I feel completely lost with it. I don't know what to do with all these text/overlay stuff and where to install/place the content/files:
https://github.com/raspberrypi/firmware ... ADME#L1646
https://github.com/raspberrypi/firmware ... 78cb40e6e4

Is there any "easy" stuff for basic users to manage the fan of the POE HAT just like the https://shop.pimoroni.com/products/fan-shim?

Thanks in advance :)

Return to “HATs and other add-ons”