PC Fans: Difference between revisions

Line 119: Line 119:


====On Linux====
====On Linux====
PWM fans are controlled through the [https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface <tt>hwmon</tt>] [[sysfs]] interface, using the "PWM" type (''not'' the "fan" type). This is dependent on your hardware controller (usually some SMBus-accessed [https://en.wikipedia.org/wiki/Super_I/O SuperIO] shadynasty on the motherboard) being supported and detected. You'll need set <tt>pwmX_enable</tt> to 1 for manual control, at which point you ought be able to write a value [0..255] to <tt>pwmX</tt>. When the PWM is under automatic control, you ought be able to read the current level by reading this latter file.
PWM fans are controlled through the [https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface <tt>hwmon</tt>] [[sysfs]] interface, using the "PWM" type (''not'' the "fan" type) via <tt>/sys/class/hwmon/*/pwm*</tt>. This is dependent on your hardware controller (usually some SMBus-accessed [https://en.wikipedia.org/wiki/Super_I/O SuperIO] shadynasty on the motherboard) being supported and detected. You'll need set <tt>pwmX_enable</tt> to 1 for manual control, at which point you ought be able to write a value [0..255] to <tt>pwmX</tt>. When the PWM is under automatic control, you ought be able to read the current level by reading this latter file.


Some devices don't have a kernel driver, but are supported by userspace tools like [https://github.com/liquidctl/liquidctl liquidctl].
Some devices don't have a kernel driver, but are supported by userspace tools like [https://github.com/liquidctl/liquidctl liquidctl].