NoteBook FanControl ported to Linux
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.
| 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.
| 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 |
Arch Linux:
yay -S nbfc-linux)NixOS:
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:
./pkgbuilds/rpm/buildNBFC-LINUXIn general:
./autogen.sh && ./configure --prefix=/usr --sysconfdir=/etc && make && sudo make installFor systems with OpenRC (gentoo):
./autogen.sh && ./configure --prefix=/usr --sysconfdir=/etc --with-init-system=openrc && make && sudo make installFor systems with System-V-Init:
./autogen.sh && ./configure --prefix=/usr --sysconfdir=/etc --with-init-system=systemv && make && sudo make installGraphical User Interfaces are available as separate projects.
Currently there are three GUI implementations:
When running NBFC for the first time, you need to give it a configuration file for your laptop model.
Follow the steps below:
sudo nbfc update will download the latest configuration files from the internet.
sudo nbfc config --set auto will try to set a configuration automatically.
If this succeeds, skip to Step 5.
sudo nbfc rate-config -a will print out a list of configurations that may work on your notebook.
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.
sudo nbfc restart will (re-)start the service in write mode (enabling fan control)
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.
nbfc set --auto will enable auto mode (temperature-based automatic fan speed control as specified in configuration)
sudo systemctl enable nbfc_service will enable the service to start automatically on boot
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
Sensorsfield
NOTE: The command
nbfc sensorsis 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:
Temperature Sources
You can specify temperature sources either by a
temp*_input)$)Specyfing Temperature Sources
nbfc sensors list will output all available sensors
nbfc sensors show will show all available fans and their configured sensors
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")
| Files | NBFC Mono | NBFC Linux |
|---|---|---|
| Systemd service file | nbfc.ser |
No open issues yet, or sync has not completed.