We use some essential cookies to make our website work.

We use optional cookies, as detailed in our cookie policy, to remember your settings and understand how you use our website.

5 posts • Page 1 of 1
dogukansahil
Posts: 14
Joined: Tue Mar 05, 2024 11:06 am

CM5 IO Board PWM Fan Not Locking / Randomly Stopping (pwm_fan, Bookworm, Kernel 6.12.34)

Mon Sep 15, 2025 6:26 am

Hello,
I am using a Compute Module 5 (CM5) inside the official CM5 IO board case with the bundled 8K PWM fan.
Power supply: official Raspberry Pi PSU.
Software: Debian Bookworm, kernel 6.12.34+rpt-rpi-2712 (2025年06月26日), aarch64.

What I am seeing
sensors shows the fan RPM sometimes around 3100–3200 RPM, sometimes suddenly drops to 0 RPM, even though I keep forcing PWM values.
Temperatures are stable (~55–70°C), so cooling works when the fan spins, but the fan control logic seems unstable.
Sometimes after reboot it spins, sometimes not.

Things I tried
Checked /boot/firmware/config.txt and /etc/thermal.d/ configs
Removed custom lines, commented everything out, so no override should exist.
Manual writes to sysfs
echo 1 | sudo tee /sys/class/hwmon/hwmon*/pwm1_enable
echo 255 | sudo tee /sys/class/hwmon/hwmon*/pwm1
→ sometimes works (fan spins full), sometimes reports 0 RPM in sensors while the fan is visibly spinning.
Verified module loaded
lsmod | grep pwm
pwm_fan 49152 0
Blacklisting check
Removed /etc/modprobe.d/blacklist-pwmfan.conf just in case.
Ran update-initramfs -u.
Systemd service approach
Wrote a service + script (fanlock.sh) that continuously forces manual mode and PWM=220.
Added "kick-start" (set 255 for 2s, then drop to 220).
Logs show script running, but still sometimes fan goes to 0 RPM.
Inotifywatch on pwm1
Checked if something else resets the value. Could not clearly identify a culprit.
Sensors output
Example:
pwmfan-isa-0000
Adapter: ISA adapter
fan1: 3151 RPM
...then suddenly:
pwmfan-isa-0000
Adapter: ISA adapter
fan1: 0 RPM

Question
Is this a driver / kernel regression with pwm_fan on CM5 IO board, or am I missing a new overlay/config requirement?
Since I am on CM5 + official IO case + official PSU + bundled fan, I would expect it to "just work".
Any guidance on:
Correct overlay or config.txt setting required?
Known issues with tach feedback on the 8K fan?
Way to permanently force manual PWM without kernel/firmware fighting back?
Thanks in advance for any help!
Turkiye / Engineer
Raspberry user for 10 years.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6874
Joined: Mon Sep 29, 2014 1:07 pm

Re: CM5 IO Board PWM Fan Not Locking / Randomly Stopping (pwm_fan, Bookworm, Kernel 6.12.34)

Mon Sep 15, 2025 9:09 am

Removed /etc/modprobe.d/blacklist-pwmfan.conf just in case.
This isn't one of ours. It makes me wonder what other software mods you have.

I suggest you monitor the contents of /sys/class/thermal in one window, e.g.

Code: Select all

$ watch -n 1 cat /sys/class/thermal/thermal_zone0/temp /sys/class/thermal/cooling_device0/cur_state
while applying some stress in another window:

Code: Select all

$ while true; do true; done &
$ while true; do true; done &
Each instance of the while loop will increase the power consumption and temperature. You can kill them using the small integer the shell reports as the job number (e.g. "kill %1"), or repeatedly type "fg" and Ctrl-C to cause each one to exit.

Notice that the hysteresis values require the temperature to drop significantly below the threshold temperature before dropping to the lower fan speed (including off). Once you understand how it works, try passively monitoring those values while running your experiment.

As long as the kernel is reporting plausible temperatures, and the fan is responding to cooling state changes correctly, everything else is due to the configuration (from Device Tree - see "dtparam | grep temp" for a list of parameters, then e.g. "dtparam -h fan_temp0" for each parameter) or the kernel's thermal subsytem (Which is unlikely to be faulty).

ibalked
Posts: 1
Joined: Tue Nov 11, 2025 7:06 pm

Re: CM5 IO Board PWM Fan Not Locking / Randomly Stopping (pwm_fan, Bookworm, Kernel 6.12.34)

Tue Nov 11, 2025 7:39 pm

First time posting here so forgive if I don't supply enough information.
I had the same issue trying to get the fan bundled with the CM5 development kit to spin up at the first threshold I set. The problem is that at the first temperature threshold ( 50 degC default ), the pwm is set to 75 ( out of 255 ) which does not supply enough power to get the fan to spin. Then at the next threshold ( 60 degC default ), the pwm sets to 125 which is enough to spin the fan ( ~1600 rpm ). Little testing I did showed that pwm = 80 caused the fan to occasionally attempt to spin but then quit. At pwm = 100, fan was spinning ok ( ~760 rpm ).

So using defaults, the fan will not spin until the 60 degC threshold.

From https://github.com/raspberrypi/linux/bl ... ays/README
fan_temp0_speed Fan PWM setting for 1st cooling level (0-255, default 75). Pi5 only.

One fix is to add to config.txt:
dtparam=fan_temp0_speed=114

Note the reason I picked 114 is that is the first threshold speed set in pwm-gpio-fan-overlay.dts:
/* PWM duty cycle values in a range from 0 to 255 */
/* which correspond to thermal cooling states 0 to 4 */
cooling-levels = <0 114 152 204 255>;

But any pwm settting higher than say, 100, should spin the fan.

aBUGSworstnightmare
Posts: 13432
Joined: Tue Jun 30, 2015 1:35 pm

Re: CM5 IO Board PWM Fan Not Locking / Randomly Stopping (pwm_fan, Bookworm, Kernel 6.12.34)

Wed Nov 12, 2025 5:58 am

when posting my PWM fan overlay on the forum for the first time Back in 2023 I've added a note that some smaller fans may require higher PWM values to start viewtopic.php?p=2122676&hilit=fan+overlay#p2122676

I've adjusted the first point of the fan curve to a value that made all of them happy.
That's exactly what the overrides are good for; adjusting the parameter to match
a) your HW
b) thermal requirements

simply add them If the defaults do not work for you.

aBUGSworstnightmare
Posts: 13432
Joined: Tue Jun 30, 2015 1:35 pm

Re: CM5 IO Board PWM Fan Not Locking / Randomly Stopping (pwm_fan, Bookworm, Kernel 6.12.34)

Wed Nov 12, 2025 6:03 am

dogukansahil wrote:
Mon Sep 15, 2025 6:26 am
..
Known issues with tach feedback on the 8K fan?
Way to permanently force manual PWM without kernel/firmware fighting back?
Thanks in advance for any help!
i have no Idea what a '8k fan' is!

If you don't want to use kernel driver from temp controlled fan speed (hwmon) then don't allow the FW to enabled it and do start/set PWM manually.
https://github.com/raspberrypi/linux/bl ... EADME#L208

5 posts • Page 1 of 1

Return to "Compute Module"

AltStyle によって変換されたページ (->オリジナル) /