Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New PWM cooling fan overlay for Pi 3/4 #6572

Merged
merged 1 commit into from
Jan 1, 2025

Conversation

herbingk
Copy link
Contributor

This is my 3rd attempt, to make a pull request on the topic. I got stuck with your workflow scripts, that always checked older commits and failed with errors, so I started over again. Please bear with me, as I am entirely new to github and still on a learning curve. I you have an advice how to fix workflow errors with newer commits, without the need to start all over again, I greatly appreciate to learn.

I recently discovered that there is a new kernel based software PWM solution available since November 2024. A software-based PWM kernel module is available since then, back-ported from the Linux kernel 6.11 to the Raspberry Pi OS Bookworm kernel 6.6.62. This made me write a new pwm-gpio-fan overlay for my own use and after extensive testing on a Pi 3, I have published it for the community.

Moderator 6by9 on the Raspberry Pi forum suggested that I make a pull request, so that it gets merged for all Pi users.

Using the new kernel-based software PWM imposes several advantages over other implementations I have found on the internet and this forum:

  • Compared with the existing gpio-fan overlay, the fan runs much quieter, often not even noticeable, due to the use of real PWM duty cycles.
  • No hardware PWM (PWM0 or PWM1) of the Pi is occupied, so there is no conflict with the Pi's analogue audio output anymore.
  • Reliable on even high CPU loads, as it's part of the kernel.
  • Doesn't consume noticeable CPU power even on a Pi 3.

Add and update files for pwm-gpio-fan overlay
Signed-off-by: Kai-Uwe Herbing <[email protected]>
@herbingk herbingk changed the title Add and update files for pwm-gpio-fan overlay New PWM cooling fan overlay for Pi 3/4 Dec 31, 2024
@peterharperuk
Copy link

I would suggest waiting for feedback rather than trying with new merge requests. The RPI engineers will advise if changes are required

@pelwell
Copy link
Contributor

pelwell commented Jan 1, 2025

I've not tested this, but it looks reasonable and the auto-build checks are happy.

When you are making changes to a PR, I suggest the following:

  1. Add new commits that fix the problems.
  2. Verify that the problem is solved, ignoring checkpatch warnings about the original commits.
  3. Use git rebase -i HEAD~n to squash the fixups into the original commits.
  4. Use git push -f ... to force push the new commits to your branch, which will update the PR.

@pelwell pelwell merged commit 5fa4b1f into raspberrypi:rpi-6.6.y Jan 1, 2025
12 checks passed
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Jan 2, 2025
kernel: dts: Add noanthogs parameter to CM4 and CM5
See: raspberrypi/linux#6555

kernel: New PWM cooling fan overlay for Pi 3/4
See: raspberrypi/linux#6572
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Jan 2, 2025
kernel: dts: Add noanthogs parameter to CM4 and CM5
See: raspberrypi/linux#6555

kernel: New PWM cooling fan overlay for Pi 3/4
See: raspberrypi/linux#6572
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants