# Freq should be within 1.60 GHz and 1.60GHz?

## pstar

Hi,

I've spend a good portion of last night trying to figure out why simple cpufreq doesn't working on my desktop, either doesn't working cpufreqd.

Basically I followed the Gentoo wiki about CPU scaling, but always end up with the wire situation that my CPU want stay on 1.6Ghz despite the

fact that it is a Core2 Duo E7200 and should be running at 2.53GHz.

Here is the detailed info

```
cpufreq-info

cpufrequtils 005: cpufreq-info (C) Dominik Brodowski 2004-2006

Report errors and bugs to cpufreq@vger.kernel.org, please.

analyzing CPU 0:

  driver: acpi-cpufreq

  CPUs which need to switch frequency at the same time: 0

  hardware limits: 1.60 GHz - 2.53 GHz

  available frequency steps: 2.53 GHz, 1.60 GHz

  available cpufreq governors: conservative, ondemand, powersave, userspace, performance

  current policy: frequency should be within 1.60 GHz and 1.60 GHz.

                  The governor "performance" may decide which speed to use

                  within this range.

  current CPU frequency is 1.60 GHz.

analyzing CPU 1:

  driver: acpi-cpufreq

  CPUs which need to switch frequency at the same time: 1

  hardware limits: 1.60 GHz - 2.53 GHz

  available frequency steps: 2.53 GHz, 1.60 GHz

  available cpufreq governors: conservative, ondemand, powersave, userspace, performance

  current policy: frequency should be within 1.60 GHz and 1.60 GHz.

                  The governor "performance" may decide which speed to use

                  within this range.

  current CPU frequency is 1.60 GHz.

```

As you can see, it doesn't whihc Governor I am using, even for performance, it is still same.

I am thinking that I could possible edit some configure file that I can specify the freq range for my CPU

but didn't find any thing in Google, and it almost morning now...

----------

## SinoTech

You can get available frequencies with the following command:

```

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies

1833000 1333000 1000000

```

Minimum/maximum frequency can be set through the following files:

```

/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

```

You should ensure that they contain the min/max values as obtained from "scaling_available_frequencies". If not you can simply set them as follows:

```

$ echo 1000000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

$ echo 1833000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

```

Cheers,

Sino

EDIT:

Each core has its own directory in /sys. So you find the same files for the second core in "/sys/devices/system/cpu/cpu1/cpufreq/".

----------

## pstar

Hi Sino thank you for the reply.

I managed using 

```
cpufreq-set -u 2530MHz
```

and

```
cpufreq-set -c -1 -u 2530M
```

for setting up for the frequency to: "frequency should be within 1.60 GHz to 2.53 GHz" but find out the frequency will reverse to

the same after a few seconds.

Seems the root are not the setting for cpufreq, and I digged down to the log file and find out that even though I removed cpufreqd from portage

and removed it from rc, it is still running and some config error with cpufreqd make its using a mismatched rule. So as a result, the cpufreqd 

interfered with cpufrequtils and after I fixed cpufreqd, it is seems working again.Last edited by pstar on Sun May 16, 2010 10:55 am; edited 1 time in total

----------

## DaggyStyle

 *pstar wrote:*   

> Hi,
> 
> I've spend a good portion of last night trying to figure out why simple cpufreq doesn't working on my desktop, either doesn't working cpufreqd.
> 
> Basically I followed the Gentoo wiki about CPU scaling, but always end up with the wire situation that my CPU want stay on 1.6Ghz despite the
> ...

 

a little tip, I had the exact problem on my laptop with conjunction to the heat temp, in the end, the problem was the hsf which was worn out.

check if it is heat related first.

----------

## pstar

Thank you DaggyStyle, your story once again tell me the importance of think out of the box  :Smile: 

Our result seems very similar, but the root are quite different, but think again, both come goes far more than

change some setting related to cupfrequtils. In my case it is a misconfigured cpufreqd daemon, it doesn't working

with the default settings plus a few changes and I just removed it instead. In your case, I believe it is a hardware

issue force the cpufrequtils doing the right thing and pretty locked it into a low freq.

----------

## DaggyStyle

 *pstar wrote:*   

> Thank you DaggyStyle, your story once again tell me the importance of think out of the box 
> 
> Our result seems very similar, but the root are quite different, but think again, both come goes far more than
> 
> change some setting related to cupfrequtils. In my case it is a misconfigured cpufreqd daemon, it doesn't working
> ...

 

I don't use cpufreqd daemon, infact, it isn't needed...

----------

## asturm

I see similar behaviour with cpufrequtils where my Core2 Duo quite often wouldn't go above 1.6 GHz (max would be 1.87 Ghz) no matter how much strain I put on both cores. There have been situations were it wouldn't go below 1.6 GHz instead, this is quite weird. Same for kernels 2.6.32 to 2.6.34.

----------

## pstar

Hi Genstorm, in my case, the CPU can only change between 1.6 to 2.53GHz and because of cpufreqd which in fact probably not necessary and complicated things 

bit more was using a rule scale CPU freq from 0% to 80% thus in fact locked my CPU to 1.6G. my kernel is 2.6.32.

----------

## erik258

Hey all, 

Glad to see some people seem to know a bit about this.  I seem to have the same problem on my intel atom processor.  The bios informs me that it should be happy to run at it's spec'd 1.6gHz, but `cpufreq_info` - and `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies` both insist that 1.333, 1.066, and .8 gHz are the only acceptable frequency scaling values.   Writing '1600000' in to  /sys/devices/system/cpu/cpu[0-1]/cpufreq/scaling_max_freq, sadly, did nothing.  

I also am noticing now that I'm poking around in /sys/devices/system/cpu/cpu1/cpufreq/ that bios_limit agrees that 1.33 is the maximum.  

does anybody have a suggestion as to how I could get another 300 mHz out of this thing? 

Thanks much!

----------

## NotQuiteSane

 *erik258 wrote:*   

> does anybody have a suggestion as to how I could get another 300 mHz out of this thing?

 

Flash your bios to current.  or failing that, disable frequency scaling in bios

NQS

----------

## asturm

You realize that's no solution?

Currently I think it's a kernel bug affecting Core2 owners, but haven't got the time yet to dive into it. Sometimes it works, sometimes not, but it never changes behavior during uptime - so it seems something goes possibly wrong during init time. Also, an attempt to debug the kernel (debug locks) resulted in a completely b0rked startup where it seemed to panic-loop forever.  :Rolling Eyes: 

----------

## DaggyStyle

 *genstorm wrote:*   

> You realize that's no solution?
> 
> Currently I think it's a kernel bug affecting Core2 owners, but haven't got the time yet to dive into it. Sometimes it works, sometimes not, but it never changes behavior during uptime - so it seems something goes possibly wrong during init time. Also, an attempt to debug the kernel (debug locks) resulted in a completely b0rked startup where it seemed to panic-loop forever. 

 

not here on two core2 cpus.

----------

## erik258

I've never seen it before either; only on this atom do I have the problem.  I think my old atom scaled fine, but I'm not sure about that.  Anyway, my chip does scale, just not all the way up to 100%. 

 *Quote:*   

> Flash your bios to current. or failing that, disable frequency scaling in bios

 

Unfortunately, I already have the most current BIOS version on this thing.  But I do think you might be onto something - I wonder if it's a BIOS bug that the frequency is not being correctly reported.  Who knows - things are made so shoddily these  days, maybe my netbook can't run at full speed or it will overheat, so acer had to underclock it in the bios or something.  Still, that seems silly because the bios's post data correctly identifies it as a 1.66gHz processor.  

Disabling frequency scaling is something that might be worth playing with, just to see what it does.  Since it's a highly mobile device, leaving frequency scaling disabled for the long term is probably not nearly as valuable as increased power savings, even though I'm not getting max speeds from my proc.  

But, you know, it's interesting to look at the output of dmidecode compared with the BIOS output.  dmidecode says: 

```
        Version: Intel(R) Atom(TM) CPU N280   @ 1.66GHz

        Voltage: 1.6 V

        External Clock: 667 MHz

        Max Speed: 1666 MHz

        Current Speed: 1666 MHz
```

but cpufreq-info says:

```

hardware limits: 800 MHz - 1.33 GHz

available frequency steps: 1.33 GHz, 1.07 GHz, 800 MHz

current CPU frequency is 800 MHz (asserted by call to hardware).

```

.  

And the BIOS says 1.66gHz when it boots, but only 533mHz FSB.   (sorry I can't post this).  

So let's see, 1666/667 = 2.5.  That's probably my multiplier.  2.5*533 = 1.33gHz.  

Why, if I weren't mistaken, I'd say my machine is running with the wrong FSB!  

Core2 owners with a similar issue, does this corroborate with your findings?

[edit] 

Oooh, I take it back!  Looks like acer has actually released 2 new bioses for my device, one of which is supposed to 'fix frequency of N280 in windows 7'.  Looks like you might have been right, this might be a BIOS problem, at least for me.  I'll let you know what happens once I upgrade!

----------

## asturm

@erik258: You might have a different problem than me here. Frequency steps are shown correctly by cpufreq-info, FSB is set as it should, but sometimes the CPU either doesn't go below or above 1.6 GHz. And this here is a fine Thinkpad running its latest available BIOS.

----------

## NotQuiteSane

 *genstorm wrote:*   

> You realize that's no solution?

 

Dunno if this was addressed to me or not.

 *erik258 wrote:*   

> Unfortunately, I already have the most current BIOS version on this thing.  But I do think you might be onto something - I wonder if it's a BIOS bug that the frequency is not being correctly reported.  Who knows - things are made so shoddily these  days, maybe my netbook can't run at full speed or it will overheat, so acer had to underclock it in the bios or something.  Still, that seems silly because the bios's post data correctly identifies it as a 1.66gHz processor.  
> 
> <snip>
> 
> Why, if I weren't mistaken, I'd say my machine is running with the wrong FSB! 
> ...

 

I was having that same problem with this, lenovo s10-2 running a n280.  Did a bunch of reseach and found it was a "chip wide" (vs limited to one or 2 manufactures) problem.  started to see BIOS updates to solve the problem, had the board die on this.  sent in for warrentee, and the replacement unit had the bios update.  now I see on this:

```
[nqs@pixel nqs]% cpufreq-info 

cpufrequtils 005: cpufreq-info (C) Dominik Brodowski 2004-2006

Report errors and bugs to cpufreq@vger.kernel.org, please.

analyzing CPU 0:

  driver: acpi-cpufreq

  CPUs which need to switch frequency at the same time: 0

  hardware limits: 800 MHz - 1.60 GHz

  available frequency steps: 1.60 GHz, 1.33 GHz, 1.07 GHz, 800 MHz

  available cpufreq governors: conservative, powersave, userspace, ondemand, performance

  current policy: frequency should be within 800 MHz and 1.60 GHz.

                  The governor "ondemand" may decide which speed to use

                  within this range.

  current CPU frequency is 800 MHz.

analyzing CPU 1:

  driver: acpi-cpufreq

  CPUs which need to switch frequency at the same time: 1

  hardware limits: 800 MHz - 1.60 GHz

  available frequency steps: 1.60 GHz, 1.33 GHz, 1.07 GHz, 800 MHz

  available cpufreq governors: conservative, powersave, userspace, ondemand, performance

  current policy: frequency should be within 800 MHz and 1.60 GHz.

                  The governor "ondemand" may decide which speed to use

                  within this range.

  current CPU frequency is 800 MHz.

[nqs@pixel nqs]% 
```

for refrence:

```
processor       : 1

vendor_id       : GenuineIntel

cpu family      : 6

model           : 28

model name      : Intel(R) Atom(TM) CPU N270   @ 1.60GHz

stepping        : 2

cpu MHz         : 800.000

cache size      : 512 KB

physical id     : 0

siblings        : 2

core id         : 0

cpu cores       : 1

apicid          : 1

initial apicid  : 1

fdiv_bug        : no

hlt_bug         : no

f00f_bug        : no

coma_bug        : no

fpu             : yes

fpu_exception   : yes

cpuid level     : 10

wp              : yes

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 xtpr pdcm movbe lahf_lm

bogomips        : 3192.00

clflush size    : 64

cache_alignment : 64

address sizes   : 32 bits physical, 32 bits virtual

power management:

[nqs@pixel nqs]% 
```

(there's 2, but first is the same, so...)

NQS

----------

## meyerm

To add another "me too": I'm using a DELL Latitude 6400 with a P9600 Core2Duo. It is capable of scaling between 800 MHz and 2.6 GHz. I always used the "ondemand" governor in the kernel directly. I don't know when it stopped working, but since some weeks the computer stops scaling back to 800 Mhz and set the scaling_max_freq to the minimum frequency. Only a reboot helps.

I'll report back when I have some solution (please do the same, guys  :Wink:  ).

----------

