Coder Social home page Coder Social logo

fanctl's Introduction

fanctl

Automatically generate a config for fancontrol based on a yml config and current hardware.

Background

fancontrol from lm-sensors requires reconfiguration if the hwmon paths have been changed. This usually happens either after a kernel update, a change in hardware, or depends on the order that kernel modules are loaded.

fanctl can be used to solve this issue by using a generic config ommiting the hwmon paths. When fanctl is executed it tries to map the current hardware monitoring devices to the ones declared in /etc/fanctl/config.yml.

After the mapping is complete the new configuration is written to /etc/fancontrol.

A systemD service is included, and if it is enabled it will regenerate FC config (if there are changes) and exit. The service is run before fancontrol.service thus the config will always be up-to-date.

$ fanctl -h

usage: fanctl [-h] [-c fanctl config file] [-f fancontrol config file] [-v]

Fancontrol helper. Generates a configuration for fancontrol based on a fanctl
config and automatic mapping to current hardware.

optional arguments:
  -h, --help            show this help message and exit
  -c fanctl config file
                        Load custom config file
  -f fancontrol config file
                        Write to file instead of /etc/fancontrol. If file is
                        '-' the config is written to stdout.
  -v                    Increase verbosity (can be used multiple times)

Usage

Normally, you won't need to run fanctl manually. When the service is enable it will work automatically on every boot.

However to check the settings are correct you can run:

fanctl -f - -vv

This will display the generated fancontrol config along with debugging information.

Installation

The project uses Meson as its build system. As such it requires the meson and ninja packages to be installed. Additionally since the package uses a yaml configuration, python3 and python-yaml are also required.

To install fanctl run the following:

meson build --prefix=/usr --buildtype=release -Dsystemddir=/usr/lib/systemd
sudo ninja -Cbuild install

Note: The option systemddir must point to the systemD directrory on the system. Usually is on /usr/lib/systemd.

To use the service without reboot the systemd daemon must be reloaded, i.e. systemctl daemon-reload

If you want fanctl to be executed at boot enable the service.

systemctl enable fanctl.service

To uninstall fanctl execute sudo ninja -Cbuild uninstall from the project directory.

fanctl's People

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.