首页 技术 正文
技术 2022年11月15日
0 收藏 550 点赞 5,027 浏览 3829 个字

Fix – sort of – for LM-Sensors unable to load driver module

In short:

In /etc/default/grub set

GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_enforce_resources=lax"

then do

# update-grub; reboot

And be prepared for some ACPI trouble.

LM-Sensors unable to load driver module

On many of my systems with recent kernels sensord does no more provide full information:

# sensors
acpitz-virtual-0
Adapter: Virtual device
temp1:       +50.5 C  (crit = +80.0 C)

This is due to buggy ACPI BIOSses which never will get fixed as those are long term out of any support.

The symptoms are:

# sensors-detect
[..]
Driver `w83627hf':
  * ISA bus, address 0x290
    Chip `Winbond W83697HF/F/HG Super IO Sensors' (confidence: 9)
To load everything that is needed, add this to /etc/modules:
#----cut here----
# Chip drivers
w83627hf
#----cut here----

but

# modprobe w83627hf
FATAL: Error inserting w83627hf (/lib/modules/2.6.32-5-686/kernel/drivers/hwmon/w83627hf.ko): Device or resource busy

Usually the power resources and other thermal information should show up in /proc/acpi, but often you just get the CPU information, nothing else. This is because the ACPI part of the BIOS claims the resource, but does not provide appropriate information.

This is a BIOS bug, not a kernel bug. The kernel does the right thing: Protect the ACPI regions against other drivers accessing them, as this can lead to serious problems.

If you know what you are doing – and faulty ACPI BIOSses apparently do not – you can add a commandline option to the Linux kernel to relax this ACPI check:

vi /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_enforce_resources=lax"

Note that you must add "acpi_enforce_resources=lax" to the DEFAULT commandline. Other settings present there should still be kept. Then do:

update-grub

However you are living in danger then. Having said that you must know, that this was the previous behavior of Linux until this problem was noted and fixed. So there always was ACPI present and you lived in danger, the kernel just did not protect you.

The trick is, to only load this on the DEFAULT commandline, such that it is not present in recovery mode. Hence you still can boot into recovery in case there is some driver conflict with ACPI.

Before

# sensors
acpitz-virtual-0
Adapter: Virtual device
temp1:       +50.5 C  (crit = +80.0 C)

After

# sensors
acpitz-virtual-0
Adapter: Virtual device
temp1:       +48.0 C  (crit = +80.0 C)
w83697hf-isa-0290
Adapter: ISA adapter
in0:         +1.71 V  (min =  +0.13 V, max =  +0.00 V)   ALARM
in2:         +3.20 V  (min =  +0.00 V, max =  +1.15 V)   ALARM
in3:         +3.02 V  (min =  +0.03 V, max =  +2.06 V)   ALARM
in4:         +3.01 V  (min =  +0.00 V, max =  +1.54 V)   ALARM
in5:         +0.67 V  (min =  +0.06 V, max =  +2.05 V)
in6:         +0.91 V  (min =  +1.04 V, max =  +1.02 V)   ALARM
in7:         +3.30 V  (min =  +2.18 V, max =  +0.00 V)   ALARM
in8:         +3.34 V  (min =  +0.19 V, max =  +1.06 V)   ALARM
fan1:       2163 RPM  (min =   -1 RPM, div = 8)  ALARM
fan2:       3013 RPM  (min = 1155 RPM, div = 8)
temp1:       +35.0 C  (high = +16.0 C, hyst = +22.0 C)  ALARM  sensor = thermistor
temp2:       +48.0 C  (high = +80.0 C, hyst = +75.0 C)  sensor = diode
beep_enable:enabled

However as you can see, something still is wrong now. Most limits are really wrong, hence they alarm.

Before they were (however on a different mainboard):

Oct 13 16:41:24 hydra sensord: Chip: w83697hf-isa-0290
Oct 13 16:41:24 hydra sensord: Adapter: ISA adapter
Oct 13 16:41:24 hydra sensord:   in0: +1.74 V (min = +1.57 V, max = +1.73 V) [ALARM]
Oct 13 16:41:24 hydra sensord:   in2: +3.23 V (min = +3.14 V, max = +3.47 V)
Oct 13 16:41:24 hydra sensord:   in3: +3.04 V (min = +2.83 V, max = +3.12 V)
Oct 13 16:41:24 hydra sensord:   in4: +3.04 V (min = +2.85 V, max = +3.47 V)
Oct 13 16:41:24 hydra sensord:   in5: +0.66 V (min = +0.34 V, max = +0.80 V)
Oct 13 16:41:24 hydra sensord:   in6: +0.86 V (min = +0.78 V, max = +0.94 V)
Oct 13 16:41:24 hydra sensord:   in7: +3.28 V (min = +2.83 V, max = +3.12 V) [ALARM]
Oct 13 16:41:24 hydra sensord:   in8: +3.31 V (min = +2.40 V, max = +3.60 V)
Oct 13 16:41:24 hydra sensord:   fan1: 3924 RPM (min = 2343 RPM, div = 8)
Oct 13 16:41:24 hydra sensord:   fan2: 4218 RPM (min = 1155 RPM, div = 8)
Oct 13 16:41:24 hydra sensord:   temp1: 30.0 C (limit = 75.0 C, hysteresis = 55.0 C)
Oct 13 16:41:24 hydra sensord:   temp2: 44.5 C (limit = 80.0 C, hysteresis = 75.0 C)
Oct 13 16:41:24 hydra sensord:   beep_enable: Sound alarm enabled

So apparently at my side the readings seem correct, but the limits not. That is not a problem for me. I need the readings, the rest I can do/fix myself.

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,074
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,551
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,399
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,176
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,811
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,892