# i2c sensors work for only 2mins

## R!tman

Hi all,

I configured i2c and lm-sensors according to this.

I get data from the sensors, like fan rpms, temperatures and voltages. I am interested in the temerature and the fan rpms. They work, but only for about 2 mins. After that I have to reboot to make them work again.

The values switch from the normal value to -1.0C for the temperatures and to 0 for the fans.

----------

## NeddySeagoon

R!tman,

It sounds linke your modules may be getting unloaded.

Can you compare the output of lsmod when sensors works with lsmod when it doesn't ?

----------

## R!tman

 *NeddySeagoon wrote:*   

> R!tman,
> 
> It sounds linke your modules may be getting unloaded.
> 
> Can you compare the output of lsmod when sensors works with lsmod when it doesn't ?

 

Thank you for anwsering Neddy Seagoon,

unfortunately, the modules are all still loaded and nothing changes there. 

I already tried another kernel and the masked lm-sensors, but nothing worked.

Sorry for the late reply, I was not at home over the weekend.

----------

## R!tman

I did some further research on this. 

I tried to compare the outputs of 'dmesg' and 'lsmod' before and after the sensors work. I also looked at '/var/log/messages' during the working-not-working-switch. This is the, quite disappointing, result  :Confused: . 

```
lsmod > before.lsmod

dmesg > before.dmesg
```

Then, when the sensors do not work anymore

```
lsmod > after.lsmod

dmesg > after.dmesg
```

Both

```
diff before.dmesg after.dmesg
```

and

```
diff before.lsmod after.lsmod
```

show nothing.

And 

```
tail -f /var/log/messages
```

does not change at all when the sensors switch from working to not working state.

I am beginning to consider that the sensors themselves do not work  :Sad: .

[edit]

Sensors seem to work in WinXP  :Evil or Very Mad: .

[/edit]

----------

## jschellhaass

What sensors are on your motherboard?  What is the result of i2cdetect and sensors detect?

jeff

----------

## R!tman

 *jschellhaass wrote:*   

> What sensors are on your motherboard?  What is the result of i2cdetect and sensors detect?

 

I have installed a TV card today, so there are some more i2c things now, but the error still persists.

The output of these commands are listed below. 'sensors' is taken before and after, the 'i2cdetect' stuff only after.

```
# sensors

it8712-isa-0290

Adapter: ISA adapter

it87-i2c-1-2d

Adapter: SMBus nForce2 adapter at 5100

VCore 1:   +1.63 V  (min =  +1.42 V, max =  +1.57 V)   ALARM

VCore 2:   +1.50 V  (min =  +2.40 V, max =  +2.61 V)   ALARM

+3.3V:     +6.56 V  (min =  +3.14 V, max =  +3.46 V)   ALARM

+5V:       +4.92 V  (min =  +4.76 V, max =  +5.24 V)   

+12V:     +12.16 V  (min = +11.39 V, max = +12.61 V)   

-12V:     -20.00 V  (min = -12.63 V, max = -11.41 V)   ALARM

-5V:       -2.28 V  (min =  -5.26 V, max =  -4.77 V)   ALARM

Stdby:     +4.92 V  (min =  +4.76 V, max =  +5.24 V)   

VBat:      +4.08 V

fan1:     1917 RPM  (min =    0 RPM, div = 16)          

fan2:        0 RPM  (min =  332 RPM, div = 16)          ALARM

fan3:     4821 RPM  (min =  664 RPM, div = 8)          

M/B Temp:    +43 C  (low  =   +15 C, high =   +40 C)   sensor = thermistor   

CPU Temp:    +46 C  (low  =   +15 C, high =   +45 C)   sensor = thermistor   

Temp3:       +42 C  (low  =   +15 C, high =   +45 C)   sensor = thermistor   

eeprom-i2c-2-50

Adapter: saa7134[0]

Unknown EEPROM type (88)

eeprom-i2c-0-53

Adapter: SMBus nForce2 adapter at 5000

Unknown EEPROM type (27)

eeprom-i2c-0-51

Adapter: SMBus nForce2 adapter at 5000

Memory type:            DDR SDRAM DIMM

Memory size (MB):       512

eeprom-i2c-0-50

Adapter: SMBus nForce2 adapter at 5000

Memory type:            DDR SDRAM DIMM

Memory size (MB):       512
```

```
# sensors                                                      

tda9887-i2c-2-43

Adapter: saa7134[0]

Philips PAL-i2c-2-60

Adapter: saa7134[0]

eeprom-i2c-2-50

Adapter: saa7134[0]

Unknown EEPROM type (88)

it8712-isa-0290

Adapter: ISA adapter

it87-i2c-1-2d

Adapter: SMBus nForce2 adapter at 5100

VCore 1:   +4.08 V  (min =  +4.08 V, max =  +4.08 V)   

VCore 2:   +4.08 V  (min =  +4.08 V, max =  +4.08 V)   

+3.3V:     +8.16 V  (min =  +8.16 V, max =  +8.16 V)   

+5V:       +6.85 V  (min =  +6.85 V, max =  +6.85 V)   

+12V:     +16.32 V  (min = +16.32 V, max = +16.32 V)   

-12V:      +3.93 V  (min =  +3.93 V, max =  +3.93 V)   

-5V:       +4.03 V  (min =  +4.03 V, max =  +4.03 V)   

Stdby:     +6.85 V  (min =  +6.85 V, max =  +6.85 V)   

VBat:      +4.08 V

fan1:        0 RPM  (min =    0 RPM, div = 128)          

fan2:        0 RPM  (min =    0 RPM, div = 128)          

fan3:        0 RPM  (min =    0 RPM, div = 8)          

M/B Temp:     -1 C  (low  =    -1 C, high =    -1 C)   sensor = diode   

CPU Temp:     -1 C  (low  =    -1 C, high =    -1 C)   sensor = diode   

Temp3:        -1 C  (low  =    -1 C, high =    -1 C)   sensor = diode   

eeprom-i2c-0-53

Adapter: SMBus nForce2 adapter at 5000

Unknown EEPROM type (27)

eeprom-i2c-0-51

Adapter: SMBus nForce2 adapter at 5000

Memory type:            DDR SDRAM DIMM

Memory size (MB):       512

eeprom-i2c-0-50

Adapter: SMBus nForce2 adapter at 5000

Memory type:            DDR SDRAM DIMM

Memory size (MB):       512
```

```
# i2cdetect -l

i2c-2   unknown         saa7134[0]                              Algorithm unavailable

i2c-3   dummy           ISA main adapter                        ISA bus algorithm

i2c-1   unknown         SMBus nForce2 adapter at 5100           Algorithm unavailable

i2c-0   unknown         SMBus nForce2 adapter at 5000           Algorithm unavailable
```

```
# i2cdetect 0

  WARNING! This program can confuse your I2C bus, cause data loss and worse!

  I will probe file /dev/i2c-0.

  I will probe address range 0x03-0x77.

  You have five seconds to reconsider and press CTRL-C!

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00:          XX XX XX XX XX 08 XX XX XX XX XX XX XX 

10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 

20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 

30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 

40: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 

50: UU UU XX UU XX XX XX XX XX XX XX XX XX XX XX XX 

60: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 

70: XX XX XX XX XX XX XX XX
```

```
# i2cdetect 1 

  WARNING! This program can confuse your I2C bus, cause data loss and worse!

  I will probe file /dev/i2c-1.

  I will probe address range 0x03-0x77.

  You have five seconds to reconsider and press CTRL-C!

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00:          XX XX XX XX XX XX XX XX XX XX XX XX XX 

10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 

20: XX XX XX XX XX XX XX XX XX XX XX XX XX UU XX XX 

30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 

40: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 

50: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 

60: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 

70: XX XX XX XX XX XX XX XX 
```

```
# i2cdetect 2

  WARNING! This program can confuse your I2C bus, cause data loss and worse!

  I will probe file /dev/i2c-2.

  I will probe address range 0x03-0x77.

  You have five seconds to reconsider and press CTRL-C!

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00:          XX XX XX XX XX XX XX XX XX XX XX XX XX 

10: 10 XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 

20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 

30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 

40: XX XX XX UU XX XX XX XX XX XX XX XX XX XX XX XX 

50: UU XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 

60: UU XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 

70: XX XX XX XX XX XX XX XX
```

```
# i2cdetect 3

Error: Can't use SMBus Quick Write command on this bus (ISA bus?)
```

I would also like to say, that in gkrellm2 I have 6 sensors for temperature:

it8712-3-0290/temp1

it8712-3-0290/temp2

it8712-3-0290/temp3

it87-1-002d/temp1

it87-1-002d/temp2

it87-1-002d/temp3

The */temp$i show the same temperature when working. When not working all it8712* show 0 and all the it81-1* show -1.

Similar for the fans, but when not working all show 0.

[edit]

The it8712-3-0290 temperature sensors do not always show 0. They have different values everytime they fail. ie -73, 120.

[/edit]

----------

## jschellhaass

Sorry about that, I meant to ask what are the results of sensors-detect.  One thing sensors-detect does is report back a confidence value.

jeff

----------

## R!tman

 *jschellhaass wrote:*   

> Sorry about that, I meant to ask what are the results of sensors-detect.  One thing sensors-detect does is report back a confidence value.
> 
> jeff

 

I simply copy-pasted it, I hope that's all right  :Wink: . This was done when the sensors still worked.

```
# sensors-detect 

This program will help you determine which I2C/SMBus modules you need to

load to use lm_sensors most effectively. You need to have i2c and

lm_sensors installed before running this program.

Also, you need to be `root', or at least have access to the /dev/i2c-*

files, for most things.

If you have patched your kernel and have some drivers built in, you can

safely answer NO if asked to load some modules. In this case, things may

seem a bit confusing, but they will still work.

It is generally safe and recommended to accept the default answers to all

questions, unless you know what you're doing.

 We can start with probing for (PCI) I2C or SMBus adapters.

 You do not need any special privileges for this.

 Do you want to probe now? (YES/no): 

Probing for PCI bus adapters...

Use driver `i2c-nforce2' for device 00:01.1: nVidia Corporation nForce2 SMBus (MCP)

Probe succesfully concluded.

We will now try to load each adapter module in turn.

Load `i2c-nforce2' (say NO if built into your kernel)? (YES/no): 

Module loaded succesfully.

If you have undetectable or unsupported adapters, you can have them

scanned by manually loading the modules before running this script.

 To continue, we need module `i2c-dev' to be loaded.

 If it is built-in into your kernel, you can safely skip this.

i2c-dev is already loaded.

 We are now going to do the adapter probings. Some adapters may hang halfway

 through; we can't really help that. Also, some chips will be double detected;

 we choose the one with the highest confidence value in that case.

 If you found that the adapter hung after probing a certain address, you can

 specify that address to remain unprobed. That often

 includes address 0x69 (clock chip).

Next adapter: SMBus nForce2 adapter at 5100 (Algorithm unavailable)

Do you want to scan it? (YES/no/selectively):

Client found at address 0x08

Client found at address 0x2d

Probing for `Myson MTP008'... Failed!

Probing for `National Semiconductor LM78'... Failed!

Probing for `National Semiconductor LM78-J'... Failed!

Probing for `National Semiconductor LM79'... Failed!

Probing for `National Semiconductor LM80'... Failed!

Probing for `National Semiconductor LM85'... Failed!

Probing for `Analog Devices ADM1027, ADT7460 or ADT7463'... Failed!

Probing for `SMSC EMC6D100 or EMC6D101'... Failed!

Probing for `National Semiconductor LM87'... Failed!

Probing for `Winbond W83781D'... Failed!

Probing for `Winbond W83782D'... Failed!

Probing for `Winbond W83783S'... Failed!

Probing for `Winbond W83791D'... Failed!

Probing for `Winbond W83627HF'... Failed!

Probing for `Asus AS99127F (rev.1)'... Failed!

Probing for `Asus AS99127F (rev.2)'... Failed!

Probing for `Asus ASB100 Bach'... Failed!

Probing for `Winbond W83L784R/AR'... Failed!

Probing for `Winbond W83L785R'... Failed!

Probing for `Genesys Logic GL518SM Revision 0x00'... Failed!

Probing for `Genesys Logic GL518SM Revision 0x80'... Failed!

Probing for `Genesys Logic GL520SM'... Failed!

Probing for `Genesys Logic GL525SM'... Failed!

Probing for `Analog Devices ADM9240'... Failed!

Probing for `Dallas Semiconductor DS1780'... Failed!

Probing for `National Semiconductor LM81'... Failed!

Probing for `Analog Devices ADM1026'... Failed!

Probing for `Analog Devices ADM1025'... Failed!

Probing for `Philips NE1619'... Failed!

Probing for `Analog Devices ADM1024'... Failed!

Probing for `Analog Devices ADM1029'... Failed!

Probing for `Analog Devices ADM1030'... Failed!

Probing for `Analog Devices ADM1031'... Failed!

Probing for `Analog Devices ADM1022'... Failed!

Probing for `Texas Instruments THMC50'... Failed!

Probing for `ITE IT8705F / IT8712F / SiS 950'... Success!

    (confidence 8, driver `it87')

Probing for `ALi M5879'... Failed!

Client found at address 0x37

Next adapter: SMBus nForce2 adapter at 5000 (Algorithm unavailable)

Do you want to scan it? (YES/no/selectively): 

Client found at address 0x08

Client found at address 0x50

Probing for `SPD EEPROM'... Success!

    (confidence 8, driver `eeprom')

Probing for `DDC monitor'... Failed!

Probing for `Maxim MAX6900'... Failed!

Client found at address 0x51

Probing for `SPD EEPROM'... Success!

    (confidence 8, driver `eeprom')

Client found at address 0x53

Probing for `SPD EEPROM'... Success!

    (confidence 1, driver `eeprom')

Next adapter: saa7134[0] (Algorithm unavailable)

Do you want to scan it? (YES/no/selectively): 

Client found at address 0x10

Client found at address 0x43

Probing for `Maxim MAX6633/MAX6634/MAX6635'... Failed!

Client found at address 0x50

Probing for `SPD EEPROM'... Success!

    (confidence 1, driver `eeprom')

Probing for `DDC monitor'... Failed!

Probing for `Maxim MAX6900'... Failed!

Client at address 0x60 can not be probed - unload all client drivers first!

Some chips are also accessible through the ISA bus. ISA probes are

typically a bit more dangerous, as we have to write to I/O ports to do

this. This is usually safe though.

Do you want to scan the ISA bus? (YES/no): 

Probing for `National Semiconductor LM78'

  Trying address 0x0290... Failed!

Probing for `National Semiconductor LM78-J'

  Trying address 0x0290... Failed!

Probing for `National Semiconductor LM79'

  Trying address 0x0290... Failed!

Probing for `Winbond W83781D'

  Trying address 0x0290... Failed!

Probing for `Winbond W83782D'

  Trying address 0x0290... Failed!

Probing for `Winbond W83627HF'

  Trying address 0x0290... Failed!

Probing for `Winbond W83697HF'

  Trying address 0x0290... Failed!

Probing for `Silicon Integrated Systems SIS5595'

  Trying general detect... Failed!

Probing for `VIA Technologies VT82C686 Integrated Sensors'

  Trying general detect... Failed!

Probing for `VIA Technologies VT8231 Integrated Sensors'

  Trying general detect... Failed!

Probing for `ITE IT8705F / IT8712F / SiS 950'

  Trying address 0x0290... Success!

    (confidence 8, driver `it87')

Probing for `IPMI BMC KCS'

  Trying address 0x0ca0... Failed!

Probing for `IPMI BMC SMIC'

  Trying address 0x0ca8... Failed!

Some Super I/O chips may also contain sensors. Super I/O probes are

typically a bit more dangerous, as we have to write to I/O ports to do

this. This is usually safe though.

Do you want to scan for Super I/O sensors? (YES/no): 

Probing for `ITE 8702F Super IO Sensors'

  Failed! (0x8712)

Probing for `ITE 8705F Super IO Sensors'

  Failed! (0x8712)

Probing for `ITE 8712F Super IO Sensors'

  Success... found at address 0x0290

Probing for `Nat. Semi. PC87351 Super IO Fan Sensors'

  Failed! (skipping family)

Probing for `SMSC 47B27x Super IO Fan Sensors'

  Failed! (skipping family)

Probing for `VT1211 Super IO Sensors'

  Failed! (skipping family)

Do you want to scan for secondary Super I/O sensors? (YES/no): 

Probing for `ITE 8702F Super IO Sensors'

  Failed! (skipping family)

Probing for `Nat. Semi. PC87351 Super IO Fan Sensors'

  Failed! (skipping family)

Probing for `SMSC 47B27x Super IO Fan Sensors'

  Failed! (skipping family)

Probing for `VT1211 Super IO Sensors'

  Failed! (skipping family)

 Now follows a summary of the probes I have just done.

 Just press ENTER to continue: 

Driver `it87' (should be inserted):

  Detects correctly:

  * Bus `SMBus nForce2 adapter at 5100' (Algorithm unavailable)

    Busdriver `i2c-nforce2', I2C address 0x2d

    Chip `ITE IT8705F / IT8712F / SiS 950' (confidence: 8)

  * ISA bus address 0x0290 (Busdriver `i2c-isa')

    Chip `ITE 8712F Super IO Sensors' (confidence: 9)

Driver `eeprom' (should be inserted):

  Detects correctly:

  * Bus `SMBus nForce2 adapter at 5000' (Algorithm unavailable)

    Busdriver `i2c-nforce2', I2C address 0x50

    Chip `SPD EEPROM' (confidence: 8)

  * Bus `SMBus nForce2 adapter at 5000' (Algorithm unavailable)

    Busdriver `i2c-nforce2', I2C address 0x51

    Chip `SPD EEPROM' (confidence: 8)

  * Bus `SMBus nForce2 adapter at 5000' (Algorithm unavailable)

    Busdriver `i2c-nforce2', I2C address 0x53

    Chip `SPD EEPROM' (confidence: 1)

  * Bus `saa7134[0]' (Algorithm unavailable)

    Busdriver `UNKNOWN', I2C address 0x50

    Chip `SPD EEPROM' (confidence: 1)

 I will now generate the commands needed to load the I2C modules.

 Sometimes, a chip is available both through the ISA bus and an I2C bus.

 ISA bus access is faster, but you need to load an additional driver module

 for it. If you have the choice, do you want to use the ISA bus or the

 I2C/SMBus (ISA/smbus)?

If you want to load the modules at startup, generate a config file

below and make sure lm_sensors gets started; e.g

$ rc-update add lm_sensors default.

To make the sensors modules behave correctly, add these lines to

/etc/modules.conf:

#----cut here----

# I2C module options

alias char-major-89 i2c-dev

#----end cut here----

WARNING! If you have some things 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 it's done.

To load everything that is needed, execute the commands above...

#----cut here----

# I2C adapter drivers

modprobe i2c-nforce2

# modprobe unknown adapter saa7134[0]

modprobe i2c-isa

# I2C chip drivers

modprobe it87

modprobe eeprom

# sleep 2 # optional

/usr/bin/sensors -s # recommended

Do you want to overwrite /etc/conf.d/lm_sensors? Enter s to specify other file name?

  (yes/NO/s): yes

Done.
```

----------

## jschellhaass

Have you tried using just one of the i2c busses. Comment out i2c-nvidia2 and try it with i2c-isa.  Then try it using just i2c-nvidia2.

jeff

----------

## R!tman

 *jschellhaass wrote:*   

> Have you tried using just one of the i2c busses. Comment out i2c-nvidia2 and try it with i2c-isa.  Then try it using just i2c-nvidia2.
> 
> jeff

 

Thank you very much for that tip, jeff. Now it looks a bit better  :Smile: .

First I tried thought I should include ISA support in the kernel. With that I tried all kinds of combinations of sensor-detect-settings. Not with much success. Then all sensors were varying very much. ie cpu form 37 to 84, within seconds.

After taking ISA out of the kernel, and only using nforce2, I could achieve quite a success. Now the sensors fail after about 30mins instead of two.

When they have failed and I run sensors-detect, the probing part at 'SMBus nForce2 adapter at 5100' is completely left out. There are the sensors I think. And there something seems to fail.

Any other suggestions?

----------

## jschellhaass

Looking at the lm_sensors site the only thing I see is that the i2c-nvidia2 is still listed as a beta driver.    http://secure.netroedge.com/~lm78/index.html

I don't have anymore ideas at the moment.

jeff

----------

## rkdempsey

 *R!tman wrote:*   

> Hi all,
> 
> I get data from the sensors, like fan rpms, temperatures and voltages. I am interested in the temerature and the fan rpms. They work, but only for about 2 mins. After that I have to reboot to make them work again.
> 
> The values switch from the normal value to -1.0C for the temperatures and to 0 for the fans.

 

I had the same thing happen. They were working fine until I did a minor kernel upgrade and then the same problem. Since I don't really  use them I haven't  looked into it.  Have you tried going to an older kernel?

----------

## R!tman

 *rkdempsey wrote:*   

>  *R!tman wrote:*   Hi all,
> 
> I get data from the sensors, like fan rpms, temperatures and voltages. I am interested in the temerature and the fan rpms. They work, but only for about 2 mins. After that I have to reboot to make them work again.
> 
> The values switch from the normal value to -1.0C for the temperatures and to 0 for the fans. 
> ...

 

I only tried newer kernels. I will try an older one, but I hope it'll get fixed in newer kernels too.

[edit]

It's pretty hard to find an old kernel, that you can apply one of the reiser4 patches on.

From what kernel version on did the sensors stop working properly?

[/edit]

----------

## R!tman

I have noticed that the sensors only seem to fail when they are read out for a certain number of times.

I ran my pc for hours yesterday when I decided to look at the output of 'sensors'. They worked.

But after starting 

```
gkrellm2
```

with sensors enabled or 

```
watch -n 10 sensors
```

they fail after a short time. 

Could it be that they fail because of being read out?

----------

