PWM Fan on 4C+ Ubuntu Server for Noob

Hi all,

I recently got a kit with a Rock 4C+, charger and case. However, I found the case fan to annoying so now i have a case with Noctua NF-A4x10 5V PWM. I am new to this, and I have tried googling, so I have no idea on how to get the PWM fan to adjust speeds depending on CPU temperature.

To what pin do I connect the PWM cable? How do I enable and set it up? How do I configure fan speeds? (please be unneccessarily detailed in descriptions, this is my first SBC)

I’m running Ubuntu 22.04 on it.

Thanks in advance!

You’re probably hoping for an answer like, “install [package] like so, change [config file] like so, and Bob’s your uncle!”

Unfortunately, although the ROCK Pi 4 boards are (IMHO) great bits of hardware, the ecosystem is less beginner-friendly and more DIY than for the Raspberry Pi devices.

That said, the “top hat” board for the Penta SATA case for the ROCK Pi 4s includes a PWM fan that’s connected to the board’s GPIO interface for variable speeds based on the CPU temp. The most recent packages with GPIO libraries that are available for download are for distributions several releases back. Look in the SATA HAT section of the forums for posts that might help you. Be prepared to fiddle with your configuration in order to make it work properly, if at all.

Otherwise, the more straightforward approach would be to do as a few folks with RPis have done recently with their Noctua fans, which is add a resistor in order to make the fan noise more tolerable.

Good luck!

There is fan header on ROCK 4C+:

Probably You need to use Noctua FLX version instead of PWM fan, it should work out of box. For PWM fan I’m not sure if it’s possible to control it by voltage, but probably this needs to be connected to GPIO PWM pins: https://docs.radxa.com/en/rock4/hardware/rock4-gpio and then something needs to read and set right values.

I wasn’t aware of that. Is it automatic voltage control depending on CPU temps or do I need to set it up somehow?

I knew there would be a downside for getting more powerful hardware at a lower price than a Raspberry…

I found this article on how to do it on a Raspberry Pi 3: https://blog.driftking.tw/en/2019/11/Using-Raspberry-Pi-to-Control-a-PWM-Fan-and-Monitor-its-Speed/

I was hoping there was someone who had done something similar for a Rock 4…

I will browse the SATA HAT section and see if 'i can find anything useful. Thanks for the nod in (hopefully) the right direction :slight_smile:

Yes, it depends on cpu governor and thermal zones, basically it’s prepared for radxa stock fan that most buy with board. Of course I would check out that because it’s possible that not every image support this particular functionality (it should).

Of course If You need to alter something related to that (if You have non standard fan, or just want to get different speed levels) You can do that on source code. Something similar in 5B Rock 5B FAN Control was discussed here and probably it’s same on 4C.

It’s not Raspberry, and of course it’s not pi3 which was cool don’t needed cooling.
Take a look at other Radxa products, temperature control is present on many of them and You can easily find source code for those if You really needed that. As I said most will just use stock fan, connect it to header and forget.

Sata HAT has own fans and temp sensors, this may be useful if You need to build external fan and control it.

Thank you!

I did try to connect my fans to the 3.3V header instead - and they still spin, so voltage control seems doable with these fans too.

Decompling and editing source code feels a bit over my skill level, so I’ll stick to trying the fan header :wink: It looks like a JST-XH 2-pin connector, is that correct? The kit I bought just included a fan that’s connected to the GPIO pins…