I’m new to BBAI-64, I updated application and connected PWM FAN to FAN connector(J1).
FAN would spin during boot but after it would stop.
And in between HDMI display would flash and at that time FAN would rotate for short duration.
I’m new to linux and this is my first SBC, any help is appreciated.
thanks for the response, I updated in extlinux.conf and I can see “BONE-FAN” in “proc/device-tree/chosen/overlays” but still FAN behavior is same. It only works when HDMI screen blink and board overheats
thanks for the response, I tried " sudo systemctl disable --now bb-symlinks.service".
Still its same behavior. I tried “dmesg | grep pwm”,
pwm-fan: error -EBUSY: could not get PWM
pwm-fan: probe of pwm-fan failed with error -16.
I also tried “sudo modprobe pwm-fan”, still nothing.
Thanks for the response,.
I checked “lsmod | grep pwm”., response was
“pwm_fan 20480 0”.
I can see PWM in sys directory. I am unable to figure-out how to unexport the module.
Hope this information is useful.
ok, checking back through my original post, the issue is with initrd.img. This has a udev rule ( usr/lib/udev/rules.d/81-pwm-noroot.rules ) that automatically exports the PWM, thus preventing the fan from working.
The bb-symlink service I think is fine as it only creates sysmlinks in /dev/bone for exported devices.
of course the same rule also exists in the filesystem as well as initrd.img
Thanks, Benedict! It’s working.
Quick memo how to configure 4-pin PWM fan on BBAI-64:
Edit init FS image /boot/firmware/initrd.img : comment out content of the /usr/lib/udev/rules.d/81-pwm-noroot.rules Note: initrd.img is a directory, archived by cpio and compressed by gzip
Do the same on root FS: comment out content of the /etc/udev/rules.d/81-pwm-noroot.rules
Edit /boot/firmware/extlinux/extlinux.conf : add /overlays/BONE-FAN.dtbo to fdtoverlays parameter in default section; adjust parameter initrd if you created new initrd image at step 1 with different name
Reboot. The fan should start rotating with appropriate speed after system is up.
Alternative way (instead of doing the steps above) - control fan speed manually:
echo 50000 > period
echo 10000 > duty_cycle
echo 1 > enable