LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   lm_sensors: invalid module format (https://www.linuxquestions.org/questions/slackware-14/lm_sensors-invalid-module-format-564892/)

tramni1980 06-27-2007 01:20 PM

lm_sensors: invalid module format
 
Hello!
I am running Slackware Linux 11.0 with kernel test26.s and package lm_sensors-2.10.0-i486-3. My motherboard is
00:00.0 Host bridge: Intel Corporation 82845G/GL[Brookdale-G]/GE/PE DRAM Controller/Host-Hub Interface (rev 03)
I ran the script sensors-detect and loaded the modules it suggested in order to get lm_sensors working. These are the modules:
i2c-i810
i2c-i801
eeprom
lm85
Actually the first two modules are present after a normal boot, so all I had to do is load the eeprom and lm85 modules. lm_sensores actually works, here is the output:
marto@marto:~$ sensors
lm85c-i2c-0-2e
Adapter: SMBus I801 adapter at e000

V1.5: +1.51 V (min = +1.42 V, max = +1.58 V)
VCore: +1.44 V (min = +1.43 V, max = +1.57 V)
V3.3: +3.25 V (min = +3.13 V, max = +3.47 V)
V5: +5.10 V (min = +4.74 V, max = +5.26 V)
V12: +11.94 V (min = +11.38 V, max = +12.62 V)
CPU_Fan: 3508 RPM (min = 4000 RPM) ALARM
fan2: 0 RPM (min = 0 RPM)
fan3: 0 RPM (min = 0 RPM)
fan4: 0 RPM (min = 0 RPM)
CPU: +40°C (low = +10°C, high = +50°C)
Board: +39°C (low = +10°C, high = +35°C) ALARM
Remote: +41°C (low = +10°C, high = +35°C) ALARM
CPU_PWM: 255
Fan2_PWM: 255
Fan3_PWM: 99
vid: +1.500 V (VRM Version 9.0)

The problem is that the commands "modprobe eeprom" and "modprobe lm85" give the following warning messages:
Wed Jun 27 20:34:51 2007: WARNING: Error inserting i2c_core (/lib/modules/2.6.18/kernel/drivers/i2c/i2c-core.ko): Invalid module format
Wed Jun 27 20:35:24 2007: WARNING: Error inserting i2c_core (/lib/modules/2.6.18/kernel/drivers/i2c/i2c-core.ko): Invalid module format

Besides the first modules is loaded rather slowly-I have to wait about a minute to get the console free. During that time top attests to more than 90% CPU usage.
In syslog I get the following information concerning these modules:
Jun 27 20:34:25 marto kernel: i2c_core: exports duplicate symbol i2c_register_driver (owned by kernel)
Jun 27 20:34:25 marto kernel: i2c_algo_bit: exports duplicate symbol i2c_bit_add_bus (owned by kernel)
Jun 27 20:35:24 marto kernel: lm85 0-002e: Client (0,0x2e) config is locked.

I want to emphasize that without loading the eeprom and lm85 modules, sensors does not work.

Any suggestions will be appreciated.

Regards,
Martin

Tux-Slack 06-27-2007 01:57 PM

The problem is with the i2c_core module not your eeprom and that other one. Try to load that module manually first. I know I have to load it :)

tramni1980 06-27-2007 04:41 PM

I rmmod-ded the eeprom and lm85 modules and then:
root@marto:~# modprobe i2c_core
FATAL: Error inserting i2c_core (/lib/modules/2.6.18/kernel/drivers/i2c/i2c-core.ko): Invalid module format

Then I rmmod-ded the first two modules, and on "modprobe i2c_core" I got again:
FATAL: Error inserting i2c_core (/lib/modules/2.6.18/kernel/drivers/i2c/i2c-core.ko): Invalid module format

Any suggestions?

Regards,
Martin

H_TeXMeX_H 06-27-2007 05:07 PM

Usually one gets 'Invalid module format' when the kernel modules don't match the kernel architecture exactly ... different kernel version or different processor options between kernel and modules.

tramni1980 06-28-2007 01:38 AM

Quote:

Originally Posted by H_TeXMeX_H
Usually one gets 'Invalid module format' when the kernel modules don't match the kernel architecture exactly ... different kernel version or different processor options between kernel and modules.

So what should I do? Is there a way around this problem other than kernel compilation? Anyway, sensors seem to work despite that warning message, as I said in m first post.

Tux-Slack 06-28-2007 04:47 AM

Now I remember. I had that same problem. But I don't know how I fixed it.
For first I wasn't using 2.6.18 because I compiled my own 2.6.20.7, but I think I had to compile i2c into the kernel not as a module. But I might be wrong.

tramni1980 06-28-2007 05:50 AM

Anyway, lm_sensors seem to work, so does ksensors-the kde frontend. Can I rely on their indications, given the warnings I get at module loadings?

Tux-Slack 06-28-2007 07:50 AM

That I wouldn't know. Supose you could test with a termometer and lm_sensors.
Open up the laptop and attach the termometer to the CPU cooler and watch the temp, and then run sensors so you'll see if it's ok or not. But take this as a note: Sensors don't watch the cooler temperature but the CPU temperature so they might be slightly diferent.

H_TeXMeX_H 06-29-2007 09:51 PM

Quote:

Originally Posted by H_TeXMeX_H
Usually one gets 'Invalid module format' when the kernel modules don't match the kernel architecture exactly ... different kernel version or different processor options between kernel and modules.

Actually, it could also happen if you use a higher version of gcc to compile it than was used to compile the kernel ...

H_TeXMeX_H 06-30-2007 01:08 PM

You might also want to get the latest lm_sensors and install that. For example lm_sensors will only work here on my desktop if it's the latest version.

tramni1980 06-30-2007 02:16 PM

The temperature indications of ksensors seem to be correct. So I think the warning message I get at module loading does not affect the indications of at least the temperature indications. I still do not dare to embark on kernel compilation, so I prefer to be satisfied with what it is.
I just wondered if there could be some way round these warning messages, other than kernel compilation ...
And concerning the versions of gcc that have compiled lm_sensors and the kernel itself, after all I am using the stock Slackware 11.0 test26.s kernel and the stock package lm_sensors-2.10.0 with libsensors-2.10.0. So they should have been compiled with the same version of gcc, shouldn't they?

H_TeXMeX_H 06-30-2007 02:23 PM

Just 'removepkg' the old lm_sensors, grab the latest lm_sensors and install it from source (it takes less than 1 min to do this, as long as you have kernel source installed).

tramni1980 06-30-2007 02:43 PM

Quote:

Originally Posted by H_TeXMeX_H
Just 'removepkg' the old lm_sensors, grab the latest lm_sensors and install it from source (it takes less than 1 min to do this, as long as you have kernel source installed).

Ok, so I downloaded the lm_sensors-2.10.3, issued "make all" in the untarred source directry, but it ended with the following:

sed -e 's@^\(.*\)\.o:@lib/chips.ad lib/chips.ao: Makefile '`dirname lib/chips.ad`/Module.mk' @' > lib/chips.ad
gcc -M -MG -I. -Ikernel/include -I/usr/local/include -DSYSFS_SUPPORT -fpic -D_REENTRANT -Wall -O2 lib/proc.c | \
sed -e 's@^\(.*\)\.o:@lib/proc.ld lib/proc.lo: Makefile '`dirname lib/proc.ld`/Module.mk' @' > lib/proc.ld
gcc -M -MG -I. -Ikernel/include -I/usr/local/include -DSYSFS_SUPPORT -fpic -D_REENTRANT -Wall -O2 lib/chips.c | \
sed -e 's@^\(.*\)\.o:@lib/chips.ld lib/chips.lo: Makefile '`dirname lib/chips.ld`/Module.mk' @' > lib/chips.ld
make: *** No rule to make target `linux/i2c-proc.h', needed by `kernel/chips/xeontemp.d'. Stop.

So long as I could understand I just had to issue make all and then make install.Alas, make all failed. Any ideas?

tramni1980 06-30-2007 02:57 PM

Sorry for posting so quickly, it was my fault of course. I had to issue make user and then trackinstall -i='make user_install'. Anyway, I now have lm_sensors-2.10.3, but the same Warning message appears when I modprobe eeprom and lm85 :(

H_TeXMeX_H 06-30-2007 06:13 PM

So you have an unmodified test26.s along with the correct modules installed ? If so, then it should work. Don't know of too much else to suggest.


All times are GMT -5. The time now is 04:23 PM.