Next Previous Contents

3. The mainboard's sensors

3.1 lm-sensors

Getting the drivers

Get the lm_sensors 2.6.2 or more recent: http://www.lm-sensors.nu/archive/lm_sensors-2.6.2.tar.gz You'll need kernel sources too in order to compile that one.

Installing them

tar -xzvf i2c-2.6.2.tar.gz

cd i2c-2.6.2

make && make install

Then there was a problem when making install for me, so if it doesn't work, just do the following:

cp kernel/i2c-core.o /lib/modules/`uname -r`/misc/i2c-core.o

cp kernel/i2c-proc.o /lib/modules/`uname -r`/misc/i2c-proc.o

Now let's copy the specific driver:

cp kernel/chips/it87.o /lib/modules/`uname -r`/misc/it87.o

ok now

cp prog/sensors/sensors /usr/bin/sensors

--------------------------------------------------------------------

Edit /etc/modules.conf and add to it the following lines:

alias char-major-89 i2c-dev
options it87 temp_type=0x31

now:

modprobe i2c-proc

modprobe it87

modprobe i2c-isa

sensors

should output you some data

When it works, you can write it to a file, that will be loaded automatically on boot. Under SuSE the file is: /etc/init.d/boot.local (used to be /sbin/init.d/) and you should just add: sensors -s Under mandrake, the install should have created that file: /etc/init.d/sensors, which you can edit freely, sensord being just a daemon to watch over temperature and fan speed, I assume no one will need something like that for her/his own machine.

Paolo reports that in order to start up sensord on boot, he put in /etc/sysconfig/sensors:

MODULE_0=i2c-proc
MODULE_1=it87
MODULE_2=i2c-isa

Now as root you should edit your /etc/sensors.conf search for that line: chip "it87-*" and below you should be able to modify everything to get the right data, here is a copy of what i have in there: (please note that temp1 is trash and only temp2 and temp3 should be kept)

--------------------------------------------------------------------

3.2 lm-sensors the Debian way

This time you'll be forced to compile the modules. install the source and programs:

apt-get install lm-sensors lm-sensors-source

 The upstream lm-sensors maintainers know of a problem using 
 lm-sensors with IBM ThinkPad computers, resulting in 
 firmware corruption.  If you are installing this package on 
 a ThinkPad, you should wait until the upstream maintainers 
 have solved this problem before building modules from it.
 For more information, see 
 /usr/share/doc/lm-sensors-source/README.thinkpad.
 IBM ThinkPad brokenness -- really install lm-sensors?
Answer yes to this question, you can't have an IBM thinkpad and the k7s5a in the same box as far as I know!

cd /usr/src

tar xzvf lm-sensors.tar.gz

cd modules/lm-sensors/

make && make install

Then you should have modutils take a few arguments, the best way is probably to use a new file, like: /etc/modutils/sensors with this content:

alias char-major-89 i2c-dev
options it87 temp_type=0x31
run

update-modules

modprobe i2c-isa it87

You can now type sensors to access to the informations (note that you should edit sensors.conf, otherwise you'll see strange and inaccurate things :] )

You can also put i2c-isa and it87 in /etc/modules (one by line!) to have them be automatically loaded on boot, I don't know yet, how/whether it is possible to use some automatic loading/removing process with /etc/modules.conf

3.3 Sensors.conf for the K7s5a

#David Thorarinsson explained me that all the 'set' lines should be after the compute ones, this is now fixed, for both motherboards nospam-dabbi@home.se
chip "it87-*"

# The values below have been tested on Asus CUSI, CUM motherboards.
# Voltage monitors as advised in the It8705 data sheet

    label in0 "VCore"
    label in1 "Vcc2.5V"
    label in2 "+3.3V"
    label in3 "+5V"
    label in4 "+12V"
    label in5 "-12V"
    label in6 "-5V"
    label in7 "SB 5V"
    label in8 "V battery"

    # vid not monitored by IT8705F
    ignore  vid

# For this family of chips the negative voltage equation is different from
# the lm78.  The chip uses two external resistor for scaling but one is
# tied to a positive reference voltage.  See ITE8705/12 datasheet (SIS950
# data sheet is wrong)

# Vs = (1 + Rin/Rf) * Vin - (Rin/Rf) * Vref.
# Vref = 4.096 volts, Vin is voltage measured, Vs is actual voltage.

#    compute in2 (1 + 1)*@ ,       @/(1 + 1)
    compute in3 ((6.8/10)+1)*@ ,  @/((6.8/10)+1)
    compute in4 ((30/10) +1)*@  , @/((30/10) +1)

# The next two are negative voltages (-12 and -5).
# The following formulas must be used. Unfortunately the datasheet
# does not give recommendations for Rin, Rf, but we can back into
# them based on a nominal +2V input to the chip, together with a 4.096V Vref.

# Formula:
#    actual V = (Vmeasured * (1 + Rin/Rf)) - (Vref * (Rin/Rf))
#    For -12V input use Rin/Rf = 6.68
#    For -5V input use Rin/Rf = 3.33
# Then you can convert the forumula to a standard form like:

    compute in5 -(36/10)*@, -@/(36/10)
#(7.67 * @) - 27.36  ,  (@ + 27.36) / 7.67
    compute in6 -(56/10)*@, -@/(56/10)
#(4.33 * @) - 13.64  ,  (@ + 13.64) / 4.33
    compute in7 ((6.8/10)+1)*@ ,  @/((6.8/10)+1)

    set in0_min 1.7 * 0.95
    set in0_max 1.7 * 1.05
    set in1_min 2.4
    set in1_max 2.6
    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 in4_min  12 * 0.95
    set in4_max  12 * 1.05
    set in5_min -12 * 0.95
    set in5_max -12 * 1.05
    set in6_min  -5 * 0.95
    set in6_max  -5 * 1.05
    set in7_min   5 * 0.95
    set in7_max   5 * 1.05

# Temperature

    label temp3       "Processor"
    set   temp3_over  40
    set   temp3_hyst  20
    label temp2       "Mainboard"
    set   temp2_over  45
    set   temp2_hyst  25
    ignore temp1

# Fans

    label fan1"Processor's Fan"
    set fan1_min 2000
    ignore fan3
    ignore fan2


Next Previous Contents