N5105 PVE 修复 风扇

前言

这几天把自己的电脑换了下,升级了下配置,清理东西的时候,发现之前重装完pve的n5105的风扇声不太对劲,就是突然风特别大,然后又停下来,一直反复。后来发现应该是没有检测到风扇的数据,所以导致有点问题。这里记录下编译cpu风扇的驱动并获取数据的命令。

编译驱动

首先先去git上拉一下:

https://github.com/a1wong/it87

然后安装一下相关编译依赖:

apt -y update

apt -y install dkms make gcc build-essential libelf-dev lm-sensors

然后根据自己的系统版本号安装下pve的头文件

uname -r
# 应该会输出下面这样的代码
6.5.13-1-pve

# 搜索相应版本号的头文件
apt search 6.5.13-1

# 安装一下
apt install pve-headers-6.5.13-1-pve

切换目录,开始编译,速度很快

cd /opt/it87

make clean && make && make install

然后加载一下驱动,并添加开机自动添加

modprobe it87

echo "it87" > /etc/modules-load.d/it87.conf

刷新sensors,一般都直接y就可以了,最后面的有个添加自启的去内核文件,我已经添加过了,我直接选的N。

sensors-detect

root@xixi:~# sensors-detect 
# sensors-detect version 3.6.0
# System: Default string Default string [Default string]
# Kernel: 6.5.13-1-pve x86_64
# Processor: Intel(R) Celeron(R) N5105 @ 2.00GHz (6/156/0)

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): y
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
AMD Family 11h thermal sensors...                           No
AMD Family 12h and 14h thermal sensors...                   No
AMD Family 15h thermal sensors...                           No
AMD Family 16h thermal sensors...                           No
AMD Family 17h thermal sensors...                           No
AMD Family 15h power sensors...                             No
AMD Family 16h power sensors...                             No
Hygon Family 18h thermal sensors...                         No
Intel digital thermal sensor...                             Success!
    (driver `coretemp')
Intel AMB FB-DIMM thermal sensor...                         No
Intel 5500/5520/X58 thermal sensor...                       No
VIA C7 thermal sensor...                                    No
VIA Nano thermal sensor...                                  No

Some Super I/O chips contain embedded sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no): y
Probing for Super-I/O at 0x2e/0x2f
Trying family `National Semiconductor/ITE'...               No
Trying family `SMSC'...                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek'...               No
Trying family `ITE'...                                      Yes
Found `ITE IT8613E Super IO Sensors'                        Success!
    (address 0xa30, driver `to-be-written')
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor/ITE'...               No
Trying family `SMSC'...                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek'...               No
Trying family `ITE'...                                      No

Some systems (mainly servers) implement IPMI, a set of common interfaces
through which system health data may be retrieved, amongst other things.
We first try to get the information from SMBIOS. If we don't find it
there, we have to read from arbitrary I/O ports to probe for such
interfaces. This is normally safe. Do you want to scan for IPMI
interfaces? (YES/no): y
Probing for `IPMI BMC KCS' at 0xca0...                      No
Probing for `IPMI BMC SMIC' at 0xca8...                     No

Some hardware monitoring chips are accessible through the ISA I/O ports.
We have to write to arbitrary I/O ports to probe them. This is usually
safe though. Yes, you do have ISA I/O ports even if you do not have any
ISA slots! Do you want to scan the ISA I/O ports? (yes/NO): y
Probing for `National Semiconductor LM78' at 0x290...       No
Probing for `National Semiconductor LM79' at 0x290...       No
Probing for `Winbond W83781D' at 0x290...                   No
Probing for `Winbond W83782D' at 0x290...                   No

Lastly, we can probe the I2C/SMBus adapters for connected hardware
monitoring devices. This is the most risky part, and while it works
reasonably well on most systems, it has been reported to cause trouble
on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no): y
Found unknown SMBus adapter 8086:4da3 at 0000:00:1f.4.
Sorry, no supported PCI bus adapters found.

Next adapter: SMBus I801 adapter at efa0 (i2c-0)
Do you want to scan it? (yes/NO/selectively): y
Client found at address 0x50
Handled by driver `ee1004' (already loaded), chip type `ee1004'
    (note: this is probably NOT a sensor chip!)

Next adapter: Synopsys DesignWare I2C adapter (i2c-1)
Do you want to scan it? (YES/no/selectively): y
Adapter doesn't support all probing functions.
Some addresses won't be probed.

Next adapter: Synopsys DesignWare I2C adapter (i2c-2)
Do you want to scan it? (YES/no/selectively): y
Adapter doesn't support all probing functions.
Some addresses won't be probed.


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 `to-be-written':
  * ISA bus, address 0xa30
    Chip `ITE IT8613E Super IO Sensors' (confidence: 9)

Note: there is no driver for ITE IT8613E Super IO Sensors yet.
Check https://hwmon.wiki.kernel.org/device_support_status for updates.

To load everything that is needed, add this to /etc/modules:
#----cut here----
# Chip drivers
coretemp
#----cut here----
If you have some drivers built into your kernel, the list above will
contain too many modules. Skip the appropriate ones!

Do you want to add these lines automatically to /etc/modules? (yes/NO)n

Unloading cpuid... OK

最后检查下sensors有没有东西:

图片[1]-N5105 PVE 修复 风扇-西西のBlog

出现了fan2 fan3基本就是正常了,说明已经有风扇的数据出来了。

然后去外面看,我的机器已经正常在满速开风扇了。后续再看看有没有可以优化的地方

结束

最近好懒啊,啥都不想动,但还是起来写了一份。记录下。

© 版权声明
THE END
喜欢就支持一下吧
点赞9 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容