Creating Model Configurations

To create a model configuration file for NBFC-Linux, you need to analyze the DSDT of your ACPI firmware to discover the registers and methods for controlling the fan.
This guide walks you through:

Installing Required Tools

Install the following programs / kernel modules

Operating System Command
Arch Linux
sudo pacman -S acpica acpi_call stress
Debian (Bookworm)
sudo apt install acpica-tools acpi-call stress
Fedora 42 (Adams)
sudo dnf install acpica-tools acpi_call stress
OpenSuse (Tumbleweed)
sudo zypper install acpica acpi_call stress

Extracting the Firmware

Extract the binary ACPI tables

This will create the file dsdt.dat

sudo cat /sys/firmware/acpi/tables/DSDT > dsdt.dat

Generate the DSL file

This will create the file dsdt.dsl. You can view it with your favorite text editor.

iasl -d dsdt.dat

Analyzing the Firmware

Get a list of ACPI methods

acpiexec -b Methods dsdt.dat
Example Output
[...]
\_SB.PC00.LPCB.EC0._REG Method       0x5e8056d96f60 001 Args 2 Len 002D Aml 0x7564f4170c19
\_SB.PC00.LPCB.EC0.CMDW Method       0x5e8056d97050 001 Args 2 Len 004E Aml 0x7564f4170c4e
\_SB.PC00.LPCB.EC0.FANG Method       0x5e8056da2610 001 Args 1 Len 0009 Aml 0x7564f4171377
\_SB.PC00.LPCB.EC0.FANW Method       0x5e8056da2780 001 Args 2 Len 0008 Aml 0x7564f4171387
\_SB.PC00.LPCB.EC0.TUVR Method       0x5e8056da9940 001 Args 1 Len 0003 Aml 0x7564f4171396
\_SB.PC00.LPCB.EC0.THRO Method       0x5e8056da9a30 001 Args 1 Len 0005 Aml 0x7564f41713a0
\_SB.PC00.LPCB.EC0.CLCK Method       0x5e8056da9b20 001 Args 1 Len 0024 Aml 0x7564f41713ac
\_SB.PC00.LPCB.EC0.PCLK Method       0x5e8056da9c10 001 Args 0 Len 0004 Aml 0x7564f41713d7
\_SB.PC00.LPCB.EC0.ITHR Method       0x5e8056da9d00 001 Args 1 Len 0026 Aml 0x7564f41713e2
\_SB.PC00.LPCB.EC0.IPCL Method       0x5e8056da9df0 001 Args 0 Len 0010 Aml 0x7564f417140f
[...]

Get a list of registers

acpiexec -b 'Objects RegionField' dsdt.dat
Example Output
[...]
\_SB.PC00.LPCB.EC0.ERIB RegionField  0x60093e6470b0 001 Rgn [ECMM] Off 2E8 Len 10 Acc 01
\_SB.PC00.LPCB.EC0.SMST RegionField  0x60093e647120 001 Rgn [ECMM] Off 308 Len 08 Acc 01
\_SB.PC00.LPCB.EC0.SMAD RegionField  0x60093e647190 001 Rgn [ECMM] Off 310 Len 08 Acc 01
\_SB.PC00.LPCB.EC0.SMCM RegionField  0x60093e647200 001 Rgn [ECMM] Off 318 Len 08 Acc 01
\_SB.PC00.LPCB.EC0.SMD0 RegionField  0x60093e647270 001 Rgn [ECMM] Off 320 Len 100 Acc 01
\_SB.PC00.LPCB.EC0.BCNT RegionField  0x60093e6472e0 001 Rgn [ECMM] Off 420 Len 08 Acc 01
\_SB.PC00.LPCB.EC0.SMAA RegionField  0x60093e647350 001 Rgn [ECMM] Off 428 Len 18 Acc 01
[...]

The offset (Off) is specified in bits (hexadecimal). To convert the bit offset into a byte offset and bit position, we open python or ipython and divide the offset by 8, then take the modulo 8:

~ > python
Python 3.13.5 (main, Jun 21 2025, 09:35:00) [GCC 15.1.1 20250425] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 0x2E8 // 8
93
>>> 0x2E8 % 8
0

This yields register number 93 and a bit offset of 0.

Finding Methods and Registers

When reading your DSDT, try to identify registers and methods with names like:

Registers: SFAN, CFAN, PFAN, FAN1, FSW1, RPM1, RPM2
Methods: FANG, FANW, GFSD, SFSD, SFNV, FRSP

Probing Registers and Methods

You can access EC registers and invoke ACPI methods using the ec_probe tool:

Reading a register

sudo ec_probe read 0xD6

For a two-byte register:

sudo ec_probe read -w 0xD6

Writing to a register

sudo ec_probe write 0xD7 0x0

For a two-byte register:

sudo ec_probe write -w 0xD7 0xDEAD

Calling ACPI methods

You can also invoke ACPI methods:

sudo ec_probe acpi_call '\_SB.PCI0.LPCB.EC0.GFSD'

With arguments:

sudo ec_probe acpi_call '\_SB.PCI0.LPCB.EC0.SFSD' 100

Examples

Below are real-world examples, along with a detailed explanation of how the configuration files were created.

Model Registers Methods
HP Pavilion 17 Notebook PC SFAN (write) \_TZ.TZ01.FRSP (read)
Packard Bell EasyNote TK85 \_SB.PCI0.LPCB.EC0.FANG (read), \_SB.PCI0.LPCB.EC0.FANW (write)
HP Laptop 17-bs0xx FAN1 (read), FSW1 (write), FSH1 (misc)
HP 620 CFAN (read), PFAN (write)
Acer Aspire ES1-711 0x55 (read+write)
ASUSTeK COMPUTER INC. X5511CA \_SB.PCI0.LPCB.EC0.RRAM (read), \_SB.PCI0.LPCB.EC0.SFNV (write)