# lm_sensors vt8231 kernel 2.6

## Lawless

Hi,

trying to get lm_sensors working on my epia board but it seems that it wasn't a good idea to take a 2.6 kernel...

To read out the temperature I need a module called vt8231 - but this isn't included in the current kernel versions and the one which comes with lm_sensors is for 2.4 and I'm not able to compile it...

Do I have to wait for some nice guys porting the driver or do I have another possibility?

----------

## Lawless

Long time ago....

Perhaps anybody can help?

Read some day that it is posible to port sensor modules to 2.6 but I don't find it anymore...

----------

## propheci

i'm trying to get this working on my EPIA 800.  this is what i know, maybe it'll help you.

sensors-detect tells me i need vt8231, which isn't in the 2.6 kernel as you mentioned.  anyway, i looked at lm_sensors' website and vt8231 is suppose to be supported via the via686a module?  the page also mentions that via686a and i2c_viapro don't play nice together.  supposedly i2c_isa and via686a should work but it doesn't for me...

i'm on 2.6.8.

----------

## Lawless

That's what I thought too - never got that running. All thinkable modules were running but none of them gave me a single sensor.

The only thing that worked was eeprom which just read out the SPD of my ram telling me how much I have of it.

Even opened a support ticket on the lm_sensors page with just the short answer - you will have to wait for a ported version of 8231...

After 'endless' search via google I finally found a page with just a single .c file of the required module. I mailed a while with the author and what should I say - it's running perfectly now  :Smile: 

He ported the module to 2.6.* and now I can read the at least the cpu temperature sensor giving me a rather accurate value.

The pure c file is here

http://tser.org/vt8231/

You will find another discussion about this here

https://forums.gentoo.org/viewtopic.php?t=199893

and I have packed the needed files here

http://ag-enterprises.de/misc/vt8231.tgz

Just unpack these to your kernel directory

/usr/src/linux/drivers/i2c/chips/

You will have to overwrite the Makefile and that config file - so feel free to back up them.

Now you have a new kernel option in the i2c/chips section giving you the posibillity to compile vt8231.

My lsmod looks like

```

vt8231                 17288  0 

i2c_sensor         2336  1 vt8231

i2c_isa                 1600  0 

i2c_core              18740  3 vt8231,i2c_sensor,i2c_isa

```

No viapro, no via686a... as I understand you don't even need isa support in the kernel as of the newest lm_sensor doesn't require it - it's all made through this isc_isa module.

I'm runnung on kernel 2.6.7 and lm-sensors-2.8.7 with a nice looking via epia v5000.

The author was saying he is still working on the module and wants to inform me of updates.

----------

## cpdsaorg

You should look at this forum here (forums.viaarena.com)

It has everything you need to get lm_sensors working...

I took the .ebuild for the 2.6.7-epia kernel and edited it to work for the 2.6.8.1 kernel

you can find it here (forums.gentoo.org)

----------

## Lawless

But thats all about the vt1211 and Via C3 Eden (Epia M Series) - I need the vt8231 module for the old C3-I... :(

----------

## Lawless

Just a little update (perhaps there are others with this problem)

Google's my friend...

Found another version of the vt8231 here

http://archives.andrew.net.au/lm-sensors/msg27970.html

This one works but the values are totally wrong with 

compute temp3 (@*@*0.0046)-(@*0.088)-0.748, (@*0.9686)+65

as well as with

compute temp3  (@ - 65) / 0.9686,  (@ * 0.9686) + 65

(both give values below zero)

I'm asking google again :)

----------

## pjp

Moved from Other Things Gentoo.

----------

## fvant

Lawless,  did you make any progress on this ?

i have an old EPIA 5000 (VIA Samuel 2 CentaurHauls) too and sensors give temp values below zero, like this

 *Quote:*   

> 
> 
> via sys # sensors
> 
> vt8231-isa-6000
> ...

 

However, if i get the value from myself like so

```
 cat /sys/devices/platform/i2c-0/0-6000/temp3_input
```

and use the formula from sensors.conf i get something sensible, like

 *Quote:*   

> 
> 
>  echo "(752*752*0.0046)-(752*0.088)-0.748" | bc -q
> 
> 

 

----------

## Lawless

You have to patch lm-sensors with the patch that is linked here

http://archives.andrew.net.au/lm-sensors/msg27970.html

It is called lm_sensors-2.8.7 but it works with the latest version too.

----------

## fvant

The proposed patch for chips.c is already incorporated in 2.9.0. After i patched proc.c , temperatures are looking good !

----------

## Lawless

Since 2.6.13 the mentioned patch/vt8231.c doesn't work anymore :(

I wrote to the author hoping that he has a newer version...

----------

