Newsgroups: comp.os.linux.misc Date: 16 Feb 2003 08:20:09 -0800
> Hi, I've got a new server and I was trying to configure the kernel > correctly so that I could read information using lmsenors. > > I compiled in all of the I2C options, and now I have a > /proc/sys/dev/sensors/chips file. However, the file is empty and the > "sensors" command says "No sensors found!". > > I am sure that there is a sensor because the BIOS properly reports CPU temp > and there's also an LED on the front that reports overheating. Is there > some way to access that sensor with software? Am I missing compiling > something in the linux kernel (I compiled in all the I2C options in > 2.4.20)?
# cd /usr/src/linux # make menuconfig
In the kernel configuration, go to Character Devices -> Hardware sensors support. As you select [*] Hardware Sensors Support, you should see a list of supported sensors expand. Did you select your sensor module from that list?
If you haven't already, compile the ones that sound interesting as modules. Then you can do "insmod" on each one that sounds interesting, then re-check /proc/sys/dev/sensors/chips (or run "sensors" from the lm_sensors package) to see if it worked.
You will also need some other i2c modules loaded. On my system, I do the following:
modprobe i2c-core modprobe i2c-isa modprobe i2c-proc modprobe w83781d # or whatever sensor you use.
Or insmod instead of modprobe, since I haven't specified any of this in my /etc/modules.conf. The i2c-isa module is needed if your sensor chip is on the ISA bus, as mine is. I did add the following line to my /etc/modules.conf, but I'm not sure why because it is never loaded:
#### /etc/modules.conf
alias char-major-89 i2c-dev
#############################
Or if that doesn't work you can try the script from the lm_Sensors package called "sensors-detect". Run this and it should automatically try each module to see if it works.
Download: http://www.lm-sensors.nu/archive/lm_sensors-2.7.0.tar.gz
Chaotic Thought