PDA

View Full Version : lm_sensors and wrong temperature



axel
10th June 2007, 04:30 PM
Under F7 I run sensors-detect and got this output:


To make the sensors modules behave correctly, add these lines to
/etc/modprobe.conf:

#----cut here----
# I2C module options
alias char-major-89 i2c-dev
#----cut here----

To load everything that is needed, add this to some /etc/rc* file:

#----cut here----
# I2C adapter drivers
modprobe i2c-viapro
# Chip drivers
modprobe eeprom
modprobe k8temp
# sleep 2 # optional
/usr/bin/sensors -s # recommended
#----cut here----

If you have some drivers built into your kernel, the list above will
contain too many modules. Skip the appropriate ones! You really
should try these commands right now to make sure everything is
working properly. Monitoring programs won't work until the needed
modules are loaded.

Do you want to overwrite /etc/sysconfig/lm_sensors? (YES/no): y


So I copied the 1st snippet to /etc/modprobe.conf



[axel@aeris ~]$ sudo cat /etc/modprobe.conf
alias eth0 r8169
alias scsi_hostadapter pata_via
alias snd-card-0 snd-via82xx
options snd-card-0 index=0
options snd-via82xx index=0
#----cut here----
# I2C module options
alias char-major-89 i2c-dev
#----cut here----

and the 2nd one to /etc/rc.local


[axel@aeris ~]$ sudo cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

#----cut here----
# I2C adapter drivers
modprobe i2c-viapro
# Chip drivers
modprobe eeprom
modprobe k8temp
# sleep 2 # optional
/usr/bin/sensors -s # recommended
#----cut here----


Logged out and then back in and checked the output of sensors.


[axel@aeris ~]$ sensors
k8temp-pci-00c3
Adapter: PCI adapter
Core0 Temp:
+37C

However this is contradicting to acpi's output.


[axel@aeris ~]$ cat /proc/acpi/thermal_zone/THRC/temperature
temperature: 47 C
[axel@aeris ~]$ cat /proc/acpi/thermal_zone/THRS/temperature
temperature: 48 C


Moreover sensors doesn't show my hdd or nvidia temperatures. Any ideas what could be wrong?




[axel@aeris ~]$ /sbin/lsmod | sort
ac 9413 0
ac97_bus 6465 1 snd_ac97_codec
ata_generic 12101 0
autofs4 24645 2
battery 14149 0
button 12113 0
cdrom 37217 1 sr_mod
cpufreq_ondemand 11981 1
crc_ccitt 6337 1 irda
dm_mirror 24405 0
dm_mod 57485 2 dm_mirror,dm_multipath
dm_multipath 21705 0
dock 13669 0
edac_mc 27665 1 k8_edac
eeprom 11217 0
ehci_hcd 35405 0
ext3 125385 2
fw_core 42625 1 fw_ohci
fw_ohci 19649 0
gameport 19017 1 snd_via82xx
hwmon 7365 1 k8temp
i2c_core 24641 4 eeprom,i2c_ec,nvidia,i2c_viapro
i2c_ec 9281 1 sbs
i2c_viapro 12501 0
ipv6 276673 8
irda 118009 1 via_ircc
jbd 59881 1 ext3
joydev 13441 0
k8_edac 17921 0
k8temp 9537 0
libata 115417 2 pata_via,ata_generic
loop 19785 0
lp 15977 0
mbcache 12357 1 ext3
Module Size Used by
nvidia 6843476 22
ohci_hcd 23749 0
parport 38025 2 lp,parport_pc
parport_pc 29797 1
pata_via 15429 3
pcspkr 7105 0
r8169 33225 0
sbs 19173 0
scsi_mod 137549 4 sr_mod,sg,libata,sd_mod
sd_mod 23873 4
serio_raw 10821 0
sg 37213 0
snd 53189 13 snd_via82xx,snd_seq_oss,snd_seq,snd_via82xx_modem, snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,s nd_timer,snd_mpu401_uart,snd_rawmidi,snd_seq_devic e
snd_ac97_codec 96357 2 snd_via82xx,snd_via82xx_modem
snd_mixer_oss 19393 3 snd_pcm_oss
snd_mpu401_uart 12225 1 snd_via82xx
snd_page_alloc 13769 3 snd_via82xx,snd_via82xx_modem,snd_pcm
snd_pcm 74565 5 snd_via82xx,snd_via82xx_modem,snd_ac97_codec,snd_p cm_oss
snd_pcm_oss 43489 0
snd_rawmidi 26561 1 snd_mpu401_uart
snd_seq 50353 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device 11852 4 snd_seq_dummy,snd_seq_oss,snd_seq,snd_rawmidi
snd_seq_dummy 7877 0
snd_seq_midi_event 11073 1 snd_seq_oss
snd_seq_oss 33345 0
snd_timer 24773 2 snd_seq,snd_pcm
snd_via82xx 30937 2
snd_via82xx_modem 18633 1
soundcore 11553 3 snd
sr_mod 20197 0
uhci_hcd 26833 0
via_ircc 24021 0
video 21065 0

Brian1
10th June 2007, 04:52 PM
Depending on the sensors one may have to customize it to read correctly. Its been a while since doing that so I can't remember. For hhd temp I use hddtemp. No idea on nvidia but from a quick google search it appears to be part of the driver package.

For a tyan s2462 board I used they had a /etc/sensors.conf file for it. This is it.


################################################## ########################
# Sensors configuration file used by 'libsensors' for Tyan S2462 #
# #
# To your /etc/modules.conf file, add the lines: #
# alias char-major-89 i2c-dev #
# options w83781d force_w83782d=0,0x2d force_subclients=0,0x2d,0x48,0x49 force_w83627hf=0,0x2c force_subclients=0,0x2c,0x4a,0x4b init=0 #
# #
# To your /etc/rc.xxx files, add the lines: #
# modprobe i2c-amd756 #
# modprobe w83781d #
# modprobe eeprom #
# sensors -s #
# #
# Then copy this file to /etc/sensors.conf #
# #
# Edited by: kevin schlichter <kevins@tyan.com> 05.16.03 #
# UPDATE: 06.18.03 => monitor fan3 on 627hf, set vrm 9.0, renamed some #
# fan labels, add compute lines for fans, initialize fan_div since the #
# BIOS doesn't. You may also want to check tickets 861 & 867 on the #
# lm_sensors website for code to initialize the 672hf on the i2c #
# correctly. I haven't checked it, so if you die from running it, #
# don't blame me. You can also enter the BIOS, view the hardware #
# monitoring, and exit WITHOUT changes to accomplish the same goal. #
# Thanks to Steffen Grunewald for the suggestions. #
# #
################################################## ########################

chip "w83782d-*"

ignore in0
ignore in1
ignore in5
ignore in7
ignore vid

label in2 "AGP V"
label in3 " +5 V"
label in4 "DDR V"
label in6 "3 VSB"
label in8 "Bat V"

label fan1 "CPU1 Fan"
label fan2 "CPU2 Fan"
label fan3 "chs1 Fan"

label temp1 "VRM2 Temp"
label temp2 "CPU1 Temp"
label temp3 "CPU2 Temp"

compute in3 ((6.8/10)+1)*@ , @/((6.8/10)+1)

# set limits to 5% for the critical voltages
# set limits to 10% for the non-critical voltages
# set limits to 20% for the battery voltage

set in2_min 3.3 * 0.95
set in2_max 3.3 * 1.05
set in3_min 5.0 * 0.95
set in3_max 5.0 * 1.05
set in6_max 3.0 * 1.05
set in6_min 3.0 * 0.95
set in8_min 3.3 * 0.80
set in8_max 3.3 * 1.20

# thermal sensor types (do not adjust)
set sensor1 2
set sensor2 2
set sensor3 2

# examples for temperature limits
# set temp1_over 40
# set temp1_hyst 60
# set temp2_over 70
# set temp2_hyst 80
# set temp3_over 70
# set temp3_hyst 80

set beep_enable 0

# CPU VRM Spec.
set vrm 9.0

# Fan divisors. Some fans (.18A) may need this to be set to 4
set fan1_div 2
set fan2_div 2
set fan3_div 2

chip "w83627hf-*"

ignore in3
ignore in6
ignore in7
ignore in8
ignore vid

label in0 "VCore1"
label in1 "VCore2"
label in2 "+3.3 V"
label in4 " +12 V"
label in5 " -12 V"

label temp1 "VRM1 Temp"
label temp2 "AGP Temp"
label temp3 "DDR Temp"

label fan1 "chs2 Fan"
label fan2 "chs5 Fan"
label fan3 "chs6 Fan"

compute in4 ((3.8/1)+1)*@ , @/((3.8/1)+1)
compute in5 (5.14*@)-14.91 , (@+14.91)/5.14
compute fan1 @*2 , @/2
compute fan2 @*2 , @/2
compute fan3 @*2 , @/2

# set limits to 5% for the critical voltages
# set limits to 10% for the non-critical voltages
# set limits to 20% for the battery voltage

set in0_min vid*0.95
set in0_max vid*1.05
set in1_min vid*0.95
set in1_max vid*1.05
set in2_min 3.3*0.95
set in2_max 3.3*1.05
set in4_max 12 * 0.90
set in4_min 12 * 1.10
set in5_max -12 * 0.90
set in5_min -12 * 1.10

# thermal sensor types (do not adjust)
set sensor1 2
set sensor2 2
set sensor3 2

# examples for temperature limits
# set temp1_over 40
# set temp1_hyst 37
# set temp2_over 52
# set temp2_hyst 47
# set temp3_over 52
# set temp3_hyst 47

set beep_enable 0

# CPU VRM Spec.
set vrm 9.0

# Fan divisors. Some fans (.18A) may need this to be set to 4
set fan1_div 2
set fan2_div 2
set fan3_div 2

Brian

Brian