Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
N

nbfc-linux

> 编程语言
Open source

NoteBook FanControl ported to Linux

766 stars0 likes1 views
WebsiteGitHub

About

NoteBook FanControl ported to Linux

NoteBook FanControl

This is a C port of Stefan Hirschmann's NoteBook FanControl.

It provides the same utilities with the same interfaces as the original NBFC, although the implementation differs.

To check if your laptop is supported, use the Configuration Search.

If you want to write a configuration for your laptop model, see Configuration HowTo.

I regularly purchase laptops to create configuration files, analyze their ACPI firmware, and gain a deeper understanding of how these systems work. The knowledge gained through this process is documented and preserved in the tutorial to help others understand and work with similar hardware.

If you find my work helpful, you can show your appreciation by buying me a coffee.

Table of Contents

  • Comparison of NBFC C# and NBFC Linux
  • Installation
  • Getting started with the GUI
  • Getting started without the GUI
  • Advanced configuration
  • Differences in detail
  • Troubleshooting
  • Advanced Compilation
  • Shell autocompletion
  • Contributing

Comparison of NBFC C# and NBFC Linux

What NBFC Mono NBFC Linux
Portability Crossplatform Linux
Runtime Mono Native
Memory Consumption (ps_mem) ~50MB ~230KB
Model Configuration Files XML (210 files) JSON (312 files)
Model Compatibility Database No Yes
Fan Control Rights Any user Any user
Service Control Rights Any user Only root
ACPI Method Support No Yes (via acpi_call kernel module)
Fail-Safe Runtime Design No (not OOM-safe) Yes
IPC Concept TCP/IP Unix sockets
IPC Protocol Binary JSON
Graphical User Interface Windows only Linux only

The service, the client and the probing tool are written in C.

Installation

Packages

Operating System Download Command
Arch Linux 0.5.3 sudo pacman -U ./arch-linux-nbfc-linux-git-0.5.3-1-x86_64.pkg.tar.zst
Debian Trixie 0.5.3 sudo apt install ./debian-trixie-nbfc-linux_0.5.3_amd64.deb
Debian Bookworm 0.5.3 sudo apt install ./debian-bookworm-nbfc-linux_0.5.3_amd64.deb
Ubuntu Resolute 0.5.3 sudo apt install ./ubuntu-resolute-nbfc-linux_0.5.3_amd64.deb
Ubuntu Noble 0.5.3 sudo apt install ./ubuntu-noble-nbfc-linux_0.5.3_amd64.deb
Ubuntu Jammy 0.5.3 sudo apt install ./ubuntu-jammy-nbfc-linux_0.5.3_amd64.deb
Linux Mint 22 0.5.3 sudo apt install ./linux-mint-22-nbfc-linux_0.5.3_amd64.deb
Linux Mint 21 0.5.3 sudo apt install ./linux-mint-21-nbfc-linux_0.5.3_amd64.deb
Fedora 44 0.5.3 sudo dnf install ./fedora-44-nbfc-linux-0.5.3-1.x86_64.rpm
Fedora 43 0.5.3 sudo dnf install ./fedora-43-nbfc-linux-0.5.3-1.x86_64.rpm
OpenSuse (Tumbleweed) 0.5.3 sudo zypper install ./opensuse-nbfc-linux-0.5.3-1.x86_64.rpm

Alternative Installation Methods

  • Arch Linux:

    • Via AUR (yay -S nbfc-linux)
    • Via PKGBUILD nbfc-linux-git
  • NixOS:

    • Declaratively
    • Imperatively (with nix profile install or nix-env -if .)
  • Fedora - this will not build the current working directory, but downloads a source archive from chosen release on github and builds an installable rpm:

    • ensure, that podman is installed
      • docker should work also, but is currently not tested
    • edit pkgbuilds/rpm/nbfc-linux.spec and
      • set wanted Version (e.g. 0.5.3)
      • set wanted Releasenumber (e.g. 1%{?dist} or 2%{?dist})
    • ./pkgbuilds/rpm/buildNBFC-LINUX
    • the resulting rpm can be found in pkgbuilds directory
  • In general:

    • ./autogen.sh && ./configure --prefix=/usr --sysconfdir=/etc && make && sudo make install
  • For systems with OpenRC (gentoo):

    • ./autogen.sh && ./configure --prefix=/usr --sysconfdir=/etc --with-init-system=openrc && make && sudo make install
  • For systems with System-V-Init:

    • ./autogen.sh && ./configure --prefix=/usr --sysconfdir=/etc --with-init-system=systemv && make && sudo make install

Getting started with the GUI

Graphical User Interfaces are available as separate projects.

Currently there are three GUI implementations:

  • NBFC-Qt

    • Simple GUI written in Python based on Qt5/Qt6
    • Comes with an extra tray application for controlling fans
  • NBFC-Gtk

    • Simple GUI written in Python based on Gtk4
  • NBFC-XFCE4-Tray

    • Simple XFCE4 Panel Plugin (only for controlling the fans)

Getting started without the GUI

When running NBFC for the first time, you need to give it a configuration file for your laptop model.

Follow the steps below:

  1. sudo nbfc update will download the latest configuration files from the internet.

  2. sudo nbfc config --set auto will try to set a configuration automatically.

    If this succeeds, skip to Step 5.

  3. sudo nbfc rate-config -a will print out a list of configurations that may work on your notebook.

  4. Repeat the following until you found a working configuration:

  • sudo nbfc config --set "MODEL" -- set a configuration

  • sudo nbfc restart -r -- (re-)start the service in read only mode

  • nbfc status -- show the fan status

  • Let the fan turn up (and down) (e.g. using stress) and observe if nbfc status shows fan speed changes

  • If speeds are reported correctly, the config is likely valid. Proceed to Step 5.

  1. sudo nbfc restart will (re-)start the service in write mode (enabling fan control)

  2. Test fan control manually

  • nbfc set -s will set the fan speed. (0=off, 100=full speed)

    If this does not work, the specified configuration is invalid. Go back to Step 4.

  1. nbfc set --auto will enable auto mode (temperature-based automatic fan speed control as specified in configuration)

  2. sudo systemctl enable nbfc_service will enable the service to start automatically on boot

Advanced configuration

NBFC-Linux allows you to specify which temperature sources to use for controlling fans and the algorithm to compute the temperature.

NOTE: Since version 0.3.3 NBFC-Linux also allows you to specify sensors in FanConfigurations using the Sensors field

NOTE: The command nbfc sensors is available since version 0.3.16. If you are running a previous version, you can still configure it by hand.

Default Configuration

If no configuration is specified, NBFC uses the "Average" algorithm and utilizes all sensor files named "coretemp", "k10temp", or "zenpower".

Available Algorithms

You can choose from three different algorithms to compute the temperature:

  • "Average": Computes the average temperature from all specified sources.
  • "Min": Selects the lowest temperature among all specified sources.
  • "Max": Selects the highest temperature among all specified sources.

Temperature Sources

You can specify temperature sources either by a

  • sensor name (which may result in multiple temperature sources)
  • temperature file: A file containing the temperature (usually named temp*_input)
  • shell command: A command whose output is used as temperature (the command has to be prefixed by $)
  • sensor group:
    • @CPU: Uses all sensors named "coretemp", "k10temp" or "zenpower"
    • @GPU: Uses all sensors named "amdgpu", "nvidia", "nouveau" or "radeon"

Specyfing Temperature Sources

  1. nbfc sensors list will output all available sensors

  2. nbfc sensors show will show all available fans and their configured sensors

  3. sudo nbfc sensors set -f [-s ...] [-a ] will set the specified sensors and the algorithm for a fan.

Examples

  • sudo nbfc sensors set -f 0 -s coretemp -a Min

    Fan 0 uses the "Min" algorithm with all sensors named "coretemp".

  • sudo nbfc sensors set -f 0 -s /sys/class/hwmon/hwmon4/temp1_input -s /sys/class/hwmon/hwmon4/temp2_input

    Fan 0 uses the default algorithm with the specific sensor file paths.

  • sudo nbfc sensors set -f 0 -s '$ echo 42'

    Fan 0 uses the output of echo 42 as temperature

  • sudo nbfc sensors set -f 1 -s @GPU

    Fan 1 uses all sensors in the @GPU group ("amdgpu", "nvidia", "nouveau", "radeon")

Differences in detail

Files NBFC Mono NBFC Linux
Systemd service file nbfc.ser

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Cfanfancontrollaptoplinux

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言