I'm aware that the only officially supported OS that the PoE hat works on is Raspbian. I can confirm that both my hats work, and that the fan does switch on and off if I have Raspbian installed on the SD card the Pi is booting from.
Currently, however, I'm dong a project and I'm using Ubuntu Server 18.04 64bit, which runs fine on the Pi, and the PoE hat powers the device with no problems. Unfortunately, as the OS isn't Raspbian, the fan never spins up, so it can run a little hot. As a result, if I can get the fan to spin up, and down then that would be great. I have no problems with doing this with scripts, using crontab
and inspecting the value of /sys/class/thermal/thermal_zone0/temp
, but I just don't know how to get the fan to spin.
I did initially try my simply editing config.txt
, which is located in /boot/firmware
on Ubuntu, and adding the below:
dtparam=poe_fan_temp0=65000,poe_fan_temp0_hyst=5000
dtparam=poe_fan_temp1=77000,poe_fan_temp1_hyst=2000
This has no effect though (but does have the desired effects on Raspbian).
I did, therefore, wonder if I could use the GPIO pins to start the fan up, and stop it, however, I honestly have no knowledge of GPIO. I assume it is controlled via this on Raspbian, but very little on ideas here, I'm afraid.
If anyone can point me in the right direction, or has some ideas to try that would be great. Any further questions on things I haven't covered, please do ask, and I'll be happy to elaborate to the best of my ability.
Edit: Looking at this post here, it appears that it's controlled via the I2C pins, so I've added the tag, in case anyone has found how to control it via that.
Edit 2: So it seems that the drivers for the fan were added in Ubuntu 19.04, as the answer below suggests, however, it doesn't control the fan, it just switches it on. Having the fan permanently on is actually even less desired as they create constant high levels of noise (despite being quite small the fans aren't quiet). I am looking for a solution that can spin the fans up and down. I did add the above parameters to /boot/firmware/config.txt
again as well, but this has no effect. Even at 40C the fan was spinning at full speed (the settings state that full speed would be at 77C, down to 75C).
/sys/
folder forfan*
,rpipoefan
orrpi-poe-fan
entries? Here's the driver source: github.com/raspberrypi/linux/blob/rpi-4.19.y/drivers/hwmon/…/lib/modules/5.0.0-1008-raspi2/kernel/drivers/hwmon/rpi-poe-fan.ko
@RogerJones . i'm going to try a fresh install of 19.04 on the pi I ungraded to 19.04 last night anyway (as it corrupted the lxc install when it changed it to snap) and see if that works.