# 2.6 Kernel, sysfs, defunct lm-sensors

## gsiener

I'm running the mm-sources on an Abit BP6.

This uses the w83781d sensor, and I heard that you can change settings via /sys, but I don't know how.

With lm-sensors I could control the fan speed through the proc interface, for example: 

 echo 200 > /proc/sys/dev/sensors/w83782d-isa-0290/pwm2

Where is this stuff located now?

----------

## AlterEgo

You no longer need lm_sensors.

The sensor readout values can be found in a sub-dir under /sys/

----------

## wrc1944

Could you please give us 2.6.0-test6 noobs a quick rundown on how to get the readouts? I have the i2c stuff compiled as modules, as I read somewhere else, and they are in the /lib/modules/2.6.0-test6-mm3 directory.

What's the proper commands for calling up these items. I have gkrellm installed, and have used it before with 2.4 kernels and lm-sensors by running sensors-detect and using the rclocal edits (in Mandrake).

How do we go about a similar procedure, if needed, in Gentoo?

In other words, we need a brief yet complete tutorial for 2.6.0. I found the 2.6 sensors script posts on this forum, but haven't as yet been able to figure out exactly what to do.

Any help is greatly appreciated!

Thanks,

wrc1944

----------

## AlterEgo

Worksforme (KT333/2.6-test7; note that not all chipsets work at the time):

Compile all i2c stuff as modules and the following modules are needed for my setup: i2c-core, i2c-isa, w83781d; i2c-viapro, i2c-sensor.

Now I can see all values somewhere down my /sys tree (cannot give the exact path because I am in 2.4 right now)

Next I select what values I want to see in gkrellm: configuration-builtin-sensors-click  :Smile: .

That's all.

----------

## wrc1944

AlterEgo,

Thanks for the info. I have all those modules set too in the kernel config file,and they are in /lib/modules/linux-2.6.0-test6-mm3, but no i2c stuff shows up anywhere in my /sys tree.

 I'm running an MSI KT3 (viaKT333) Ultra 2 board. If I put the i2c modules in /etc/modules.autoload.d, at boot it tries, but fails to load them. Apparently,I can insert them with insmod (lsmod then shows them loaded), but grellm2 still won't let me get any sensor readouts (sensors are listed under builtins, but non-functional).Other gkrellm stuff works fine.

I didn't set any isa support when I compiled this kernel, as my board doesn't have isa slots, so could that be my problem?

What about just compiling all the i2c stuff into the 2.6.0-testx kernels? Would there be a problem with that plan?

Thanks much,

wrc1944

----------

## AlterEgo

wrc1944, KT3 Ultra2 here too  :Smile: 

I have those modules mentioned in modules.autoload as well.

If it is any help, I'll put my 2.6-test7 .config online

I use gkrellm 2.1.21. The sensors values are in /sys/bus/i2c/devices/0-0290/

----------

## gsiener

Well I realized my problem was that I also needed i2c-isa.  I could modprobe w83781d without it, but didn't have anything in /sys/bus/i2c.

I now do and can control everything manually, but lm-sensors won't compile.  I assume gkrellm is for gnome (or X)?  Is there anything that works from command line?

----------

## AlterEgo

You do not need lmsensors with kernel 2.6  :Smile: 

There' s a script out here in these forums that will allow you to read values from the cli. https://forums.gentoo.org/viewtopic.php?t=77897

----------

## wrc1944

AlterEgo,

Thanks for posting the config file. My i2c sections are done the same, except I said "y" instead of "m," as when I did it with modules, loading them failed at boot. When I loaded them with insmod later, gkrellm sensor readouts still didn't function. This is also on 2.6-test7. I'll try again as modules, this time including the isa=m- maybe that was my mistake. Would you please post your modules.autoload.d file? Maybe I'm making a mistake in the syntax or text, and that causes the failure to load at boot.

Thanks much,

wrc1944

----------

## AlterEgo

:/etc/modules.autoload.d/kernel-2.6

 *Quote:*   

> 
> 
> uhci_hcd
> 
> parport_pc
> ...

 

Bold part is relevant.

From lsmod:

```

i2c_dev                 8064  0

i2c_viapro              5836  0

w83781d                33792  0

i2c_sensor              2368  1 w83781d

i2c_isa                 1664  0

i2c_core               20872  5 i2c_dev,i2c_viapro,w83781d,i2c_sensor,i2c_isa

```

----------

## wrc1944

Hmmmm...

Just noticed you have ACPI set, as below, and I don't- mine is completely disabled. Could that be my whole problem here!

wrc1944

CONFIG_ACPI=y

CONFIG_ACPI_BOOT=y

CONFIG_ACPI_INTERPRETER=y

# CONFIG_ACPI_SLEEP is not set

# CONFIG_ACPI_AC is not set

# CONFIG_ACPI_BATTERY is not set

CONFIG_ACPI_BUTTON=y

CONFIG_ACPI_FAN=y

CONFIG_ACPI_PROCESSOR=y

CONFIG_ACPI_THERMAL=y

# CONFIG_ACPI_ASUS is not set

# CONFIG_ACPI_TOSHIBA is not set

# CONFIG_ACPI_DEBUG is not set

CONFIG_ACPI_BUS=y

CONFIG_ACPI_EC=y

CONFIG_ACPI_POWER=y

CONFIG_ACPI_PCI=y

CONFIG_ACPI_SYSTEM=y

# CONFIG_ACPI_RELAXED_AML is not set

----------

## wrc1944

AlterEgo,

Since we have the same MSI board, maybe you can offer some good advice. I still can't get sensors to work in gkrellm. I did get the script to display sensors output I found on another thread working, so I know the board is working somewhat correctly.At least I can get a basic readout. (sen is my alias for perl "sensors1")

wrc@mymachine wrc $ sen

cat: /sys/bus/i2c/devices/0-0290/in_input1: No such file or directory

cat: /sys/bus/i2c/devices/0-0290/in_max1: No such file or directory

cat: /sys/bus/i2c/devices/0-0290/in_min1: No such file or directory

VCore 1:     +1.616 V  (min = +0, max = +0)

VTT:         +0 V  (min = +0V, max = +0.005 V)

+3.3V:       +3.34 V  (min = +2.98 V, max = +3.63 V)

+5V:         +4.87 V  (min = +4.52 V, max = +5.48 V)

+12V:       +12.80 V  (min = +11.39 V, max = +13.82 V)

5VSB:        +6.40 V  (min = +4.52 V, max = +5.48 V)

Volcano 9:  4821 RPM  (min = 3000 RPM, div = 2)

MB Temp:     +34.0 C  (min = +60.0 C, max = +127.0 C)

CPU Temp:    +38.5 C  (min = +50.0 C, max = +60.0 C)

wrc@mymachine wrc $

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

I rebuilt kernel 2.6.0-test8 with all the i2c stuff as modules, like you did, and they all load correctly at boot. lsmod shows exactly as yours does. Gkrellm sensors still do nothing- info says no sensors detected, and setup tab (enable, label) doesn't function.

When I try and emerge i2c, I get the following:

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

root@mymachine wrc # emerge -k i2c

Calculating dependencies ...done!

>>> emerge (1 of 1) sys-apps/i2c-2.7.0 to /

>>> md5 src_uri  :Wink:  i2c-2.7.0.tar.gz

>>> Unpacking source...

>>> Unpacking i2c-2.7.0.tar.gz to /var/tmp/portage/i2c-2.7.0/work

>>> Source unpacked.

Makefile:188: kernel/i2c-core.d: No such file or directory

Makefile:188: kernel/i2c-dev.d: No such file or directory

Makefile:188: kernel/i2c-algo-bit.d: No such file or directory

Makefile:188: kernel/i2c-philips-par.d: No such file or directory

Makefile:188: kernel/i2c-elv.d: No such file or directory

Makefile:188: kernel/i2c-velleman.d: No such file or directory

Makefile:188: kernel/i2c-algo-pcf.d: No such file or directory

Makefile:188: kernel/i2c-elektor.d: No such file or directory

Makefile:188: kernel/i2c-proc.d: No such file or directory

Makefile:188: kernel/i2c-pport.d: No such file or directory

Makefile:188: kernel/i2c-pcf-epp.d: No such file or directory

make: *** No rule to make target `/lib/modules/2.6.0-test8/build/include/linux/modversions.h', needed by `kernel/i2c-pcf-epp.d'.  Stop.

/usr/sbin/ebuild.sh: line 21: [: too many arguments

>>> Install i2c-2.7.0 into /var/tmp/portage/i2c-2.7.0/image/ category sys-apps

make: *** No rule to make target `/lib/modules/2.6.0-test8/build/include/linux/modversions.h', needed by `kernel/i2c-pcf-epp.d'.  Stop.

!!! ERROR: sys-apps/i2c-2.7.0 failed.

!!! Function src_install, Line 35, Exitcode 2

!!! (no error message)

root@mymachine wrc #

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

If you (or anybody) knows, how do I get i2c installed, I'm all ears. This happens with any 2.6 kernel I try- haven't tried with 2.4 on Gentoo. Very frustrating, as I've used sensors and gkrellm on Linux for over a year with no problems (Mandrake).

Thankswrc1944

----------

## wrc1944

Sensors problems solved! I did a emerge -uf gkrellm and got the latest version, then emerge -k (I'm on dialup) and all temps, fans, and voltages now function perfectly. This was after I had done the i2c stuff as modules, and put them in autoload like AlterEgo instructed.

I never did emerge any i2c stuff- just did the kernel compile stuff as modules. I guess I was making it more complicated in my mind than it really was. These 2.6 kernels are just getting better and better.

wrc1944

----------

## AlterEgo

Congrats wrc1944  :Smile: 

----------

