PDA

View Full Version : Loading kernel modules for sensors



seakiwi
13th May 2007, 12:05 AM
How do I do this? I have lmsensors installed but when I do a $sensors I get a "no sensors found! Make sure you have loaded the modules in the kernel" (or words to that effect)

Also, is there a frontend for lmsensors available for GNOME that would help me set this up properly? I really have no idea how to configure lmsensors or how to use it.

leigh123linux
13th May 2007, 12:08 AM
try

su -
sensors-detect

seakiwi
13th May 2007, 12:20 AM
Thanks for that!

Below is the output I got. Most of which I understand but I'm not sure what I should do about the warning lines - I checked out the link given but I'm still not sure what I need to do.

I assume it's safe to say YES to the overwrite question?



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
#----cut here----

To load everything that is needed, add this to some /etc/rc* file:

#----cut here----
# I2C adapter drivers
modprobe i2c-i801
# Chip drivers
modprobe eeprom
# Warning: the required module coretemp is not currently installed
# on your system. For status of 2.6 kernel ports check
# http://www.lm-sensors.org/wiki/Devices. If driver is built
# into the kernel, or unavailable, comment out the following line.
modprobe coretemp
# sleep 2 # optional
/usr/bin/sensors -s # recommended
#----cut here----

If you have some drivers 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 the needed
modules are loaded.

Do you want to overwrite /etc/sysconfig/lm_sensors? (YES/no):

leigh123linux
13th May 2007, 12:37 AM
Yes it is safe to overwrite this file.

I had a similar warning because the k8temp module isn't built into the 2.6.18 kernel that I run.

seakiwi
13th May 2007, 01:55 AM
Yes it is safe to overwrite this file.

I had a similar warning because the k8temp module isn't built into the 2.6.18 kernel that I run.

I'm running the 2.6.20 kernel. Does that mean the module isn't built into that kernel either? If so, is there any way to add that (easily for a newbie) or should I just comment out that modprobe coretemp line? Does all this mean lmsensors won't be able to detect my CPU temps?

BTW, when the above instructions say to "add to some /etc/rc* file" - which particular file should I add it to?

leigh123linux
13th May 2007, 02:13 AM
you will need to compile the coretemp module as it isn't include till kernel 2.6.22 according to the lm-sensors homepage

http://www.hentges.net/misc/howtos/p5wdh/files/coretemp.tar.gz

Just run compile.sh to create the driver.

su -
modprobe coretemp
sensors-detect

seakiwi
13th May 2007, 02:26 AM
Does the coretemp stuff have to be in a particular directory before I run the complile.sh? I tried it from where I'd downloaded it to - and told it to run in terminal so I could see the output. Output flashed past and disappeared so quickly I couldn't read it, but from the few words I caught, I suspect it didn't work.

Again ... WHICH /etc/rc file do I add the second section of code to? There are a heap of them and I have no idea which one I should use.

leigh123linux
13th May 2007, 02:35 AM
try typing this in a termial


su -
wget http://www.hentges.net/misc/howtos/p5wdh/files/coretemp.tar.gz
tar xvpfz coretemp.tar.gz
cd coretemp
./compile.sh
modprobe coretemp
sensors-detect

accept all the changes then run sensors

when I compiled the k8temp module I didnt have to edit any files.



leigh@debian:~$ sensors
it8712-isa-0290
Adapter: ISA adapter
VCore 1: +1.49 V (min = +4.08 V, max = +4.08 V) ALARM
VCore 2: +1.52 V (min = +4.08 V, max = +4.08 V) ALARM
+3.3V: +3.12 V (min = +4.08 V, max = +4.08 V) ALARM
+5V: +4.73 V (min = +6.85 V, max = +6.85 V) ALARM
+12V: +11.71 V (min = +16.32 V, max = +16.32 V) ALARM
-12V: +2.22 V (min = +3.93 V, max = +3.93 V) ALARM
-5V: +0.15 V (min = +4.03 V, max = +4.03 V) ALARM
Stdby: +4.92 V (min = +6.85 V, max = +6.85 V) ALARM
VBat: +3.04 V
fan1: 0 RPM (min = 50 RPM, div = 128)
fan2: 0 RPM (min = 0 RPM, div = 128)
fan3: -1 RPM (min = 0 RPM, div = 2)
M/B Temp: +127C (low = +127C, high = +77C) sensor = thermistor ALA RM
CPU Temp: +127C (low = +127C, high = +77C) sensor = thermistor ALA RM
Temp3: +53C (low = +127C, high = +77C) sensor = diode

k8temp-pci-00c3
Adapter: PCI adapter
Core0 Temp:
+69C
Core1 Temp:
+67C

leigh@debian:~$

p.s I know my temps are high but I have been running at 100% CPU usage for the last 3 days on a project.

seakiwi
13th May 2007, 02:39 AM
ok, I get a "command not found" when I run the compile.sh

Thanks for all your help (with both of my current issues) - I really appreciate it!

leigh123linux
13th May 2007, 02:45 AM
ok, I get a "command not found" when I run the compile.sh

Thanks for all your help (with both of my current issues) - I really appreciate it!

Sorry about that I forgot the tar (extract) command and to change directory to coretemp, I have edited previous post with the corrections ( they may still need changing )


edit have also fixed broken link

leigh123linux
13th May 2007, 03:22 AM
I have checked the commands and they should work ok now



debian:/home/leigh# su -
debian:~# wget http://www.hentges.net/misc/howtos/p5wdh/files/coretemp.tar.gz
--03:21:28-- http://www.hentges.net/misc/howtos/p5wdh/files/coretemp.tar.gz
=> `coretemp.tar.gz'
Resolving www.hentges.net... 81.169.178.128
Connecting to www.hentges.net|81.169.178.128|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4,182 (4.1K) [application/x-tar]

100%[====================================>] 4,182 --.--K/s

03:21:29 (71.96 KB/s) - `coretemp.tar.gz' saved [4182/4182]

debian:~# tar xvpfz coretemp.tar.gz
coretemp/
coretemp/coretemp.c
coretemp/Makefile
coretemp/coretemp.mod.c
coretemp/compile.sh
debian:~# cd coretemp
debian:~/coretemp#

I didn't build it as I dont need it

seakiwi
13th May 2007, 04:02 AM
I keep getting a 404 error. I'll try again a bit later.

Re my previous question about which /etc/rc file to use .... I'm referring to the section taken from the sensors-detect output. This one:


To load everything that is needed, add this to some /etc/rc* file:

#----cut here----
# I2C adapter drivers
modprobe i2c-i801
# Chip drivers
modprobe eeprom
# Warning: the required module coretemp is not currently installed
# on your system. For status of 2.6 kernel ports check
# http://www.lm-sensors.org/wiki/Devices. If driver is built
# into the kernel, or unavailable, comment out the following line.
modprobe coretemp
# sleep 2 # optional
/usr/bin/sensors -s # recommended
#----cut here----

I still haven't done this edit yet because I don't know which /etc/rc file to add it to!

leigh123linux
13th May 2007, 04:28 AM
I keep getting a 404 error. I'll try again a bit later.

Re my previous question about which /etc/rc file to use .... I'm referring to the section taken from the sensors-detect output. This one:


To load everything that is needed, add this to some /etc/rc* file:

#----cut here----
# I2C adapter drivers
modprobe i2c-i801
# Chip drivers
modprobe eeprom
# Warning: the required module coretemp is not currently installed
# on your system. For status of 2.6 kernel ports check
# http://www.lm-sensors.org/wiki/Devices. If driver is built
# into the kernel, or unavailable, comment out the following line.
modprobe coretemp
# sleep 2 # optional
/usr/bin/sensors -s # recommended
#----cut here----

I still haven't done this edit yet because I don't know which /etc/rc file to add it to!

I dont think this step is required.

you are getting the 404 error because you used copy ( which breaks the address )instead of copy link ( which works but you have to type the wget first )

seakiwi
13th May 2007, 04:40 AM
I dont think this step is required.

OK, I'll leave it then.


you are getting the 404 error because you used copy ( which breaks the address )instead of copy link ( which works but you have to type the wget first )


DUH! I'm such a thicko sometimes ;)

OK, I tried it again, but I still get a command not found for the compile.sh as below:



[root@carrenslaptop ~]# tar xvpfz coretemp.tar.gz
coretemp/
coretemp/coretemp.c
coretemp/Makefile
coretemp/coretemp.mod.c
coretemp/compile.sh
[root@carrenslaptop ~]# cd coretemp
[root@carrenslaptop coretemp]# compile.sh
-bash: compile.sh: command not found
[root@carrenslaptop coretemp]#


Is there something I need to install in order to compile, that's not already installed maybe?

seakiwi
13th May 2007, 07:59 AM
OK, I've done some googling and I'm getting the feeling there must be something I need to install in order to compile stuff. Can someone please point me to a list of packages needed for compiling? TIA.

leigh123linux
13th May 2007, 09:35 AM
OK, I'll leave it then.




DUH! I'm such a thicko sometimes ;)

OK, I tried it again, but I still get a command not found for the compile.sh as below:



[root@carrenslaptop ~]# tar xvpfz coretemp.tar.gz
coretemp/
coretemp/coretemp.c
coretemp/Makefile
coretemp/coretemp.mod.c
coretemp/compile.sh
[root@carrenslaptop ~]# cd coretemp
[root@carrenslaptop coretemp]# compile.sh replace with ./compile.sh
-bash: compile.sh: command not found
[root@carrenslaptop coretemp]#


Is there something I need to install in order to compile, that's not already installed maybe?

use this command instead


./compile.sh

seakiwi
13th May 2007, 10:31 AM
[root@carrenslaptop coretemp]# ./compile.sh
rm: cannot remove `coretemp.ko': No such file or directory
rm: cannot remove `coretemp.mod.o': No such file or directory
rm: cannot remove `coretemp.o': No such file or directory
rm: cannot remove `Module.symvers': No such file or directory
make: Entering directory `/usr/src/kernels/2.6.20-1.2948.fc6-i686'
CC [M] /home/carren/coretemp/coretemp.o
/home/carren/coretemp/coretemp.c: In function ‘coretemp_init’:
/home/carren/coretemp/coretemp.c:457: error: implicit declaration of function ‘register_hotcpu_notifier’
/home/carren/coretemp/coretemp.c: In function ‘coretemp_exit’:
/home/carren/coretemp/coretemp.c:479: error: implicit declaration of function ‘unregister_hotcpu_notifier’
make[1]: *** [/home/carren/coretemp/coretemp.o] Error 1
make: *** [_module_/home/carren/coretemp] Error 2
make: Leaving directory `/usr/src/kernels/2.6.20-1.2948.fc6-i686'
Driver failed to compile

Something still isn't right. I have no idea what those errors mean.

leigh123linux
13th May 2007, 06:29 PM
I have googled this problem and it seems that the kernel requires patching for coretemp , this is a lot of work ( requires you to recompile and patch the kernel ) for a small feature that will be added to the 2.6.22 kernel when it is released in about a 3 months time .

seakiwi
13th May 2007, 08:35 PM
I have googled this problem and it seems that the kernel requires patching for coretemp , this is a lot of work ( requires you to recompile and patch the kernel ) for a small feature that will be added to the 2.6.22 kernel when it is released in about a 3 months time .

In that case I'll wait for the new kernel ... that sounds way to geeky for me :cool:

Many thanks for all your help with this. Sorry to have wasted so much of your time.