Invalid module format

Hi, I have a problem with loading the powersaving kernel module p4-clockmod.ko. When I try inserting the module (via modprobe or insmod) I get

FATAL: Error inserting p4_clockmod (/lib/modules/2.6.31.8-mediaserver/extra/p4-clockmod.ko): Invalid module format

The module has been compiled together with the kernel. Other modules load with no problem at all.

I’ve tried recompiling the kernel (after re-installing the sources, make xconfig from scratch) - no avail. There’s only one kernel source package installed. Searching the forum and google didn’t yield a helping answer.

What should I do next?

Thank’s for any advice.
Felix

Oh, and I forgot:

The weird thing is that it used to work previously. The only thing I changed was that I replaced the disk containing /home and my swap partition. But that really shouldn’t affect kernel modules, should it?

Thanks again,
Felix

Did you edit the fstab file to take this in to account?

From a su terminal I need:

fdisk -l

and

cat /etc/fstab

Hi
Why are you using an obsolete module you cannot use acpi_cpufreq module?


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.39-0.3-default
up 4 days 12:35, 4 users, load average: 0.05, 0.06, 0.02
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18

@caf4926
Yes, I did update my fstab accordingly. Here’s the output:

# fdisk -l

Disk /dev/sda: 8019 MB, 8019099648 bytes
255 heads, 63 sectors/track, 974 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00044733

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         974     7823623+  83  Linux

Disk /dev/sdb: 128.0 GB, 128035676160 bytes
255 heads, 63 sectors/track, 15566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xb09c1668

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         132     1060258+  82  Linux swap / Solaris
/dev/sdb2             133       15566   123973605   83  Linux


# cat /etc/fstab

/dev/disk/by-id/scsi-SATA_TRANSCEND_0_00100A5A-part1 /                    ext3       noatime,acl,user_xattr        1 1
/dev/disk/by-id/scsi-SATA_Kingston_SSDNow06P9A0017396-part2 /home                ext3       noatime,acl,user_xattr        1 2
/dev/disk/by-id/scsi-SATA_Kingston_SSDNow06P9A0017396-part1 swap                 swap       defaults              0 0
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

@malcolmlewis
Hmm, p4-clockmod used to do what I need. Is acpi_cpufreq at least as good?

Felix

Is swap and your new /home showing up OK in the booted sys?

Yes, they do. /home is accessible as before and

# free
             total       used       free     shared    buffers     cached
Mem:       1027380     386412     640968          0      85396     244888
-/+ buffers/cache:      56128     971252
Swap:      1060248          0    1060248

Hi
What release are you running?


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.39-0.3-default
up 4 days 13:16, 4 users, load average: 0.27, 0.40, 0.18
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18

Hi,

I’m running openSUSE 11.2 with the latest kernel 2.6.31.8.

Felix

Hi
So, I’m assuming you compiled the original module against 2.6.31.5?
I’ve seen that error when changing kernel types, eg default to pae.

But AFAIK, this module was dropped and acpi_cpufreq used instead.

Have you tried running the command cpufeq-info on a stock kernel?


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.39-0.3-default
up 4 days 13:34, 4 users, load average: 0.14, 0.09, 0.09
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18

Hi Malcolm,

no, the only kernel source installed is the one for 2.6.31.8-default. The module was compiled together with the kernel as I wrote in my opening post

The module doesn’t appear to have been dropped though, as the sources are still there in 2.6.31.8-default…

I haven’t tried cpufreq-info on the stock kernel yet. Could the output help in any way?

Thank you very much for your time and your immediate replies.
Felix

Hi
If I’m compiling a kernel, I use user lwfingers method;
http://forums.opensuse.org/pre-release-beta/421320-questions-help-regarding-kernel-2-6-31-a.html

Else I just build a kmp module via build service (rpm). Looking at the
config data, it is recommended to use speedstep.


config X86_P4_CLOCKMOD
tristate "Intel Pentium 4 clock modulation"
select CPU_FREQ_TABLE
help
This adds the CPUFreq driver for Intel Pentium 4 / XEON
processors.  When enabled it will lower CPU temperature by
skipping clocks.

This driver should be only used in exceptional
circumstances when very low power is needed because it causes
severe slowdowns and noticeable latencies.  Normally
Speedstep should be used instead.

To compile this driver as a module, choose M here: the
module will be called p4-clockmod.

For details, take a look at <file:Documentation/cpu-freq/>.

Unless you are absolutely sure say N.

I wonder if you had a bad kernel build, did you nohup the output to
review any errors?


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.39-0.3-default
up 4 days 14:20, 4 users, load average: 0.13, 0.31, 0.22
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18

Hi Malcolm,

I actually did ‘make’ as root :’( - didn’t know that this could cause problems. I’ve been doing that since I don’t know when and it always completed without any problems. There weren’t any obvious problems this time as well.

However, I will take this into account and try again as a regular user. I usually did my kernel compilations using the “current” kernel config. Only this time I tried with a config from scratch because I imagined that could have caused the problem.

Will keep you posted…

Felix

Hi,

I rebuilt the kernel as non-root now. Unfortunately, that didn’t change anything. I tried inserting the acpi_cpufreq module as an alternative, but the same problem: invalid module format…

I think I’ll now try cpufreq-info on the stock kernel.

Felix

Hi
Ok, if that doesn’t work, will show you how to build a kmp module.


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.39-0.3-default
up 4 days 22:13, 4 users, load average: 0.31, 0.14, 0.14
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18

I found the problem! You wouldn’t believe it. There was a spurious directory ‘/lib/modules/2.6.31.8-mediaserver/extra’ containing an older module version. I didn’t notice because modinfo said it has the correct version. When I scanned the kernel/arch/… directories I found there actually was the correct module there. Removing the ‘extra’ directory and depmod then did the trick.

I’m really sorry to have bothered you. I should have noticed. Mea culpa…

Felix

Hi
Now worries, hopefully you will use the new method for your kernel
compiling :wink:


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.39-0.3-default
up 4 days 23:20, 4 users, load average: 0.00, 0.02, 0.01
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18

Definitely, I will… :wink:

Many thanks again.

Felix