-
Notifications
You must be signed in to change notification settings - Fork 64
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
Support pwm-fan
platform devices
#112
Comments
Huh. Interesting. So which solution are you proposing exactly? Sounds to me like this |
I'm not sure about whether it is intended to be controlled from userspace or not, but it can be controlled and I set up my device tree so that the kernel doesn't keep playing with it. I built thinkfan with those lines commented and it's been working fine for 24h, it's keeping it quiet. I'd say thinkfan is pretty much redundant in this case because the kernel itself provides similar options, however thinkfan is still desirable in my case because I'm also monitoring dynamically discovered SATA hard disks. Being them connected to a PCI-e card I can't just add them to a cooling map in the dtb. My idea was to unbind the hwmon's "sibling" cooling_device from all thermal zones (tit can't really be unbound but you can set its weight to 0, so it should be left untouched by the kernel). However I can't seem to find a reliable way to map some hwmon device to its cooling_device sibling in the thermal subsystem.
I was going to suggest to add a config option to skip the enabling, and maybe document that it shouldn't be needed in most cases on x86/PC platforms. |
Right, that pretty much matches the intention of the DANGEROUS option |
Which is why I added a thermal trip point in the DTB, but that's not a thing you can easily do on platforms without a device-tree, so I agree with you :) |
pwm-fan
pwm-fan
platform devices
In the following lines
thinkfan/src/drivers.cpp
Lines 196 to 198 in 6f29448
Thinkfan tries to open and write to
pwmX_enable
. However, not all drivers provide this file. For example,pwm-fan
which can be used to drive a fan connected to a PWM output on ARM boards, does not provide it since the fan is always controlled by the kernel and always enabled.Relevant config snippet:
EDIT: possible equivalent behavior in this situation
Normally, when using
pwm-fan
, you provide both the fan and some thermal trips + cooling maps to bind thermal events to values to be applied to cooling devices.If
pwm-fan
is used and bound to some thermal trips, you will find a bunch of dedicated cooling maps that have the fan set as the cooling device (see pwm-fan dt docs)An equivalent to the
pwmX_enable
behavior would be to detach the cooling device from the cooling maps. I'm not sure how to do that, but I can provide info to reproduce my setup. To bypass the problem, since I'm making my own device tree, I simply provided an emergency trip that runs the fan in take-off mode when the CPU temperature reaches 95°C, but I made sure it is otherwise untouched.To get a similar setup you'd need some ARM SBC (I'm using an Orange Pi 4, dts, adapted from Armbian's), a 5V PWM fan (I'm using a Noctua NF-A6x25 5V PWM), then this dts patch to add the fan:
PWM output can be connected to pin 7 (
GPIO4_C6/PWM1
) and tach to pin 11 (GPIO1_A1
) with a 1kΩ to 1.4kΩ pull-up resistor to 5VThe text was updated successfully, but these errors were encountered: