Skip to content

CM4IO - Fan won't spin with custom settings in config.txt #5202

Open

Description

@sargonphin

Describe the bug

Hello all!

I've been digging all morning about an issue I have with the PWM controller on the CM4IO Board. I just finished building the casing and power supply, and I attached a Noctua A4 PWM fan above CPU heatsink.

Problem is-- I would like the fan to keep spinning even if the CPU is below min temperature. Default config works perfectly fine, with this line in config.txt. The fan spins and is PWM controlled, temperature dependant.

dtoverlay=i2c-fan,emc2301,i2c_csi_dsi

So to add the custom config, I have this line in my config.txt file

dtoverlay=i2c-fan,emc2301,i2c_csi_dsi,minpwm=50,maxpwm=255,midtemp=40000,maxtemp=80000

And here is the result when I run watch -n 1 "grep -s . /sys/class/thermal/thermal_zone*/* /sys/class/thermal/cooling_device*/*"

Every 1.0s: grep -s . /sys/class/thermal/thermal_zone*/* /sys/class/thermal/cooling_device*/*                                                             raspberrypi: Fri Oct  7 12:41:28 2022
/sys/class/thermal/thermal_zone0/available_policies:step_wise
/sys/class/thermal/thermal_zone0/cdev0_trip_point:0
/sys/class/thermal/thermal_zone0/cdev0_weight:0
/sys/class/thermal/thermal_zone0/cdev1_trip_point:1
/sys/class/thermal/thermal_zone0/cdev1_weight:0
/sys/class/thermal/thermal_zone0/integral_cutoff:0
/sys/class/thermal/thermal_zone0/k_d:0
/sys/class/thermal/thermal_zone0/k_i:0
/sys/class/thermal/thermal_zone0/k_po:0
/sys/class/thermal/thermal_zone0/k_pu:0
/sys/class/thermal/thermal_zone0/mode:enabled
/sys/class/thermal/thermal_zone0/offset:410040
/sys/class/thermal/thermal_zone0/policy:step_wise
/sys/class/thermal/thermal_zone0/slope:-487
/sys/class/thermal/thermal_zone0/sustainable_power:0
/sys/class/thermal/thermal_zone0/temp:41381
/sys/class/thermal/thermal_zone0/trip_point_0_hyst:2000
/sys/class/thermal/thermal_zone0/trip_point_0_temp:80000
/sys/class/thermal/thermal_zone0/trip_point_0_type:active
/sys/class/thermal/thermal_zone0/trip_point_1_hyst:2000
/sys/class/thermal/thermal_zone0/trip_point_1_temp:40000
/sys/class/thermal/thermal_zone0/trip_point_1_type:active
/sys/class/thermal/thermal_zone0/type:cpu-thermal
/sys/class/thermal/cooling_device0/cur_state:6
/sys/class/thermal/cooling_device0/max_state:10
/sys/class/thermal/cooling_device0/type:emc2305_fan

In this case, the fan is not spinning. It does spin at startup, then ramps down although it shouldn't. Any thoughts about why?

ALSO: midtemp? why not mintemp?

Steps to reproduce the behaviour

Edit config.txt and add the following line:

dtoverlay=i2c-fan,emc2301,i2c_csi_dsi,minpwm=50,maxpwm=255,midtemp=40000,maxtemp=80000

Fan will not spin.

Device (s)

Raspberry Pi CM4

System

root@raspberrypi:~# cat /etc/rpi-issue
Raspberry Pi reference 2022-09-06
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 827affcc11aaf7aa577d15daf02fb40b64392380, stage4
root@raspberrypi:~# vcgencmd version
Oct  5 2022 15:51:11
Copyright (c) 2012 Broadcom
version 6c57d97fa8066929a2fee6e4fac6d64ad62506c9 (clean) (release) (start)
root@raspberrypi:~# uname -a
Linux raspberrypi 5.15.72-v8+ #1591 SMP PREEMPT Wed Oct 5 12:07:56 BST 2022 aarch64 GNU/Linux

Logs

N/A

Additional context

https://github.com/raspberrypi/linux/pull/5026/files#diff-e7abcd96003b314ea63f6266c112b7c76240538303d49f2baeedb58180e92ea0R1533

#4632 (comment)

Activity

  1. freechurros commented on Jul 11, 2025

    @freechurros

    @sargonphin Did you ever figure this out? I'm seeing the same behavior here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions