2003-11-27 11:40:35

by Simon

[permalink] [raw]
Subject: [2.6.0-test10] cpufreq: 2G P4M won't go above 1.2G - cpuinfo_max_freq too low

Sorry... I posted this to the cpufreq list yesterday but I didn't get a
response. Apologies for crossposting.

I've just upgraded to 2.6.0-test10 and am trying to use the new cpufreq stuff
in there. I had everything working perfectly with 2.4.21-ac2, and the old
/proc/cpufreq interface.

I have a P4 2ghz (in a thinkpad), but it's not running at over about 1.2ghz
now. If I `cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq` it
tells me: "1198976". It should go faster than that. Similarly,
scaling_available_frequencies says "149872 299744 449616 599488 749360 899232
1049104 1198976"

Enabling the old interface in the kernel and doing a `echo -n
0%0%100%performance > /proc/cpufreq` doesn't change things either.

Here is my /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Mobile Intel(R) Pentium(R) 4 - M CPU 2.00GHz
stepping : 7
cpu MHz : 1198.976
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat
pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid
bogomips : 2359.29

Any ideas?

Cheers,
Simon



2003-11-27 12:18:14

by Marco Roeland

[permalink] [raw]
Subject: Re: [2.6.0-test10] cpufreq: 2G P4M won't go above 1.2G - cpuinfo_max_freq too low

On Thursday November 27th 2003 Simon wrote:

> I have a P4 2ghz (in a thinkpad), but it's not running at over about 1.2ghz
> now. If I `cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq` it
> tells me: "1198976". It should go faster than that. Similarly,
> scaling_available_frequencies says "149872 299744 449616 599488 749360 899232
> 1049104 1198976"

Don't know if this will help you, but I had the exact same problem on a
Compaq EVO N1050v (well 1.8 GHz instead of 2.0 GHz and it initially only
managed 1.2 GHz as mentioned in /proc/cpuinfo and from benchmarks).

It turned out to be an ACPI problem. Booting on 2.6 with "acpi=off" lead
to the correct 1.8GHz determination instead of only 1.2GHz, but no working
ACPI of course. On 2.4.21 booting either with of without ACPI made no
difference and lead on both occasions to 1.8GHz.

After upgrading the BIOS to the latest version I could finally run 2.6
with ACPI and at full capacity.

Incidentally a certain other OS which shall remain unnamed, reported the
maximum speed also as 1.2 GHz before the BIOS upgrade and as 1.8 GHz
after, but worked both times at 1.8 GHz, just as in Linux 2.4 ;-) After
this final hurdle had been straddled I regained control of /dev/hda1;
Anton does great work on NTFS, but I have work to do!
--
Marco Roeland

2003-11-27 13:23:53

by Simon

[permalink] [raw]
Subject: Re: [2.6.0-test10] cpufreq: 2G P4M won't go above 1.2G - cpuinfo_max_freq too low

> On Thursday November 27th 2003 Simon wrote:
> > I have a P4 2ghz (in a thinkpad), but it's not running at over about
> > 1.2ghz now.

On Thursday 27 November 2003 12:18 pm, Marco Roeland wrote:
> It turned out to be an ACPI problem. Booting on 2.6 with "acpi=off" lead
> to the correct 1.8GHz determination instead of only 1.2GHz, but no working
> ACPI of course. On 2.4.21 booting either with of without ACPI made no
> difference and lead on both occasions to 1.8GHz.
>
> After upgrading the BIOS to the latest version I could finally run 2.6
> with ACPI and at full capacity.

I tried both of these, but the BIOS update changed nothing, and "acpi=off"
just switched off acpi. The only thing I can tell is that my battery icon in
KDE has disappeared... My CPU speed remains unaffected. *sigh*

On Thursday 27 November 2003 12:15 pm, Marc Staudacher wrote off-list:
> Is it the case that you're running the notebook i) with the battery
> inserted and ii) ac-powered?
>
> It is custom to IBM Thinkpads that they only run at full speed if it is
> the case that i) and ii).
>
> According to IBM the battery is necessary because it is possible that
> the power supply does not generate enough energy in certain cases
> (maximal load-scenarios). Thus, the maximal processor speed is
> automatically restricted if the battery is not inserted.
>
> The ACPI changes between 2.4.21-ac2 and 2.6.0-test10 might account for
> the different behaviour you experience.

Yes, it is. I left my battery at home today, but borrowed one off a colleague.
Inserting it did not change anything (at least after a minute or so) but
rebooting with the battery insterted did speed the machine up. Similarly,
after removing the battery, the CPU stayed at full speed.

Is there anything I can do about this apart from go back to 2.4 (I've grown to
like CONFIG_PREEMPT too much for that!) or run with the battery in all the
time? - I've a string of past laptops where the batteries only last 5 minutes
because of running with battery + ac power all the time, so I've been in the
habit of always removing it these days... - I've never had a problem running
it at max speed with 2.4.

Seems that this is a fault of a better implementation of something... But
"better" to me shouldn't take away choice of cpu speed from the user? ;)

Thanks,
Simon


2003-11-27 13:42:57

by Marco Roeland

[permalink] [raw]
Subject: Re: [2.6.0-test10] cpufreq: 2G P4M won't go above 1.2G - cpuinfo_max_freq too low

At Thursday November 27th 2003 Simon wrote:

> Is there anything I can do about this apart from go back to 2.4 (I've grown to
> like CONFIG_PREEMPT too much for that!) or run with the battery in all the
> time? - I've a string of past laptops where the batteries only last 5 minutes
> because of running with battery + ac power all the time, so I've been in the
> habit of always removing it these days... - I've never had a problem running
> it at max speed with 2.4.

Well running without battery might cause problems, why disable a fine
UPC when it's there. ;-)

> Seems that this is a fault of a better implementation of something... But
> "better" to me shouldn't take away choice of cpu speed from the user? ;)

One last straw you might try, is building all the different cpufreq
drivers as modules, and trying if modprobeing one of them might work.
They seem to all behave slightly differently with respect to what they
assume to be true from the ACPI reported values, and what they try on
their own.
--
Marco Roeland

2003-11-27 14:57:59

by Simon

[permalink] [raw]
Subject: Re: [2.6.0-test10] cpufreq: 2G P4M won't go above 1.2G - cpuinfo_max_freq too low

On Thursday 27 November 2003 1:42 pm, Marco Roeland wrote:

> > Seems that this is a fault of a better implementation of something... But
> > "better" to me shouldn't take away choice of cpu speed from the user? ;)
>
> One last straw you might try, is building all the different cpufreq
> drivers as modules, and trying if modprobeing one of them might work.
> They seem to all behave slightly differently with respect to what they
> assume to be true from the ACPI reported values, and what they try on
> their own.

You're a star, thankyou. It was loading p4-clockmod by default. I had all the
pentium-related modules compiled in, and it was behaving like that... dmesg
said it was loading p4-clockmod.

I modprobe'd speedstep-ich instead, and foom! Straight up to 2ghz.

Thanks,
Simon


2003-11-27 15:24:18

by Marco Roeland

[permalink] [raw]
Subject: Re: [2.6.0-test10] cpufreq: 2G P4M won't go above 1.2G - cpuinfo_max_freq too low

On Thursday November 27th 2003 Simon wrote:

> You're a star, thankyou. It was loading p4-clockmod by default. I had all the
> pentium-related modules compiled in, and it was behaving like that... dmesg
> said it was loading p4-clockmod.
>
> I modprobe'd speedstep-ich instead, and foom! Straight up to 2ghz.

Thanks to Linux and modules! I find that the detailed logging sent by
modules as they are loaded is generally very helpful.

When dealing with unknown or misbehaving hardware, be it soundcards, USB
gadgets, FireWire camcorders or whatever, compiling all relevant drivers
as modules and experimenting with modprobe often gives new insights and
with any luck you'll even find the setup that makes it work! ;-)
--
Marco Roeland