Very poor CPU performance, likely due to bad heat management

Hello,

When I purchased my Dell Inspiron 1764 in September 2010, with Suse 11.3
installed, there was a short “honeymoon” where the CPU performance was very
good, running 1-4 scientific experiments in parallel (my research is about
efficient algorithms for hard problems, including their implementation, and
thus I take constant measurement of efficiency of programs — the laptop
always should have at least one experiment running on it). I made however a
note at that time that the fan is very noisy.

With some update (don’t know when that happened, let’s guess January 2011)
then it become more quiet — and performance got disastrous.
Perhaps with further updates it become even worse. Always the same pattern:
when the laptop was turned off or sleeping for a longer time, to cool down,
then directly after that performance was good, and if I took extreme care
not to run more than a process at a time (for more than, say, 1s), then
that stayed so. However as soon as there were two processes, performance
decayed very quickly (within minutes), reaching a slowdown by a factor of
10 (in words, ten; that is, for example, instead of 1 minute it took
10 minutes).

I hoped with 11.4 that would be solved, however the problem persists, only
that the extreme factor of 10 perhaps disappeared, but I get a stable
and reproducible factor of 4 (that is, instead of 1.5s it takes 6s; see
below).

In order to nail it down, I’ve written a simple C++ program, which works
under Linux and Windows, and which runs through an endless loop, performing
10^9 64-bit integer multiplications and printing out process and wall-clock
timing. For comparison I run it also under Windows 7 (this is a dual-boot
machine).

With “speedstep” in the BIOS enabled (the default), the performance data is as
follows:

On Windows with one process I get 1.05s, with two processes I get 1.22s,
with three 1.36s, with four 1.51s. These times are (rough) averages, and
process- and wallclock-times basically agree (with the wallclock-times
increasing with the number of processes, but also with 4 processes just
amounting to 1% of the process-time). This I did run for 10 hours,
and nothing changed, and it is reproducible.
The temperature of the two cores (for info see below) slowly increased, and
with the 4 processes running (nothing else, of course) it reached 90 degree
Celsius after, say, 30 minutes, and it stayed roughly there.
CPU frequency with 1 process is 21.0 - 22.0 times 133 MHz (the Intel i5
has a boosting ability), with 2 process 20.5 times 133 MHz, and with three
and four processes 20.0 times 133 MHz.
That’s a reasonable performance. (By the way, the Windows scheduler achieves
a very balanced handling of the processes, even over the short times of
1 - 2 seconds, while the Linux scheduler achieves a balanced load only
over a longer time period, say 2 minutes.)

Now with Linux. Starting with a cold machine I get
one process: 1.05s (as on Windows)
two processes: each 1.13s (faster than Windows)
three processes: two 1.50s, one 1.13s
four process: each 1.50s.
HOWEVER, after about 5 minutes the frequency decreases stepwise and quickly,
and after 10s reaches for four processes the timing of each process 5.95s;
this is then stable again (at least for hours). Wall clock is somewhat higher,
and unequally distributed, say, for two processes about 0.5s higher, for two
processes negligible.
Frequency measurement doesn’t seem to work. Temperature measured by
“Bubblemon” says that 90 degrees Celsius is reached very quickly, within
say 2 minutes, and finally it reaches 95 degree Celsius. So the temperature
of 90 degrees is reached much quicker than under Windows, and also the final
temperature is higher.

Killing three processes, the remaining process uses 4.14s for at least 10
minutes, that is, it doesn’t recover.

Disabling speedstep in the BIOS, the picture is basically the same: I
considered only 1 and 2 processes, and then now the running time is the same
(for 1 or 2 processes): constant 1.26s for Windows, for Linux 1.26s for the
first 10 minutes (“cold machine”), and then rather constantly 5.02s (for at
least one hour). Temperature then stays rather constantly at 89 degree
Celsius, while the frequency measurement always just says “2.394 MHz”
(Ksysguard).
(I didn’t try to additionally use “cpufreq=no” when booting.)

I guess the problem has to do with the temperature:
First, under Linux core temperature seems to increase much too fast,
and second, it seems to overreact (perhaps due to the steep increase).

Data on the machine:

kullmann-0:~> uname -a
Linux linux-vp82.site 2.6.37.1-1.2-default #1 SMP 2011-02-21 10:34:10 +0100 x86_64 x86_64 x86_64 GNU/Linux

kullmann-0:~> more /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 37
model name : Intel(R) Core™ i5 CPU M 520 @ 2.40GHz
stepping : 5
cpu MHz : 1199.000
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clfl
ush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon peb
s bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx s
mx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt aes lahf_lm ida arat dts tpr_shadow vnmi
flexpriority ept vpid
bogomips : 4787.61
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 37
model name : Intel(R) Core™ i5 CPU M 520 @ 2.40GHz
stepping : 5
cpu MHz : 2400.000
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 2
cpu cores : 2
apicid : 4
initial apicid : 4
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
bogomips : 4787.89
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 2
vendor_id : GenuineIntel
cpu family : 6
model : 37
model name : Intel(R) Core™ i5 CPU M 520 @ 2.40GHz
stepping : 5
cpu MHz : 2400.000
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
bogomips : 4787.88
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 37
model name : Intel(R) Core™ i5 CPU M 520 @ 2.40GHz
stepping : 5
cpu MHz : 2400.000
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 2
cpu cores : 2
apicid : 5
initial apicid : 5
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
bogomips : 4787.89
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

I don’t know about CPU performance, but there have been power management regressions in GNU/Linux. Phoronix have a number of articles on this. I posted on my blog about this: GNU/Linux and openSUSE power management regressions - Blogs - openSUSE Forums another recent article with a different spin is here: PCIe, power management, and problematic BIOSes [LWN.net]

Did you try the boot code:


pcie_aspm=force

… its a long shot, but its worth a try.

On 07/14/2011 06:06 PM, kullmann wrote:
>
> Hello,

an interesting (but long) post…

if you had a question, i couldn’t find it.


DD
Caveat-Hardware-Software
openSUSE®, the BMW® of operating systems!

I tried “pcie_aspm=force”, but the same behaviour: temperature rises, frequency is reduced, until it reaches ~5s (for the task which should
take 1.26s).

Interestingly, after that I run it again, as usual, with two processes, and that time it did lower the frequency relatively moderatly, up to 1.85s (still
slower than Windows, which just needs 1.26s), and the temperature rose very quickly, and at 103 degree Celsius the laptop shut down.
The room might be 22 degree Celsius, with windows (physical ones ;-)) open. And Windows has no problem running two
processes 50% faster with that while CPU temperature is just about 80 degree Celsius.

I rebooted several times, to get network working again, and the behaviour seems changed now: Again at about 1.85s it stayed there, reaching
quickly 100 degree Celsius, so I aborted the processes — I’m sure without that it would have shut down again.

That the cpu gets much hotter, with lower frequency, than under Windows, what reasons could this have? My guess is that the fan is
running too slow, but who knows.

I am now just running a single process, and it currently needs ~1.7s, with temperature rising, now 97 degree Celsius; 98, 99, … I’ve
aborted that single process again.
So something changed, the kernel now tries harder to keep the frequency up, but it heats up very quickly. Now just running a single process
will cause the laptop to shutdown in about 3 minutes!! HELP!

[QUOTE=DenverD;2364510]On 07/14/2011 06:06 PM, kullmann wrote:
>
> Hello,

an interesting (but long) post…

if you had a question, i couldn’t find it.

Hi, the question is how can I repair that bad behaviour.

Oliver

A couple of real silly questions that have to be asked … even though they are silly.

(1) please confirm you are not over-clocking, and

(2) please confirm you have recently cleaned your CPU fan (assuming it is possible given your PC hardware architecture).

Over-clocking: the hardware is just standard hardware, no changes applied.
Cleaning: Given that Windows (7) can handle the load and much more without a problem (I just started it
again, running 4 processes — they run exactly at the same speed as described above, so each one
is faster than the single process I run on Linux, where Windows keeps the temperate (with the 4 processes)
around 90 degree Celsius, while Linux with just one process lets the temperature rising over 100 degree Celsius),
I don’t think that would explain something. However, sure, I’ll have a look and see whether the one screw I
see at the back allows to clean the fan. But I don’t have a screwdriver in my office.

Looking at the Internet and the descriptions of Linux heating problems with Inspiron laptops, it seems it is an ACPI thing:
quite a few other cases where Windows manages without problems, but Linux quickly shuts down.
E.g., heat problem on inspiron 5150 - Linux Forum - Software & Operating Systems - Dell Community

kullmann, I don’t know the first thing about your PC. I’m just trying to offer suggestions and I saw no where a mention 'bout over clocking nor 'bout fan cleaning … and it does have IMHO to be asked.

I already posted about the GNU/Linux power regression problems.

Typically all GNU/Linux distributions have power management settings that one can apply.

Did you read jdmcdaniel3’s blog entry: YaST Power Management - Control Your CPU Energy Usage How To & FAQ - Blogs - openSUSE Forums

… anyway, I have nothing more to add on this thread.

Hopefully someone else can address your concerns.

On 07/14/2011 09:06 PM, kullmann wrote:
> Looking at the Internet and the descriptions of Linux heating problems
> with Inspiron laptops, it seems it is an ACPI thing:
> quite a few other cases where Windows manages without problems, but
> Linux quickly shuts down.
> E.g., ‘heat problem on inspiron 5150 - Linux Forum - Software&
> Operating Systems - Dell Community’ (http://tinyurl.com/6h8o2pn)

Microsoft & Dell engineers work hand-in-hand to make sure Win7 looks
great on the Dell, and Win7’s monitoring of fan/battery/heat etc is
exceptional and tuned prolong the battery’s ability to deliver power…

Dell goes to no such lengths to make sure there are Linux drivers to do
the same…

if you want a great experience with Linux then you have to buy a machine
certified for (or at least know to work well with) Linux…Dell makes
some, but doesn’t look like you bought one.

buy more carefully next time and you will be able to free yourself from
the Microsoft nose ring more easily.


DD
Caveat-Hardware-Software
openSUSE®, the BMW® of operating systems!

It seems that Suse Linux is not able to run that laptop, so that I need to switch to another distribution.
Sad, after 11 years of Suse usage. The biggest problem is that I don’t know any distribution which would
have the same approach as at least the old Suse distribution had: delivering a distribution for “non-dummies”
and “non-techies”.
(BTW, I think there is some hope w.r.t. not-working temperature sensors; perhaps I should start a
new threat, concerned only with that special problem of getting these sensors to work. See below.)

Anyway, to bring some form of enlightenment into the game, here the further facts I found out
over night (I use the notion of enlightenment here, since the whole computer business is anti-enlightenment:
nowhere any kind of knowledge and consciousness — you not even know and apparently can’t find out
what the basic components of your computer are, and nobody cares about specifications):

It seems there is no cleaning possibility: the laptop is one single block, and with the screws one apparently
can only open the whole system, which I hesitate to do (no experience with such things). My old Dell Laptop
(where Suse 9.2 run great for 5 years) had all components replacable, but not this one anymore.

Now I need to know what the system consists of regarding the problem at hand, which likely can be
reduced to heat sensors, fans, and the respective drivers. Already that appears non-trivial.

From the outside I can see (and feel) that there are two openings for fans, one underneath, sucking
air in, on on the left side, pushing air out.

Windows 7 says under ACPI components:
2 x ACPI Fan
2 x ACPI Thermal Zone

I have installed a CPU monitoring tool, and this shows the temperature of the
two cores (numbered 0 and 1; core 1 has consistently a lower temperature).

So one could interprete it as there are two fans, one sucking air in, the other
pushing it out.
And there are two temperature sensors, one for each core.

However the Linux information is different:

No information is available regarding fans.

Regarding temperature sensors Ksysguard, Bubblemon and some other widget all
consistently declare there are three temperature sensors:

2 x acpitz
Temperature 1 (float) = constant 26.8 degree Celsius
Temperature 2 (float) = konstant 0.00 degree Celsius
radeon
Temperature 1 (float)

The first two sensors should refer to the core temperature sensors
which Windows refer to, and they do not work?!
Then what is the third “radeon” sensor? Until now I took it as the processor
temperature, since the temperature developed according to CPU load, and
when reaching 103 degree Celsius the laptop shuts dow, which I guess is
a BIOS thing.

The Yast Hardware Information has not much information on the temperature sensors
(under PCI, no “ACPI”):
5 Series/3400 Series Chipset Thermal Subsystem
Driver: intel_ips
Active: Yes; modprobe: Yes
(There are a lot of web pages on these things, but I couldn’t find any explanations. Perhaps “thermal”
here does not refer to temperature?)

I just installed Ksensors, and it shows exactly the same information.

So there seems to be a sensor problem — perhaps this can be solved?

I will start another, dedicated threat on the temperature sensors.

“Fans” apparently don’t exist for Linux?

I’ll try to contact Dell, whether they care / have more information.

Thanks anyway.

Oliver

Well if you find another distribution that handles this better and you have the opportunity, please let the openSUSE packagers/developers know what they in the ‘other’ distribution are doing different/better.

Since you mention 11 years, I assume you know on this forum we are unpaid volunteer enthusiasts who are NOT involved in the packaging of openSUSE. I assume then after spending THAT much time you would not move without first trying to contact the packagers via a bug report or some other means OTHER than our forum (which has no direct contact with any official packagers - we are unpaid volunteer users JUST like you).

If you wish to bring this anomalous behaviour on your SPECIFIC hardware to anyone who might do something about it, you really do need to write a bug report. There is guidance here for bug reports: openSUSE:Submitting bug reports - openSUSE and you can use your openSUSE forum username and password when logging on to bugzilla.

I will submit a bug report. Before that I try to determine the problem is precisely as possible (my experience is, that otherwise chances are
very small that a bug report will have some effect).

New information on the case:

  • no other Linux distribution seems to behave better (see below for more information)
  • the temperature on Suse 11.4 and all the other distributions I tried, when no user-process is running,
    is around 15 degrees Celsius higher than under Windows 7
  • this in itself indicates some problem, however it seems not the main problem here: also under Windows,
    with the cores running with full speed, the temperature rises, and the main problem of Linux seems to
    be the mis-reaction then
  • namely instead of using small decreases of the cpu-frequence (from 22.0 * 133 MHz to 20.0 * 133 MHz, or sometimes,
    especially when the system was heated up by the Linux-system before, to ~ 18.0 * 133 MHZ, as Windows 7 does,
    Linux reduces the frequency apparently first to ~ 6 * 133 MHz, and later to 2 or 3 * 133 MHz (then everything is
    lost, and all what remains is to reboot)
  • furthermore no Linux system recovers from that disaster — the frequency stays extremely low even if no process has
    been running for a long time, and the temperature is as low as possible for a Linux system;
    with Suse 11.4 one has then either to reboot, or to suspend-to-disk, while suspend-to-RAM has no effect (it stays
    as slow as before after waking up)
  • I don’t think that temperature measure is the main problem here: although only one core is measured (apparently
    core 0), and it has the false label “radeon”, it seems that the systems “understand” the temperature, and react
    consistently
  • the main problem seems to be that Linux (Suse 11.3/11.4 and any other distribution I tried) neither measures the
    CPU frequency correctly, nor can set it appropriately
  • all distribution measure frequency for the four threads separately, but there seems to be only one frequency;
    furthermore the numbers are always just “1.2 GHz” or “2.4 GHz”, and they have nothing to do with reality;
    so frequency measurement seems completely broken
  • setting the frequencies happens in a very rough way (although it can be observed that by chance for some time
    intermediate frequencies are set — so the driver seem to be able in principle to use small steps), and also
    mostly decreasing, never going back to the original frequency (except after rebooting)
  • regarding the fan the following can be said for all distributions: when the temperature reaches 89 degree Celsius, then for a short
    period the fan gets louder, and that results immediately in a reduction of the temperature — so that could
    solve the problem, however that higher fan-level is not used again (only apparently at random circumstances
    later, with very low temperatures)
  • however also Windows 7 seems not to use the fan with the higher level; so before Linux gets into the mode
    of (drastically) reducing frequency, it is actually somewhat faster (say, 10-20%) than Windows; the problem
    is then that the reductions are so drastic, and irreversible.

Why does Linux not offer a manual control of CPU frequencies? And of fan levels?

By the way, the boot-option “cpufreq=no” apparently has no effects.

I tried the Linux distributions Fedora 14,15, (K)Ubuntum 11.04, Debian 6.0, Mint 10, MoonOS 4,
SimplyMEPIS 11.0. One can say that they either behave “recklessly” or “cowardly”: Either
they don’t reduce the frequency at all, and then with two processes with a room-temperature
of 19 degree Celsius after 30m around 101 degree Celsius is reached, which might be stable,
but it might also reach the 103 degree Celsius, where the laptop shuts down — and anyway,
it doesn’t seem to be a good idea to run the laptop at constantly 100 degree Celsius.
The coward behaviour then is, for most distributions (that seems actually a non-deterministic
behaviour; perhaps every distribution can show both behaviours), once it reduces the frequency,
it does so drastically, and then stays very slow.

That’s what I found out. My current understanding is that cpu frequency is the weak spot of Linux.

Yet no success with the Dell forums.

Oliver

kullmann, I see that you are still online. If I missed it, I apologize as your posts tend to be long. If you have not attempted to “clean” your computer heat sinks, you must give that a try. Do not dismiss this out of hand. Depending on the time since it was new, dust conditions, dust build up in a computer can astonish you. I suggest you buy and use a can of duster spray, spraying into every vent hole (if its a laptop) or taking the cover off if its a desktop, locating every visible heat sink and blasting out all the dust as best as you can. This dust build up can cause a sudden change in cooling performance without any software change required at all.

Since the CPU is the #1 energy user, it can get the hottest. On a laptop, you may be stuck between performance and heat creation. I suggest you have a new tool to control just how your CPU performs. Here are a couple of links on how to do just that.

YaST Power Management - Control Your CPU Energy Usage How To & FAQ - Blogs - openSUSE Forums

C.F.U. - CPU Frequency Utilitiy - Version 1.10 - For use with the cpufrequtils package - Blogs - openSUSE Forums

These allow you to set and/or determine just what Profile your CPU is using to control its speed and the heat it generates.

Thank You,

[QUOTE=jdmcdaniel3;2365529] If you have not attempted to “clean” your computer heat sinks, you must give that a try. Do not dismiss this out of hand. Depending on the time since it was new, dust conditions, dust build up in a computer can astonish you. I suggest you buy and use a can of duster spray, spraying into every vent hole (if its a laptop) or taking the cover off if its a desktop, locating every visible heat sink and blasting out all the dust as best as you can. This dust build up can cause a sudden change in cooling performance without any software change required at all.

I ordered a spray with compressed air from a local shop, and an additional stand with 2 fans.
Since it seems that Linux won’t resolve soon the weak performance, perhaps that can help to bring the temperature down
so that performance gets reasonable.

> YaST Power Management - Control Your CPU Energy Usage How To & FAQ - Blogs - openSUSE Forums

I installed that, but then, even after many reboots, the network disappeared. And it didn’t help with the problem, actually made it worse:
All the times after rebooting it got into the “reckless” behaviour, where it just runs the CPUs at maximal speed until it shuts down
due to overheating. Independently of the setting. So I de-installed it (and network is there again).

> C.F.U. - CPU Frequency Utilitiy - Version 1.10 - For use with the cpufrequtils package - Blogs - openSUSE Forums

This has the following problems:

  • all frequency measurements are false
  • is not able to use the full scale of frequency settings
  • it can only lower the frequency; so once the disaster happened, and so computer runs with, say, 400 MHz (not nice), then
    you can only lower that to astonishing, say, 100 MHz (that’s fun – ha ha, one feels young again ;-))
  • there are various smaller bugs.

I will submit a bug-report for that tool.

Nevertheless, that seems yet the best possibility: Before the disaster, one has full speed and some slowdowns available, and
so one needs to manually set the frequency such that the disaster (reaching, say, 93 degrees, where then typically
it goes down to 400 MHz, and stays there, without recovery) is avoided, and then one should have a stable situation.

Thanks for your help!

Oliver

So, if I run cfu, here is what I get:

---------------------------------------------------------------------------
                   CPU Frequency Utility - Version 1.11                  
---------------------------------------------------------------------------
         CPU Name: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
        CPU Cores: 4 (8 with Hyper-Threading)
        CPU Speed: 3.401 GHz
      Speed Range: 1.600 GHz to 3.401 GHz
---------------------------------------------------------------------------
         Governor: PERFORMANCE
   Your 5 Options: CONSERVATIVE,USERSPACE,POWERSAVE,ONDEMAND,PERFORMANCE
---------------------------------------------------------------------------
        Please make your selection, S=Set Governor or Q=Quit (S/Q): 
---------------------------------------------------------------------------

When you run this bash script, what do you get?

Thank You,

I have the same problem, I’m not as detailed as kullman, but I have a dell latitude E6510 laptop, 4GbRAM, intel i7 quadcore, nvidia 3100, high resolution screen, my temperature sensors doesn’t seems to work in linux, after half an hour, with 6 firefox windows with 10 tabs each open, and thunderbird open, it becames very slow, fan run but I suppose it depends on temperature too, I followed this instruction as jdmcdaniel3 said, I noted an improvement using powersaving, now it is less slow but anyway slower than windowsquestions,.
2
I already had KDE powermanagement installed, are KDE and YAST2-powermanagement safe to run together?
is there any way to run fan continuosly at max power??

thnx
pla

If your laptop is having an Nvidia/ATI graphics card, check whether the proprietary drivers are installed.
Check the forum’s HowTo sections.

yes Nvidia drivers installed

Hi jdmcdaniel3,

the output is

root-0:FrequencyUtility> ./cfu.sh
CPU Frequency Utility - Version 1.11
CPU name: Intel(R) Core™ i5 CPU M 520 @ 2.40GHz
CPU cores: 2 (4 with hyper-threading)
CPU speed: 1.866 GHz
Speed range: 1.199 GHz to 2.400 GHz
Governor: USERSPACE
Your 5 options: CONSERVATIVE,USERSPACE,POWERSAVE,ONDEMAND,PERFORMANCE
Please make your selection, “s” to set governor or “q” to quit:

The speed range is completely bogus — always the same, and has nothing to do with reality.
What it refers to is from the current “basic speed” (wherever this is determined) one can slow
it down further. From the start position it contains perhaps a quarter of all possibilities;
worse, once the machine is in slow motion, you can’t get it back.

By the way, there is a bug in your script (perhaps you noticed that yourself, since you have version 1.11 as well):
Output of the speed-range was defect. I created a Github repository
http://github.com/OKullmann/CPU-Frequency-Utility
where you can see my changes (removed all clearing-instructions, since that makes it unusable in
a shell, and compactified code and output somewhat; the last commit shows the bug-correction).

But the problem is not in your script, it is in the cpufreq-utility: that gets the frequency wrong as well as
the range of possibilities. There is also the question whether the two cores can have different frequencies:
it looks like that. (I asked on the Dell Forums about that, but no answer.)

Oliver

Hi jdmcdaniel3,

the output is

root-0:FrequencyUtility> ./cfu.sh
CPU Frequency Utility - Version 1.11
CPU name: Intel(R) Core™ i5 CPU M 520 @ 2.40GHz
CPU cores: 2 (4 with hyper-threading)
CPU speed: 1.866 GHz
Speed range: 1.199 GHz to 2.400 GHz
Governor: USERSPACE
Your 5 options: CONSERVATIVE,USERSPACE,POWERSAVE,ONDEMAND,PERFORMANCE
Please make your selection, “s” to set governor or “q” to quit:

The speed range is completely bogus — always the same, and has nothing to do with reality.
What it refers to is from the current “basic speed” (wherever this is determined) one can slow
it down further. From the start position it contains perhaps a quarter of all possibilities;
worse, once the machine is in slow motion, you can’t get it back.

By the way, there is a bug in your script (perhaps you noticed that yourself, since you have version 1.11 as well):
Output of the speed-range was defect. I created a Github repository
http://github.com/OKullmann/CPU-Frequency-Utility
where you can see my changes (removed all clearing-instructions, since that makes it unusable in
a shell, and compactified code and output somewhat; the last commit shows the bug-correction).

But the problem is not in your script, it is in the cpufreq-utility: that gets the frequency wrong as well as
the range of possibilities. There is also the question whether the two cores can have different frequencies:
it looks like that. (I asked on the Dell Forums about that, but no answer.)

Oliver

I am very sorry to her you can not properly set the speed of your CPU. What speed does it report when you open up the My Computer Icon on the Desktop? As for the script, I will check out your changes AND the whole idea of posting it here is to get suggestions and upgrades from all users. I will check them out and incorporate anything that fits in with my vision of the script and thank you in advance for your effort. I must say that seeing your cfu output saying its set to USERSPACE would mean NO dynamic speed changes are going on. The available speeds I display come from a text file “/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies”. You can also use the command cpufreq-info -c 0 and see the available frequency steps, however I discovered that the speeds are rounded to three digits, but you must use four to properly set some of the actual speed steps. And, in event, the whole cpufrequtils are not very user friendly and it was my hope that with the script file cfu, it might make the utilities more usable. Since you already have a problem here, I think that the way you reported cpufreq is working might indicated a deeper problem with the kernel version you are using (2.6.27?). Have you considered a kernel upgrade to say the highest stable release which is at 2.6.39.3? If you are game to try it, here is a pointer to how to do it:

S.A.K.C. - SUSE Automated Kernel Compiler - Version 2.50 - Blogs - openSUSE Forums

If you like digging through script files finding problems, you should really love this one. lol! But really, it does work as intended, trust me on this.

Thank You,