跳转至内容

lm_sensors

来自 ArchWiki
(重定向自 Lm-sensors)

lm_sensors (Linux monitoring sensors) 是一款免费开源应用程序,提供用于监控温度、电压和风扇的工具和驱动程序。本文档将解释如何安装、配置和使用 lm_sensors。

安装

安装 lm_sensors 包。

配置

以 root 用户身份运行 sensors-detect 来检测并生成内核模块列表

警告 下面的命令默认是安全的(在每个提示时按 Enter)。某些高级选项可能会损坏硬件:只有在您了解其含义的情况下才修改默认设置。请参阅 #运行 sensors-detect 后的笔记本屏幕问题
# sensors-detect

它会询问是否探测各种硬件。“安全”的回答就是默认选项,所以只需对所有问题按 Enter 通常不会引起任何问题。这将创建 /etc/conf.d/lm_sensors 配置文件,该文件由 lm_sensors.service 用于在启动时自动加载内核模块。

提示 --auto 标志可用于自动接受 sensors-detect 的所有安全回答。

检测完成后,将显示探测摘要。

示例

# sensors-detect
This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): 
Module cpuid loaded successfully.
Silicon Integrated Systems SIS5595...                       No
VIA VT82C686 Integrated Sensors...                          No
VIA VT8231 Integrated Sensors...                            No
AMD K8 thermal sensors...                                   No
AMD Family 10h thermal sensors...                           No

...

Now follows a summary of the probes I have just done.
Just press ENTER to continue: 

Driver `coretemp':
  * Chip `Intel digital thermal sensor' (confidence: 9)

Driver `lm90':
  * Bus `SMBus nForce2 adapter at 4d00'
    Busdriver `i2c_nforce2', I2C address 0x4c
    Chip `Winbond W83L771AWG/ASG' (confidence: 6)

Do you want to overwrite /etc/conf.d/lm_sensors? (YES/no): 
ln -s '/usr/lib/systemd/system/lm_sensors.service' '/etc/systemd/system/multi-user.target.wants/lm_sensors.service'
Unloading i2c-dev... OK
Unloading cpuid... OK
注意 如果用户在被问及是否生成 /etc/conf.d/lm_sensors 时回答 **YES**,则 systemd 服务会自动启用。回答 **YES** 也会自动启动该服务。

运行 sensors

运行 sensors 的示例

$ sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +35.0°C  (crit = +105.0°C)
Core 1:       +32.0°C  (crit = +105.0°C)

w83l771-i2c-0-4c
Adapter: SMBus nForce2 adapter at 4d00
temp1:        +28.0°C  (low  = -40.0°C, high = +70.0°C)
                       (crit = +85.0°C, hyst = +75.0°C)
temp2:        +37.4°C  (low  = -40.0°C, high = +70.0°C)
                       (crit = +110.0°C, hyst = +100.0°C)

添加 DIMM 温度传感器

要查找 DIMM 的温度传感器,请安装 i2c-tools 包。安装完成后,加载 i2c-dev 内核模块

# modprobe i2c_dev

要显示所有列,请以 root 用户身份使用 i2cdetect

# i2cdetect -l
i2c-2	smbus     	SMBus PIIX4 adapter port 2 at 0b00	SMBus adapter
i2c-2	smbus     	SMBus PIIX4 adapter port 1 at 0b20	SMBus adapter
i2c-0	smbus     	SMBus PIIX4 adapter port 0 at 0b00	SMBus adapter

否则,其输出将显示如下

i2c-2	unknown    	SMBus PIIX4 adapter port 2 at 0b00	N/A
i2c-2	unknown    	SMBus PIIX4 adapter port 1 at 0b20	N/A
i2c-0	unknown    	SMBus PIIX4 adapter port 0 at 0b00	N/A

在以下示例中,RAM 条连接到总线 SMBus 0i2cdetect 命令将显示连接到该总线的设备。-y 0 参数使用 i2c-0 smbus。如果需要,请检查其他总线。

# i2cdetect -y 0
___  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- 0c -- -- -- 
10: 10 -- -- -- -- -- -- -- 18 19 -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- 36 -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 4f 
50: 50 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- 77

RAM 的 SPD(serial presence detect)从地址 0x50 开始,RAM 温度传感器从同一总线上的 0x18 开始。在此示例中,有 2 个 DIMM 可用。地址 0x180x19 是 DIMM 的温度传感器。

要读取 RAM 条的温度,我们需要加载 jc42 内核模块。您需要告诉模块使用哪些地址。此过程包括将 module_nameaddress 写入 smbus_path。例如

# modprobe jc42
# echo jc42 0x18 > /sys/bus/i2c/devices/i2c-0/new_device
# echo jc42 0x19 > /sys/bus/i2c/devices/i2c-0/new_device

之后,您的 RAM 条温度将可见

$ sensors
jc42-i2c-0-19
Adapter: SMBus PIIX4 adapter port 0 at 0b00
temp1:        +50.7°C  (low  =  +0.0°C)                  ALARM (HIGH, CRIT)
                       (high =  +0.0°C, hyst =  +0.0°C)
                       (crit =  +0.0°C, hyst =  +0.0°C)

jc42-i2c-0-18
Adapter: SMBus PIIX4 adapter port 0 at 0b00
temp1:        +51.8°C  (low  =  +0.0°C)                  ALARM (HIGH, CRIT)
                       (high =  +0.0°C, hyst =  +0.0°C)
                       (crit =  +0.0°C, hyst =  +0.0°C)

读取内存模块的 SPD 值(可选)

要读取内存模块的 SPD 时序值,请安装 i2c-tools 包。安装完成后,加载 at24eeprom(已弃用)内核模块

# modprobe at24

最后,使用 decode-dimms 查看内存信息。

这是一台机器的部分输出

# decode-dimms
Memory Serial Presence Detect Decoder
By Philip Edelbrock, Christian Zuckschwerdt, Burkart Lingner,
Jean Delvare, Trent Piepho and others


Decoding EEPROM: /sys/bus/i2c/drivers/eeprom/0-0050
Guessing DIMM is in                             bank 1

---=== SPD EEPROM Information ===---
EEPROM CRC of bytes 0-116                       OK (0x583F)
# of bytes written to SDRAM EEPROM              176
Total number of bytes in EEPROM                 512
Fundamental Memory type                         DDR3 SDRAM
Module Type                                     UDIMM

---=== Memory Characteristics ===---
Fine time base                                  2.500 ps
Medium time base                                0.125 ns
Maximum module speed                            1066MHz (PC3-8533)
Size                                            2048 MB
Banks x Rows x Columns x Bits                   8 x 14 x 10 x 64
Ranks                                           2
SDRAM Device Width                              8 bits
tCL-tRCD-tRP-tRAS                               7-7-7-33
Supported CAS Latencies (tCL)                   8T, 7T, 6T, 5T

---=== Timing Parameters ===---
Minimum Write Recovery time (tWR)               15.000 ns
Minimum Row Active to Row Active Delay (tRRD)   7.500 ns
Minimum Active to Auto-Refresh Delay (tRC)      49.500 ns
Minimum Recovery Delay (tRFC)                   110.000 ns
Minimum Write to Read CMD Delay (tWTR)          7.500 ns
Minimum Read to Pre-charge CMD Delay (tRTP)     7.500 ns
Minimum Four Activate Window Delay (tFAW)       30.000 ns

---=== Optional Features ===---
Operable voltages                               1.5V
RZQ/6 supported?                                Yes
RZQ/7 supported?                                Yes
DLL-Off Mode supported?                         No
Operating temperature range                     0-85C
Refresh Rate in extended temp range             1X
Auto Self-Refresh?                              Yes
On-Die Thermal Sensor readout?                  No
Partial Array Self-Refresh?                     No
Thermal Sensor Accuracy                         Not implemented
SDRAM Device Type                               Standard Monolithic

---=== Physical Characteristics ===---
Module Height (mm)                              15
Module Thickness (mm)                           1 front, 1 back
Module Width (mm)                               133.5
Module Reference Card                           B

---=== Manufacturer Data ===---
Module Manufacturer                             Invalid
Manufacturing Location Code                     0x02
Part Number                                     OCZ3G1600LV2G     

...

使用传感器数据

图形前端

有多种传感器数据的前端。

  • CoolerControl — 用于监控和控制您的散热设备的程序。
https://gitlab.com/coolercontrol/coolercontrol || coolercontrolAUR
  • Netdata — 基于 Web 的系统监视器。
https://github.com/netdata/netdata || netdata
  • psensor — 用于监控硬件传感器的 GTK 应用程序,包括温度和风扇速度。监控主板和 CPU(使用 lm-sensors)、Nvidia GPU(使用 XNVCtrl)以及硬盘(使用 hddtemp 或 libatasmart)。
https://wpitchoune.net/psensor/ || psensor
  • xsensors — lm_sensors 的 X11 接口。
https://github.com/Mystro256/xsensors || xsensors

针对特定桌面环境

  • Freon (GNOME Shell extension) — 用于在 GNOME Shell 中显示 CPU 温度、硬盘温度、显卡温度、电压和风扇 RPM 的扩展。
https://github.com/UshakovVasilii/gnome-shell-extension-freon || gnome-shell-extension-freonAUR
  • GNOME Sensors Applet — 用于 GNOME 面板以显示硬件传感器读数的 Applet,包括 CPU 温度、风扇速度和电压读数。
https://sensors-applet.sourceforge.net/ || sensors-applet
  • lm-sensors (LXPanel 插件) — 通过 lm-sensors 在 LXDE 中监视温度/电压/风扇速度。
https://danamlund.dk/sensors_lxpanel_plugin/ || sensors-lxpanel-pluginAUR
  • MATE Sensors Applet — 在您的 MATE 面板中显示硬件传感器读数。
https://github.com/mate-desktop/mate-sensors-applet || mate-sensors-applet
  • Sensors (Xfce4 panel plugin)Xfce 面板的硬件传感器插件。
https://goodies.xfce.org/projects/panel-plugins/xfce4-sensors-plugin || xfce4-sensors-plugin
  • Thermal Monitor (Plasma applet) — 用于显示系统温度的 KDE Plasmoid。
https://invent.kde.org/olib/thermalmonitor || plasma6-applets-thermal-monitor-gitAUR

sensord

有一个可选的守护进程称为 sensord(包含在 lm_sensors 包中),它可以将数据记录到循环数据库 (rrd) 并在之后进行图形化显示。有关详细信息,请参阅 sensord(8) 手册页。

技巧与提示

调整数值

在某些情况下,显示的数据可能不正确,或者用户可能希望重命名输出。用例包括

  • 由于错误的偏移量导致温度值不正确(例如,报告的温度比实际高 20 °C)。
  • 用户希望重命名某些传感器的输出。
  • 核心可能以不正确的顺序显示。

以上所有(以及更多)都可以通过在 /etc/sensors3.conf 中创建 /etc/sensors.d/foo 来覆盖软件包提供的设置,其中任意数量的调整都可以覆盖默认值。建议将“foo”重命名为声卡品牌和型号,但此命名约定是可选的。

lm_sensors 包的 configs 目录中包含许多主板的自定义配置文件,可用作模板。

注意 请勿直接编辑 /etc/sensors3.conf,因为软件包更新会覆盖任何更改,从而导致丢失。

要应用配置,请运行带 -s, --set 标志的 sensors

# sensors -s

示例 1. 调整温度偏移

这是 Zotac ION-ITX-A-U 主板上的一个实际示例。coretemp 值偏移 20 °C(过高),并根据 Intel 规范进行了调整。

$ sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +57.0°C  (crit = +125.0°C)
Core 1:       +55.0°C  (crit = +125.0°C)
...

运行带 -u 开关的 sensors 以查看每个物理芯片可用的选项(原始模式)。如果您看到的某些原始标签似乎无法配置,请查看 /sys/class/hwmon 目录树。那里提到的每个设备都有一个 name 文件,可用于匹配它所引用的设备。然后尝试该目录引用的标签。

$ sensors -u
coretemp-isa-0000
Adapter: ISA adapter
Core 0:
  temp2_input: 57.000
  temp2_crit: 125.000
  temp2_crit_alarm: 0.000
Core 1:
  temp3_input: 55.000
  temp3_crit: 125.000
  temp3_crit_alarm: 0.000
...

创建以下文件来覆盖默认值

/etc/sensors.d/Zotac-IONITX-A-U
chip "coretemp-isa-0000"
  label temp2 "Core 0"
  compute temp2 @-20,@-20

  label temp3 "Core 1"
  compute temp3 @-20,@-20

现在调用 sensors 将显示调整后的值

$ sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +37.0°C  (crit = +105.0°C)
Core 1:       +35.0°C  (crit = +105.0°C)
...

示例 2. 重命名标签

这是 Asus A7M266 上的一个实际示例。用户希望为温度标签 temp1temp2 提供更详细的名称。

$ sensors
as99127f-i2c-0-2d
Adapter: SMBus Via Pro adapter at e800
...
temp1:        +35.0°C  (high =  +0.0°C, hyst = -128.0°C)
temp2:        +47.5°C  (high = +100.0°C, hyst = +75.0°C)
...

创建以下文件以覆盖默认值

/etc/sensors.d/Asus_A7M266
chip "as99127f-*"
  label temp1 "Mobo Temp"
  label temp2 "CPU0 Temp"

现在调用 sensors 将显示调整后的值

$ sensors
as99127f-i2c-0-2d
Adapter: SMBus Via Pro adapter at e800
...
Mobo Temp:        +35.0°C  (high =  +0.0°C, hyst = -128.0°C)
CPU0 Temp:        +47.5°C  (high = +100.0°C, hyst = +75.0°C)
...

示例 3. 为多 CPU 系统重编号核心

这是 HP Z600 工作站(带双 Xeon)上的一个实际示例。物理核心的实际编号不正确:编号为 0、1、9、10,这在第二台 CPU 中是重复的。大多数用户期望核心温度按顺序报告,即 0、1、2、3、4、5、6、7。

$ sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +65.0°C  (high = +85.0°C, crit = +95.0°C)
Core 1:       +65.0°C  (high = +85.0°C, crit = +95.0°C)
Core 9:       +66.0°C  (high = +85.0°C, crit = +95.0°C)
Core 10:      +66.0°C  (high = +85.0°C, crit = +95.0°C)

coretemp-isa-0004
Adapter: ISA adapter
Core 0:       +54.0°C  (high = +85.0°C, crit = +95.0°C)
Core 1:       +56.0°C  (high = +85.0°C, crit = +95.0°C)
Core 9:       +60.0°C  (high = +85.0°C, crit = +95.0°C)
Core 10:      +61.0°C  (high = +85.0°C, crit = +95.0°C)
...

再次运行带 -u 开关的 sensors 以查看每个物理芯片可用的选项。

$ sensors -u coretemp-isa-0000
coretemp-isa-0000
Adapter: ISA adapter
Core 0:
  temp2_input: 61.000
  temp2_max: 85.000
  temp2_crit: 95.000
  temp2_crit_alarm: 0.000
Core 1:
  temp3_input: 61.000
  temp3_max: 85.000
  temp3_crit: 95.000
  temp3_crit_alarm: 0.000
Core 9:
  temp11_input: 62.000
  temp11_max: 85.000
  temp11_crit: 95.000
Core 10:
  temp12_input: 63.000
  temp12_max: 85.000
  temp12_crit: 95.000
$ sensors -u coretemp-isa-0004
coretemp-isa-0004
Adapter: ISA adapter
Core 0:
  temp2_input: 53.000
  temp2_max: 85.000
  temp2_crit: 95.000
  temp2_crit_alarm: 0.000
Core 1:
  temp3_input: 54.000
  temp3_max: 85.000
  temp3_crit: 95.000
  temp3_crit_alarm: 0.000
Core 9:
  temp11_input: 59.000
  temp11_max: 85.000
  temp11_crit: 95.000
Core 10:
  temp12_input: 59.000
  temp12_max: 85.000
  temp12_crit: 95.000
...

创建以下文件来覆盖默认值

/etc/sensors.d/HP_Z600
chip "coretemp-isa-0000"
  label temp2 "Core 0"
  label temp3 "Core 1"
  label temp11 "Core 2"
  label temp12 "Core 3"

chip "coretemp-isa-0004"
  label temp2 "Core 4"
  label temp3 "Core 5"
  label temp11 "Core 6"
  label temp12 "Core 7"

现在调用 sensors 将显示调整后的值

$ sensors
coretemp-isa-0000
Adapter: ISA adapter
Core0:        +64.0°C  (high = +85.0°C, crit = +95.0°C)
Core1:        +63.0°C  (high = +85.0°C, crit = +95.0°C)
Core2:        +65.0°C  (high = +85.0°C, crit = +95.0°C)
Core3:        +66.0°C  (high = +85.0°C, crit = +95.0°C)

coretemp-isa-0004
Adapter: ISA adapter
Core4:        +53.0°C  (high = +85.0°C, crit = +95.0°C)
Core5:        +54.0°C  (high = +85.0°C, crit = +95.0°C)
Core6:        +59.0°C  (high = +85.0°C, crit = +95.0°C)
Core7:        +60.0°C  (high = +85.0°C, crit = +95.0°C)
...

自动部署 lm_sensors

希望在多台机器上部署 lm_sensors 的用户可以使用以下命令接受所有问题的默认值。

# sensors-detect --auto

S.M.A.R.T. 硬盘温度

自内核 5.6[1] 以来,drivetemp 模块将通过 hwmon 报告 SATA/SAS 温度,但 sensors-detect 不会自动检测到此,因此必须手动加载该模块。

# modprobe drivetemp

您现在应该会在 sensors 输出中看到类似以下的条目

sensors
drivetemp-scsi-1-0
Adapter: SCSI adapter
temp1:        +33.0°C 

drivetemp-scsi-2-0
Adapter: SCSI adapter
temp1:        +32.0°C  (low  =  +0.0°C, high = +70.0°C)
                       (crit low =  +0.0°C, crit = +70.0°C)
                       (lowest = +29.0°C, highest = +41.0°C)

您现在可以在启动时加载模块。或者,手动将其添加到 /etc/conf.d/lm_sensorsHWMON_MODULES 行。请注意,当 sensors-detect 再次允许写入此文件时,它不会自动添加。

持久化设备名称

许多软件期望传感器设备固定在 /sys/class/hwmon/hwmonX 中,但在拥有超过 1-2 个提供 hwmon 接口的设备时,情况并非如此。软件可能应该解析 hwmon?/name 或使用 lmsensors 库,但遗憾的是,它们通常不会这样做。一些软件(例如:Monitorix 或其某些模块,特别是 amdgpu)需要其他位置的持久化名称。

因此,以下类型的 udev 规则可能很有用。并非所有软件都能使用它们(例如,KDE 系统监视器 - 可悲的是,这使得这些软件在许多系统上几乎无用)。在许多情况下,仅匹配 hwmon 子系统和 udev 规则中的合适名称就足够了 - 但并非总是如此!有关编写规则的更多信息,请参阅 Udev 页面。

不能在 /sys 层级结构下重命名或创建符号链接。SYMLINK+= 语句也不会起作用。因此,我们需要使用 RUN+= 语句(请注意,符号链接不需要像此示例一样位于 /dev 下 - 它们没有标准的位置,也没有好的位置)。

/etc/udev/rules.d/99-persistent-hwmon-names.rules
# my motherboard sensor chip:
ACTION=="add", SUBSYSTEM=="hwmon", ATTRS{name}=="nct6687", RUN+="/bin/sh -c 'ln -s /sys$devpath /dev/nct6678'"
# a USB device providing sensors:
ACTION=="add", SUBSYSTEM=="hwmon", ATTRS{name}=="corsaircpro", RUN+="/bin/sh -c 'ln -s /sys$devpath /dev/corsaircpro'"
# my GPU:
ACTION=="add", SUBSYSTEM=="hwmon", ATTRS{vendor}=="0x1002", ATTRS{device}=="0x73bf", RUN+="/bin/sh -c 'ln -s /sys$devpath /dev/rx6900xt'"

故障排除

K10Temp 模块

某些 K10 处理器在其温度传感器方面存在问题。有关更多信息,请参阅 k10temp 文档

在受影响的机器上,模块将报告“不可靠的 CPU 热传感器;监控已禁用”。要强制进行监控,您可以运行以下命令:

# rmmod k10temp
# modprobe k10temp force=1

确认传感器确实有效且可靠。如果是,可以编辑 /etc/modprobe.d/k10temp.conf 并添加:

options k10temp force=1

这将允许模块在启动时加载。

Asus B450M-A/A320M-K/A320M-K-BR 和 Biostar B650EGTQ 主板

这些主板使用 IT8655E (Asus) 和 IT8625E (Biostar) 芯片,截至 2025 年 4 月,it87 内核驱动程序不支持该芯片 [2]。但是,它得到了内核驱动程序上游版本的支持 [3]。DKMS 变体包含在 it87-dkms-gitAUR 中。该驱动程序必须与匹配的 lm_sensors-it87-gitAUR 一起使用。

配备 AM4 插槽的 Asus B450/X399/X470 主板

一些较新的 Asus 主板使用 ITE IT8665E 芯片,访问温度、风扇和电压传感器可能需要 asus-wmi-sensors 模块。自 5.17 版本起,它已成为主线内核的一部分:加载 asus-wmi-sensors 内核模块,它使用 UEFI 接口,并且可能需要某些主板的 BIOS 更新 [4]

或者,it87 模块直接读取芯片的值,安装 it87-dkms-gitAUR 并加载 it87 内核模块

配备 AM5 插槽的 Biostar B650 主板

ASUS H97/Z97/Z170/Z370i/X570/B550/B650-PLUS/X670 主板

对于一些较新的 ASUS 主板,风扇和电压传感器访问可能需要加载 nct6775 内核模块

您可能还需要添加以下内核参数

acpi_enforce_resources=lax

有关更多信息,请参阅 https://bugzilla.kernel.org/show_bug.cgi?id=204807

注意内核 5.16 开始,对于大多数主板,该参数不再需要,并且应避免使用。

Asrock Deskmini H470

Deskmini H470 的 STX 板使用 NCT6683 芯片,要访问温度、风扇和电压传感器,需要加载 nct6683 模块。

为了使 nct6683 模块获得正确的值,需要创建一个模块配置文件

/etc/modprobe.d/nct6683.conf
options nct6683 force=1

Gigabyte B250/Z370/B450M/B560M/B660M/Z690/B550 主板

一些 Gigabyte 主板使用了 ITE IT8686E、ITE8689(适用于 B560 和 B660M)或 ITE8689E(适用于 Z690 和 B550)芯片,截至 2019 年 5 月,it87 内核驱动程序不支持该芯片 [5]。然而,它得到了内核驱动程序上游版本的支持 [6]DKMS 变体包含在 it87-dkms-gitAUR 中。与#ASUS H97/Z97/Z170/Z370i/X570/B550/B650-PLUS/X670 主板一样,在尝试安装模块之前需要一个内核参数

acpi_enforce_resources=lax

此外,在加载模块时提供芯片的 ID,如下所示:

# modprobe it87 force_id=0x8686

或者

# modprobe it87 force_id=0x8689  # for B560
# modprobe it87 force_id=0x8628  # for Z690 and B550

或者,您可以在启动时加载模块,方法是创建以下两个文件:

/etc/modules-load.d/it87.conf
it87

对于 Z690 和 B550

/etc/modprobe.d/it87.conf
options it87 force_id=0x8628

对于其他

/etc/modprobe.d/it87.conf
options it87 ignore_resource_conflict=1

模块加载后,您可以使用 sensors 工具探测芯片。现在您也可以使用 fancontrol 来控制机箱风扇的速度步长。

可选地安装 zenpower3-dkmsAUR 可能会允许更精细地调整主板的冷却系统。但是,它会禁用默认的 k10temp 模块。

Gigabyte GA-J1900N-D3V

该主板使用 ITE IT8620E 芯片(也用于读取电压、主板温度、风扇速度),并且得到 it87 内核模块的支持[7]

您可以使用 modprobe 在运行时加载模块:

$ modprobe it87 force_id=0x8728

或者,您可以在启动时加载模块,方法是创建以下两个文件:

/etc/modules-load.d/it87.conf
it87
/etc/modprobe.d/it87.conf
options it87 force_id=0x8603

模块加载后,您可以使用 sensors 工具探测芯片。

现在您也可以使用 fancontrol 来控制机箱风扇的速度步长。

MAG B650 TOMAHAWK WIFI (MS-7D75)/MAG B550 MORTAR WIFI (MS-7C94)

这些主板使用 Nuvoton NCT6687-R 芯片进行风扇、电压和温度读数。您需要内核模块 nct6687d-dkms-gitAUR 来访问这些值。

提示 如果您之前运行过 sensors-detect,它很可能配置了另一个 nuvoton 模块自动加载。您可以更新 /etc/conf.d/lm_sensors 中的模块名称以在启动时加载该模块。

安装完成后,您可以加载模块:

$ modprobe nct6687

然后检查 sensors 的输出

$ sensors

Asrock B650M Pro RS / B850M Pro RS / B850M Steel Legend WiFi / X870 Pro RS

这些主板使用 Nuvoton NCT6796D-S 进行风扇、电压和温度读数。该芯片的这个特定变体具有不同的 ID,因此在没有模块配置文件的情况下无法检测到。

/etc/modprobe.d/nct6775.conf
options nct6775 force_id=0xd801

Asrock B650M PG Lightning

该主板使用 Nuvoton NCT6796D-S 进行风扇、电压和温度读数。该芯片的这个特定变体具有不同的 ID,因此在没有模块配置文件的情况下无法检测到。

/etc/modprobe.d/nct6775.conf
options nct6775 force_id=0xd802

运行 sensors-detect 后的笔记本屏幕问题

这是由于 lm-sensors 在探测传感器时修改了屏幕的 Vcom 值引起的。它已经在论坛上进行了讨论和解决:https://bbs.archlinux.org/viewtopic.php?id=193048。但是,在运行任何建议的命令之前,请务必仔细阅读该帖子。

Asrock X870 Steel Legend WiFi / B650I Lightning WiFi

这些主板使用较新的 Nuvoton NCT6686D 以及 NCT6796S 进行风扇、电压和温度读数。nct6683 驱动程序文档指出,该驱动程序仅在 Intel CPU 上实例化。AMD CPU 需要将 force 设置为 1

/etc/modules-load.d/nct6683.conf
nct6683
/etc/modprobe.d/nct6683.conf
options nct6683 force=1

Asrock B650E Taichi Lite

该主板使用 Nuvoton NCT6686D 以及 NCT6796S 进行风扇、电压和温度读数。AMD CPU 需要将 force 设置为 1

/etc/modules-load.d/taichi-lite-sensors.conf
nct6683
nct6775
/etc/modprobe.d/taichi-lite-sensors.conf
# nct6686D -> nct6683
options nct6683 force=1

# nct6796-S -> nct6775
options nct6775 force=1

Asrock B850I Lightning

该主板使用 Nuvoton NCT6686D 进行风扇、电压和温度读数。可以使用 nct6687d-dkms-gitAUR 模块 nct6687d

/etc/modules-load.d/sensors.conf
nct6687