cpufreq not working with 3.0.0-12.21 kernel from voria ppa

Discussions about Linux installation and configuration on Samsung laptops
Post Reply
knubamtolf
Newbie
Newbie
Posts: 4
Joined: 18 Oct 2011, 23:34

cpufreq not working with 3.0.0-12.21 kernel from voria ppa

Post by knubamtolf »

After upgrading to 11.10 oneiric and re-enabling the voria repository I got the update to kernel 3.0.0-12.21 from the ppa. With that frequency scaling on my N510 isn't working anymore because the kernel loads p4-clockmod instead of acpi-cpufreq.
This creates this message:

Code: Select all

[   42.171867] p4-clockmod: Warning: EST-capable CPU detected. The acpi-cpufreq module offers voltage scaling in addition to frequency scaling. You should use that instead of p4-clockmod, if possible.
[   42.177122] p4-clockmod: P4/Xeon(TM) CPU On-Demand Clock Modulation available
[   42.532274] ondemand governor failed, too long transition latency of HW, fallback to performance governor
Renaming p4-clockmod.ko works around it so then acpi-cpufreq handles it as expected.

However this only happens with the kernel from this repository. The official 3.0.0-12.20 in Ubuntu (and newer vanilla kernels) don't show this behaviour.

Does this also happen on other netbooks? And maybe someone finds a solution? ;-)
clem
Newbie
Newbie
Posts: 2
Joined: 24 Oct 2011, 22:15

Re: cpufreq not working with 3.0.0-12.21 kernel from voria p

Post by clem »

Hello,

It's my first post here but I'm not a new user of "Linux on my Samsung".

I have the same problem as you. I thought it was caused by my new distribution (xubuntu instead of ubuntu, same problem with lubuntu) but I think it could have happened since kernel 3.0

I tried to put "p4_clockmod" in /etc/modprobe.d/blacklist.conf but it is still loaded. It's impossible to rmmod it nor to modprobe acpi-cpufreq.

Info : I can put my proc in "userspace" governor by echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

Edit : my machine is a samsung n220 plus. I'm running XUbuntu 11.10 with kernel 3.0.0-12-generic

EDIT 2 : I renamed p4-clockmod.ko too, and acpi-cpufreq loads instead of it. I can now switch between governors :)
But I think it should be a temporary workaround...
And there's still a problem : the min frequency is 1 GHz but my CPU can go down to 800 MHz (I think that it's what it used on 2.6.x)
knubamtolf
Newbie
Newbie
Posts: 4
Joined: 18 Oct 2011, 23:34

Re: cpufreq not working with 3.0.0-12.21 kernel from voria p

Post by knubamtolf »

Glad to hear I'm not the only one. I'm also on Xubuntu though I can't imagine that this could be the reason for the problem.
But after getting rid of p4-clockmod my N510 shows no abnormalities. The lowest frequency is 800MHz and that is what it spends most of the time in.

I think trying to blacklist the driver doesn't work because it is loaded in an early stage of the boot process directly by the kernel and not by the OS via modprobe.

Btw. I just compared the kernel config files from the Ubuntu and the Voria kernel. And there are only 2 differences:
1. CONFIG_VERSION_SIGNATURE but that's just the string you get via uname
2. CONFIG_X86_ACPI_CPUFREQ This one is compiled into the default kernel (=y) but the Voria kernel builds it as module (=m)

So the 2. difference is the reason for the problem. I would consider it an upstream bug but still it would be interesting to know why Voria decided to build it as module.

And now I remember that I had to compile the correct driver into the kernel I use on my desktop box (Phenom 2 with Gentoo) because otherwise it also loaded the wrong one (acpi instead of k8). So there is really something not right in Linux...
User avatar
voria
Administrator
Administrator
Posts: 1383
Joined: 12 Feb 2009, 18:08
Location: Italy
Contact:

Re: cpufreq not working with 3.0.0-12.21 kernel from voria p

Post by voria »

As you already stated, the kernels on my PPA are identical to the official ones from Ubuntu, with the only difference that 'acpi-cpufreq' is built as module. This allows the use of the PHC module for CPU undervolting (the 'phc-intel' module needs to be loaded at boot as replacement of 'acpi-cpufreq'; the latter cannot be replaced if it's statically built into the kernel).

The problem is, when the 'acpi-cpufreq' module is not built into the kernel, it's not automatically loaded at boot. This is why I also added 'cpufrequtils' as an additional dependency of my kernels, which is a collection of boot scripts that should load automatically the correct module at boot.

I think your problem is caused by 'cpufrequtils'. For some reason it loads the wrong module.

So, I'm now trying a different approach.
I've created a new package, called 'load-acpicpufreq-atboot', which simply adds 'acpi-cpufreq' module to /etc/modules, so it gets loaded automatically.
It's being built right now on my testing PPA, along with a new kernel which depends on it.

This should fix your problem, test it and let me know.
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!
User avatar
voria
Administrator
Administrator
Posts: 1383
Joined: 12 Feb 2009, 18:08
Location: Italy
Contact:

Re: cpufreq not working with 3.0.0-12.21 kernel from voria p

Post by voria »

I've already moved the 2 new packages from my testing PPA to the "Linux On My Samsung" PPA, as I can't see any side effect on this new approach.

Note that the previously installed 'cpufreutils' is not automatically removed, you need to remove it manually.
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!
knubamtolf
Newbie
Newbie
Posts: 4
Joined: 18 Oct 2011, 23:34

Re: cpufreq not working with 3.0.0-12.21 kernel from voria p

Post by knubamtolf »

Just tried it and it works like a charme.

Thanks for the great work!
clem
Newbie
Newbie
Posts: 2
Joined: 24 Oct 2011, 22:15

Re: cpufreq not working with 3.0.0-12.21 kernel from voria p

Post by clem »

It works for me too, great :D
Thank you !

Do you have any idea about the reason why the min frequency is now 1 GHz instead of 800 Mhz ?
knubamtolf
Newbie
Newbie
Posts: 4
Joined: 18 Oct 2011, 23:34

Re: cpufreq not working with 3.0.0-12.21 kernel from voria p

Post by knubamtolf »

clem, it seems that this is a problem with the N450 atom and Linux.

There is already an (unanswered) entry here in the forum http://www.voria.org/forum/viewtopic.php?f=3&t=896
and I found more in other forums.

If you read through http://forums.auroraos.org/viewtopic.php?f=56&t=5530 it seems that either Linux can't do the change of the FSB that is necessary to get the 800 MHz on the N450 or it just doesn't show it correctly.
Post Reply