error inserting module speedstep-centrino in Ubuntu

If you have trouble with PHC you can ask and hope for help here.
Post Reply
m4cph1sto
Posts: 2
Joined: Fri 2. Jan 2009, 00:17

error inserting module speedstep-centrino in Ubuntu

Post by m4cph1sto » Fri 2. Jan 2009, 04:23

I'm trying to use the patched speedstep-centrino test release with Ubuntu 8.10, kernel 2.6.27-9-generic. I followed the guide step-by-step, but when I try to insert the patched module, I get an error:

insmod: error inserting 'arch/x86/kernel/cpu/cpufreq/speedstep-centrino.ko': -1 Invalid module format

I think this implies that there's some difference between the kernel I'm running and the source I used to compile the module, but I can't figure out why. I have previously installed a patched acpi_cpufreq following the procedure found here:

http://ubuntuforums.org/showthread.php?t=786402

But I wasn't happy with the results, so I want to switch back to speedstep-centrino, which is the default for my cpu (Pentium M).

Here is exactly what I have done:

Code: Select all

apt-get install linux-source
apt-get install build-essential
cd /usr/src
tar -xjf linux-source-2.6.27.tar.bz2
cd linux-source-2.6.27
cp /boot/config-2.6.27-9-generic /usr/src/linux-source-2.6.27/.config
make oldconfig
make prepare
make scripts
Then I copy the patch to the source directory, and then

Code: Select all

patch -p1 < linux-phc-0.2.10-kernel-vanilla-2.6.27-adopted.patch
make M=arch/x86/kernel/cpu/cpufreq
modprobe -r speedstep-centrino
insmod arch/x86/kernel/cpu/cpufreq/speedstep-centrino.ko
That last line gives me the error. Perhaps someone familiar with Ubuntu can help me figure out what I'm doing wrong?

the-fallen
Administrator
Posts: 346
Joined: Wed 9. Jul 2008, 19:57

Re: error inserting module speedstep-centrino in Ubuntu

Post by the-fallen » Fri 2. Jan 2009, 19:53

You did everything in the right way as far as I see ... should work but I am not sure why it does not.

Maybe your libc is newer than the one your kernel has been made with but thats just a guess. You could try to compile the whole kernel.

n3Cre0
Posts: 13
Joined: Sun 9. Nov 2008, 20:54

Re: error inserting module speedstep-centrino in Ubuntu

Post by n3Cre0 » Sun 11. Jan 2009, 14:15

I use these commands on Ubuntu 8.10:

Code: Select all

apt-get install linux-source
cd /usr/src
tar -xjf linux-source-2.6.27.tar.bz2
cd linux-source-2.6.27/
cp ../linux-headers-`uname -r`/Module.symvers .
cp [b]$PATHTOPATCH[/b]/linux-phc-0.3.2-kernel-vanilla-2.6.26.patch .
patch -p1 < linux-phc-0.3.2-kernel-vanilla-2.6.26.patch
cp /boot/config-`uname -r` .config
make oldconfig
make prepare
make scripts
make clean M=./arch/x86/kernel/cpu/cpufreq
make M=./arch/x86/kernel/cpu/cpufreq
cp arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko /lib/modules/`uname -r`/kernel/arch/x86/kernel/cpu/cpufreq/
rmmod acpi-cpufreq.ko
modprobe acpi-cpufreq
/etc/init.d/undervolt start
apt-get purge linux-source
sudo apt-get autoremove
rm -R linux-source-*

m4cph1sto
Posts: 2
Joined: Fri 2. Jan 2009, 00:17

Re: error inserting module speedstep-centrino in Ubuntu

Post by m4cph1sto » Mon 12. Jan 2009, 23:53

Thank you for your help, using those commands seemed to work for me. However, now I have a new problem! When using the patched module, I have no phc_* files in /sys/devices/system/cpu/cpu0/cpufreq/. When inserting the patched module speedstep-centrino, I get no errors in the terminal but dmesg outputs the following:

[ 946.454896] centrino_init
[ 946.456896] found "Intel(R) Pentium(R) M processor 2.00GHz": max frequency: 1995000kHz
[ 946.457429] cpufreq_register driver returns 0

I don't know if that last line is an error. Any ideas?

the-fallen
Administrator
Posts: 346
Joined: Wed 9. Jul 2008, 19:57

Re: error inserting module speedstep-centrino in Ubuntu

Post by the-fallen » Tue 13. Jan 2009, 17:03

So you are really sure you've inserted a patched module?

The commands n3Cre0 wrote may build all modules (depending on your kernel config) but he copies the acpi-cpufreq module, not speedstep-centrino.


Just replace the names. But you better try the module before replacing the unpatched one with the patched one. You can do this with

sudo insmod <path/to/module>/speedstep-centrino.ko

(unload the old one first)

[edit 2008-01-13 K_O-Gnom] think the-fallen means <path/to/module> not <patch/to/module> :-)

Post Reply