View previous topic :: View next topic |
Author |
Message |
Master_Of_Disaster l33t
Joined: 28 Feb 2003 Posts: 610 Location: 15.05072° East, 48.13747° North (aka Mauer), Austria
|
Posted: Fri Oct 31, 2003 3:28 pm Post subject: How to use your hardware sensors with Kernel 2.6 |
|
|
Last updated 6. 11. 2005
This Howto can be found on http://gentoo-wiki.com/HARDWARE_Sensors too.
German translation / Deutsche Übersetzung
Warnings (please read first)
- This applies only to Shuttle XPC owners:
The fan speed issue is solved with 2.6.5-rc2-mm4, it87.c has now a parameter reset which does the trick.
*Update 20050930* I recently discovered a thread about fancontrol, which enables automatic fan throttling. I am using this /etc/fancontrol configfile (Fan 1 is main fan, Fan 2 is an external fan)
Code: | INTERVAL=5
FCTEMPS=0-0290/pwm2=0-0290/temp1_input 0-0290/pwm1=0-0290/temp2_input
FCFANS=0-0290/pwm2=0-0290/fan2_input 0-0290/pwm1=0-0290/fan1_input
MINTEMP=0-0290/pwm2=50 0-0290/pwm1=30
MAXTEMP=0-0290/pwm2=60 0-0290/pwm1=50
MINSTART=0-0290/pwm2=150 0-0290/pwm1=150
MINSTOP=0-0290/pwm2=0 0-0290/pwm1=0 |
Do NOT have i2c_viapro and VIA686A loaded at the same time!!!! They conflict and neither will work! (Thanks to Kow for adding this)
/Warnings
1. Introduction
Many packages have merged into the new kernel's sources - one of them is lm_sensors. This package consists of two components: the kernel modules and userspace applications. It should enable you to read temperature data from the thermal sensors on your motherboard, to get and set the fan speed, to get and set temperature alerts for the fan speed and so on.
Before you use this guide, be warned that not all kernel modules of this package have yet been ported or went into the kernel's sources. To get more information about lm_sensors being ported from 2.4 to 2.6 and which drivers are supported, please see the pages here, here and here.
2. Quick & Dirty Guide
- Be sure to read this page, the guys behind lm_sensors tell you here what you can do if your chip is not detected, what special parameters to use with your hardware and, most important of all, if your hardware is supported in 2.6.x!
- Create /sys, and make sure it gets mounted.
Code: | mkdir /sys
**reboot
$ mount | grep sys
sysfs on /sys type sysfs (rw)
|
If it isn't mounted automatically, do this:
Code: | echo "sysfs /sys sysfs defaults 0 0" >> /etc/fstab ; mount /sys |
Remove obsolete packages
Code: | emerge -C i2c gkrellm-sensors lm-sensors |
I²C has merged into the sources, gkrellm-sensors is obsolete because gkrellm works well with sysfs without this.
Get some shiny new kernel-sources
Code: | emerge development-sources OR emerge mm-sources OR emerge gentoo-dev-sources |
I recommend using mm-sources, as a newer snapshot is usually put into kernel sources here.
Point /usr/src/linux to your new kernel sources, it's needed later
Compile I²C as module and choose the appropriate modules for your hardware
Code: | Device Drivers --->
I2C support --->
<M> I2C support
<M> I2C device interface
I2C Hardware Bus support --->
<M> Choose the appropriate module for your hardware here
I2C Hardware Sensors Chip support --->
<M> Choose the appropriate module for your sensors here |
Compile your new kernel with Code: | make && make modules_install | and put it into /boot
Reboot!
Get lm_sensors userland applications
Code: | emerge =lm-sensors-2.8.4 |
You perhaps need to unmask this, maybe newer versions are already available.
Also make sure a /dev node is created for your i2c device. With Udev/DevFs, this should be taken care of by modprobing i2c-dev.
(Re-)emerge gkrellm to let it read out your sensor data.
Load it. Open up properties and see the built-in "sensors" item. You should find all of your sensors there.
3. Troubleshooting
If all went right, you should now have something like this:
Code: | fuero@bmfh fuero $ sensors
it87-isa-0290
Adapter: ISA adapter
Algorithm: ISA algorithm
ERROR: Can't get alarm data!
VCore 1: +1.48 V (min = +1.53 V, max = +1.87 V)
VCore 2: +1.47 V (min = +2.25 V, max = +2.75 V)
+3.3V: +6.64 V (min = +2.96 V, max = +3.60 V)
+5V: +4.86 V (min = +4.50 V, max = +5.48 V)
+12V: +11.84 V (min = +11.36 V, max = +13.80 V)
-12V: -20.38 V (min = -15.86 V, max = -13.40 V)
-5V: -2.38 V (min = -10.13 V, max = -9.44 V)
Stdby: +4.77 V (min = +4.50 V, max = +5.48 V)
VBat: +4.08 V
fan1: 3770 RPM (min = 3000 RPM, div = 2)
fan2: 0 RPM (min = 3000 RPM, div = 2)
fan3: 0 RPM (min = 3000 RPM, div = 2)
M/B Temp: +54°C (low = +20°C, high = +60°C) sensor = thermistor
CPU Temp: -22°C (low = +20°C, high = +60°C) sensor = invalid
Temp3: +40°C (low = +20°C, high = +60°C) sensor = thermistor
fuero@bmfh fuero $ ls /sys/bus/i2c/devices/
0-0290
fuero@bmfh fuero $ ls /sys/bus/i2c/devices/0-0290/
alarms fan_div1 fan_min1 in_input3 in_input7 in_max3 in_max7 in_min3 in_min7 pwm1 sensor2 temp_max2
beep_enable fan_div2 fan_min2 in_input4 in_input8 in_max4 in_max8 in_min4 in_min8 pwm2 temp_input1 temp_min1
beep_mask fan_input1 in_input0 in_input5 in_max0 in_max5 in_min0 in_min5 name pwm_enable2 temp_input2 temp_min2
detach_state fan_input2 in_input2 in_input6 in_max2 in_max6 in_min2 in_min6 power sensor1 temp_max1 |
If you can't see this, then you have the wrong modules loaded. Try activating them all and call sensors-detect.
- "My sensors do not show up!" or "My sensors are not detected!", What can I do?
RTFM here, here and here, and check the bug reports here. If this won't help anything, I'm afraid there's not much more I can tell you... You can try experimenting with the modules and it's parameters (which should sensors-detect for you) or send the lm_sensors guys a bug report.
- "My sensors always show 10 degrees too much!" or "My sensor data needs to be divided by 2!", What can I do?
If you installed lm_sensors and want to see the right output from 'sensors', then edit /etc/sensors.conf and adjust it to your needs.
If you have problems with gkrellm, you can do this by entering values into the 'Offset' and 'Factor' boxes in the 'Properties' window.
- sensors-detect spits out "No i2c device files found. Use prog/mkdev/mkdev.sh to create them"! What shall I do?
Code: | modprobe i2c-dev ; sensors-detect |
sensors-detect is unable to find some modules! / Why are these modules missing?
Make sure you activated the according option when configuring the kernel and be sure to read 1.!
Good luck! _________________ post tenebras lux, post fenestras tux
Registered Linux User Nr. 312509
Adopt an unanswered post today!
Last edited by Master_Of_Disaster on Mon Nov 07, 2005 9:36 pm; edited 25 times in total |
|
Back to top |
|
|
gringo Advocate
Joined: 27 Apr 2003 Posts: 3793
|
Posted: Fri Oct 31, 2003 8:43 pm Post subject: |
|
|
ohhhhhhhhhh thanks man! That did the job !!
What would I do without these forums??? |
|
Back to top |
|
|
Cicero Apprentice
Joined: 21 Jul 2003 Posts: 220
|
Posted: Mon Nov 03, 2003 10:26 pm Post subject: |
|
|
I could use a bit of help. I have an ECS board with a SiS 735 chipset. I have the sis96x and it87 modules built. Nothing in /sys/bus/i2c/devices/. What else do I need? |
|
Back to top |
|
|
Master_Of_Disaster l33t
Joined: 28 Feb 2003 Posts: 610 Location: 15.05072° East, 48.13747° North (aka Mauer), Austria
|
|
Back to top |
|
|
lurid Guru
Joined: 12 Mar 2003 Posts: 595 Location: Florida
|
Posted: Tue Nov 04, 2003 12:21 am Post subject: |
|
|
I have the same board, Cicero, and I can't get it working either. I think the problem is that the kernel modules use something called the SMBus and the sensors use the ISA bus. I remember when I was using lm_sensors with 2.4 I had to use ISA (i2c-isa). In my recent attempt to get it working I poked around and realised that if I enabled ISA support, the module for i2c-isa showed up, but still, it doesn't work. I read somewhere that sometimes the BIOS will turn off the SMBus and that the modules should turn it back on, but no go. Also, I read something saying that doing lspic should show SMBus but mine doesn't. It does show ISA with i2c-isa loaded, but that doesn't help if they're not ISA modules.
Or maybe I'm totally confused. _________________ Go find a cheerleader and saw her legs off. - Nny |
|
Back to top |
|
|
Cicero Apprentice
Joined: 21 Jul 2003 Posts: 220
|
Posted: Tue Nov 04, 2003 3:56 am Post subject: |
|
|
Oh, that worked! The following modules are what you need:
Code: | i2c_isa 1664 0
it87 21696 0
i2c_sensor 2368 1 it87
i2c_core 20996 3 i2c_isa,it87,i2c_sensor |
I didn't realize that you had to enable ISA support to get the ISA module. |
|
Back to top |
|
|
Merlin-TC l33t
Joined: 16 May 2003 Posts: 603 Location: Germany
|
Posted: Wed Nov 05, 2003 6:39 pm Post subject: |
|
|
I followd this little howto but just can't get it to work. My /sys/bus/i2c is just empty
I have a Soyo Dragon Plut with via KT-266 chipset.
I modprobed all these modules but it just doesn't works.
Here is my lsmod entry:
Code: |
w83781d 33472 0
i2c_isa 1664 0
via686a 18248 0
i2c_sensor 2368 2 w83781d,via686a
i2c_viapro 5900 0
i2c_core 21256 5 w83781d,i2c_isa,via686a,i2c_sensor,i2c_viapro
|
dmesg doesn't show anything when I modprobe all these modules. |
|
Back to top |
|
|
patsonrt1 Tux's lil' helper
Joined: 21 Mar 2003 Posts: 104 Location: Somewhere in my head
|
Posted: Wed Nov 05, 2003 11:12 pm Post subject: |
|
|
Same MB as Merlin.
Same results as well _________________ "Well fine, go ahead and miss church, and when you die and go to hell you can answer to SATAN!"
"Ok"
-fortune |
|
Back to top |
|
|
jordelver n00b
Joined: 25 Jun 2003 Posts: 32
|
Posted: Thu Nov 06, 2003 12:20 am Post subject: |
|
|
I get all the entries under /sys and the modules are loaded fine but gkrellm says "no sensors found"! How can I configure gkrellm?
UPDATE: I've recompiled Gkrellm and now the sensors show up |
|
Back to top |
|
|
Config Retired Dev
Joined: 25 May 2003 Posts: 187 Location: Zurich, Switzerland
|
Posted: Fri Nov 07, 2003 6:04 pm Post subject: |
|
|
It does work on my System (I had to install/load i2c-isa too) - I'm using a via kt133 board
The only problem is, that the temperatures show up as follows:
cpu: 457C
Proc 369C
temp3 265C
How do I change that? _________________ Config - caught by a chronic disease called tuxmania.... |
|
Back to top |
|
|
dlehman n00b
Joined: 21 Sep 2003 Posts: 11 Location: Ohio
|
Posted: Sat Nov 08, 2003 6:38 am Post subject: |
|
|
I canot get the modules to load
Code: | root@dlehman dlehman # modprobe i2c_core
FATAL: Module i2c_core not found.
root@dlehman dlehman # ls /usr/src/linux-2.6.0-test9/drivers/i2c/
Kconfig chips i2c-core.o i2c-dev.o i2c-sensor.o
Makefile i2c-core.c i2c-dev.c i2c-sensor.c
algos i2c-core.ko i2c-dev.ko i2c-sensor.ko
built-in.o i2c-core.mod.c i2c-dev.mod.c i2c-sensor.mod.c
busses i2c-core.mod.o i2c-dev.mod.o i2c-sensor.mod.o
root@dlehman dlehman #
|
if any one can help thanks _________________ AMD Athlon XP 2500+
Nvidia FX 5200
Gentoo 2005.1
2.6.16-Gentoo
Kde 3.5 |
|
Back to top |
|
|
Master_Of_Disaster l33t
Joined: 28 Feb 2003 Posts: 610 Location: 15.05072° East, 48.13747° North (aka Mauer), Austria
|
|
Back to top |
|
|
Raoul_Duke l33t
Joined: 15 Dec 2002 Posts: 694 Location: Caerdydd, Wales
|
Posted: Sat Nov 08, 2003 10:19 am Post subject: |
|
|
Config wrote: | It does work on my System (I had to install/load i2c-isa too) - I'm using a via kt133 board
The only problem is, that the temperatures show up as follows:
cpu: 457C
Proc 369C
temp3 265C
How do I change that? |
There's a conversion chart thingy in 'man gkrellm' but i haven't had the patience to do it yet......let me know if you have any luck _________________ www.iamthepenguin.com |
|
Back to top |
|
|
Merlin-TC l33t
Joined: 16 May 2003 Posts: 603 Location: Germany
|
Posted: Sat Nov 08, 2003 11:56 am Post subject: |
|
|
@patsonrt1: I finally got it to work. Seems like it's using another chipset (not via) to read the data out.
Just enable "ITE87XX and compatibles" under "I2C Hardware Sensor Chip Support" and there you go.
And don't forget to reemerge gkrellm2 again after that or it won't find your sensors.
Hope I could help |
|
Back to top |
|
|
Master_Of_Disaster l33t
Joined: 28 Feb 2003 Posts: 610 Location: 15.05072° East, 48.13747° North (aka Mauer), Austria
|
Posted: Sat Nov 08, 2003 12:02 pm Post subject: |
|
|
@Raoul_Duke, Config:
Start GkrellM and open the sensors properties. Then select the entry you want to adjust and set 'Factor' to 0,1. This should do it. _________________ post tenebras lux, post fenestras tux
Registered Linux User Nr. 312509
Adopt an unanswered post today! |
|
Back to top |
|
|
Config Retired Dev
Joined: 25 May 2003 Posts: 187 Location: Zurich, Switzerland
|
Posted: Sat Nov 08, 2003 12:19 pm Post subject: |
|
|
Now thats odd... after rebooting, the sensors are not present anymore in /sys....
lsmod output:
Code: | i2c_isa 2304 0
via686a 18628 0
i2c_viapro 5644 0
i2c_sensor 3008 1 via686a
i2c_dev 9344 0
i2c_core 22084 5 i2c_isa,via686a,i2c_viapro,i2c_sensor,i2c_dev |
_________________ Config - caught by a chronic disease called tuxmania.... |
|
Back to top |
|
|
dlehman n00b
Joined: 21 Sep 2003 Posts: 11 Location: Ohio
|
Posted: Sat Nov 08, 2003 11:20 pm Post subject: |
|
|
I tried that too and it don;t work either
Code: | dlehman@dlehman dlehman $ su
Password:
root@dlehman dlehman # modprobe i2c-core
FATAL: Module i2c_core not found.
root@dlehman dlehman #
|
I used the "-" but it still show the "_" in the error _________________ AMD Athlon XP 2500+
Nvidia FX 5200
Gentoo 2005.1
2.6.16-Gentoo
Kde 3.5 |
|
Back to top |
|
|
Raoul_Duke l33t
Joined: 15 Dec 2002 Posts: 694 Location: Caerdydd, Wales
|
Posted: Sun Nov 09, 2003 7:51 pm Post subject: |
|
|
Master_Of_Disaster wrote: | @Raoul_Duke, Config:
Start GkrellM and open the sensors properties. Then select the entry you want to adjust and set 'Factor' to 0,1. This should do it. |
Nice, worked a treat _________________ www.iamthepenguin.com |
|
Back to top |
|
|
Merlin-TC l33t
Joined: 16 May 2003 Posts: 603 Location: Germany
|
Posted: Sun Nov 09, 2003 7:58 pm Post subject: |
|
|
What about the motherboard sensors?
What offset or factor to set there? |
|
Back to top |
|
|
TheCoop Veteran
Joined: 15 Jun 2002 Posts: 1814 Location: Where you least expect it
|
Posted: Sun Nov 09, 2003 8:11 pm Post subject: |
|
|
doesnt work for me if the i2c stuff is compiled into the kernel. Havent tried it as modules yet _________________ 95% of all computer errors occur between chair and keyboard (TM)
"One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler
Change the world - move a rock |
|
Back to top |
|
|
rk187 Tux's lil' helper
Joined: 14 Apr 2003 Posts: 136 Location: France - Paris
|
Posted: Wed Nov 12, 2003 2:33 pm Post subject: |
|
|
same problem as you Config
chipset via KT133
Code: | i2c_viapro 6028 0
i2c_sensor 2560 1 via686a
i2c_isa 1792 0
i2c_core 21444 4 i2c_viapro,via686a,i2c_sensor,i2c_isa
|
isa support is compiled Y in kernel
/sys.../devices is empty
|
|
Back to top |
|
|
Config Retired Dev
Joined: 25 May 2003 Posts: 187 Location: Zurich, Switzerland
|
Posted: Wed Nov 12, 2003 9:00 pm Post subject: |
|
|
Quote: | same problem as you Config
chipset via KT133
Code: | i2c_viapro 6028 0
i2c_sensor 2560 1 via686a
i2c_isa 1792 0
i2c_core 21444 4 i2c_viapro,via686a,i2c_sensor,i2c_isa |
isa support is compiled Y in kernel
/sys.../devices is empty |
I think this is rather due to a software bug than a normal error.
I have looked once at the sources of the via686a driver (Which is supposed to create the sys entries). But I just don't have the time to really walk through the step by step - But I added it to my Todo list [/quote] _________________ Config - caught by a chronic disease called tuxmania.... |
|
Back to top |
|
|
thecooptoo Veteran
Joined: 27 Apr 2003 Posts: 1353 Location: UK
|
Posted: Wed Nov 12, 2003 10:11 pm Post subject: |
|
|
I had the same problem compiling all the i2c stuff into the kernel, however it works compiled as modules...
you need a hardware sensor module as well, for me it's w83781d |
|
Back to top |
|
|
hellama n00b
Joined: 17 Oct 2003 Posts: 22
|
Posted: Thu Nov 13, 2003 10:07 am Post subject: |
|
|
I can make gkrellm display everything and when I "ls" /sys/bus/i2c/device/0-0290 I see everything but when I try to emerge i2c or any of the other sensor programs I get the following
Code: | diablo busses # emerge gkrellm-sensors
Calculating dependencies ...done!
>>> emerge (1 of 3) sys-apps/i2c-2.7.0 to /
>>> md5 src_uri ;-) 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-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-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-test9-mm1/build/include/mach_mpspec.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-test9-mm1/build/include/mach_mpspec.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)
|
Any sugestions, or do you not even need i2c installed??
Thanks
Steve _________________ Sometimes you need a real OS to do what Windows can't. |
|
Back to top |
|
|
jordelver n00b
Joined: 25 Jun 2003 Posts: 32
|
Posted: Thu Nov 13, 2003 11:25 am Post subject: |
|
|
Quote: | Any sugestions, or do you not even need i2c installed?? |
I'm pretty sure you don't need any of the i2c packages installed. I uninstalled the i2c package on my box and then emerged gkrellm2 again, and the sensors show up.
HTH,
Jord |
|
Back to top |
|
|
|