Flexible fan control daemon
Go to file
2021-09-14 23:18:24 +02:00
.vscode Initial commit 2021-09-12 16:10:23 +02:00
common.h Add info and error printing macros 2021-09-14 23:18:24 +02:00
config.c Enable manual PWM fan control on startup 2021-09-14 22:55:08 +02:00
config.h Enable manual PWM fan control on startup 2021-09-14 22:55:08 +02:00
curve.c Initial commit 2021-09-12 16:10:23 +02:00
curve.h Initial commit 2021-09-12 16:10:23 +02:00
daemon.c Enable manual PWM fan control on startup 2021-09-14 22:55:08 +02:00
fan.c Enable manual PWM fan control on startup 2021-09-14 22:55:08 +02:00
fan.h Enable manual PWM fan control on startup 2021-09-14 22:55:08 +02:00
fand.conf Enable manual PWM fan control on startup 2021-09-14 22:55:08 +02:00
main Enable manual PWM fan control on startup 2021-09-14 22:55:08 +02:00
main.working Add info and error printing macros 2021-09-14 23:18:24 +02:00
Makefile Add makefile 2021-09-12 16:27:37 +02:00
README.md Update README.md 2021-09-14 11:12:43 +02:00
sensor.c Enable manual PWM fan control on startup 2021-09-14 22:55:08 +02:00
sensor.h Enable manual PWM fan control on startup 2021-09-14 22:55:08 +02:00
test.c Initial commit 2021-09-12 16:10:23 +02:00
zone.c Enable manual PWM fan control on startup 2021-09-14 22:55:08 +02:00
zone.h Initial commit 2021-09-12 16:10:23 +02:00

fand - A simple, flexible fan control daemon

Introduction

fand is a daemon that controls the fans (and other pwm-controlled devices) in your system. It's main feature is its configurability, using a concept of thermal zones.

Features

  • Configurability
  • Fan curve interpolation
  • Supports stable hwmon paths
  • Lightweight, written in C with minimum dependencies

Zones

A zone is a collection of fans and sensors. Each sensor in a zone is polled, optionally has an offset applied, and the maximum sensor value in a zone is used to control the fans in the zone. Each fan has a curve, defined as a list of temperatures and the respective PWM values to be applied. For temperatures inbetween the defined curve points, the PWM values are interpolated automatically.

This allows you to:

  • have your case fans follow both CPU temperatures and GPU temperatures
  • set your AIO cooler fan speeds to follow the coolant temperatures, but also ramp up when the GPU gets hot
  • have your pump speed follow the CPU temperatures but stay high when the coolant is warm
  • all of the above, simultaneously!

Example

A simple config with one sensor and 2 fans:

zones:
(
  { # Zone #1
    sensors:
    (
      { # NZXT Kraken coolant temperature
        path: "/sys/class/hwmon/hwmon7"
        index: 1
        offset: 0
      }
    )

    fans:
    (
      { # NCT6798 fan header #1
        path: "/sys/class/hwmon/hwmon5"
        index: 1
        curve: {
          temperatures: [ 25, 30, 37, 40 ]
          speeds: [ 55, 80, 220, 255 ]
        }
      },
      { # NCT6798 fan header #2
        path: "/sys/class/hwmon/hwmon5"
        index: 2
        curve: {
          temperatures: [ 25, 30, 37, 40 ]
          speeds: [ 55, 80, 220, 255 ]
        }
      }
    )
  }
)

Dependencies

  • libconfig

Limitations

  • Only hwmon fans and sensors are supported
  • Each zone has to have at least one fan and at least one sensor
  • A fan can't be used in more than one zone (well, it can, it's just that only the last setting will be applied)