Author Topic: cpufreq problems.  (Read 4253 times)

Offline kolosus

  • Hero Member
  • *****
  • Posts: 774
  • I don't have blue eyes
cpufreq problems.
« on: March 03, 2011, 06:34:04 PM »
I have a Toshiba Satellite M305D-S4831. My cpu is running at 2ghz all the time... temp is also high but that's probably because the cpu is running at full speed. I tried

[root@localhost user]# modprobe acpi-cpufreq
FATAL: Error inserting acpi_cpufreq (/lib/modules/2.6.33.7-pclos6.bfs/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko.gz): No such device

I also had this problem before (kinda)... solved in this thread
http://www.pclinuxos.com/forum/index.php/topic,84821.0.html

AMD Turion™ X2 Dual-Core Mobile Processor RM-70
ATI® Radeon™ 3100
256MB-1519MB dynamically allocated shared graphics memory
4GB PC6400 DDR2 800MHz SDRAM
200GB HDD (5400rpm)

I'm running 2010.12 fully updated. kde4.

Looking forward to your suggestions.
Linux User # 435130

For what is evil but good tortured by its own hunger and thirst?
Verily when good is hungry it seeks food even in dark caves, and when it thirsts, it drinks even of dead waters.
The PROPHET, by Kahlil Gibran

AndrzejL

  • Guest
Re: cpufreq problems.
« Reply #1 on: March 04, 2011, 12:50:35 PM »
Boot up from Zen Mini LiveCD and run

Quote
cpufreq-info

You will find out which cpu driver should be loaded from there.

Quote
[andrzejl@wishmasbell ~]$ cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq at vger dot kernel dot org, please.
analyzing CPU 0:
  driver: powernow-k8
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 109 us.
  hardware limits: 800 MHz - 1.80 GHz
  available frequency steps: 1.80 GHz, 1.60 GHz, 800 MHz
  available cpufreq governors: ondemand, conservative, powersave, userspace, performance
  current policy: frequency should be within 800 MHz and 1.80 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 1.80 GHz.
[andrzejl@wishmasbell ~]$

Also You can copy

Quote
/etc/modprobe.preload.d/cpufreq

as root from livecd to the same folder in Your installation. This will save You the modprobing.

Example of such file:

Quote
[andrzejl@wishmasbell ~]$ cat /etc/modprobe.preload.d/cpufreq
powernow-k8
cpufreq_performance
cpufreq_powersave
cpufreq_conservative
cpufreq_ondemand

[andrzejl@wishmasbell ~]$


Alternatively You can try one modprobe one driver after another from folder:

Code: [Select]
/lib/modules/2.6.33.7-pclos6.bfs/kernel/arch/x86/kernel/cpu/cpufreq/
Regards.

Andy
« Last Edit: March 04, 2011, 12:58:14 PM by AndrzejL »

Offline kolosus

  • Hero Member
  • *****
  • Posts: 774
  • I don't have blue eyes
Re: cpufreq problems.
« Reply #2 on: March 09, 2011, 05:07:35 PM »
Hello Andy.

Sorry for not getting to this earlier... things have been hectic.

Anyway. I'm posting from the zen-mini live-cd. Unfortunately nothing has changed.

[root@localhost ~]# uname -a
Linux localhost 2.6.33.7-pclos6.bfs #1 SMP PREEMPT Thu Oct 21 22:42:28 CDT 2010 i686 AMD Turion(tm) X2 Dual-Core Mobile RM-70 GNU/Linux
[root@localhost ~]# cpufreq-info
cpufrequtils 007: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 0.00 ms.
analyzing CPU 1:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 0.00 ms.

My cpu is running at 2.0 speed and temperature is 75 celcius. Cpu usage is hovering between 2-8%. When I'm running the full kde version temperatures can reach in the mid 80's... soon after that the laptop freezes.

I'm open to other suggestions.
Linux User # 435130

For what is evil but good tortured by its own hunger and thirst?
Verily when good is hungry it seeks food even in dark caves, and when it thirsts, it drinks even of dead waters.
The PROPHET, by Kahlil Gibran

Offline melodie

  • Hero Member
  • *****
  • Posts: 5945
  • Internet Relay Chat sur Freenode
    • PCLinuxOS Fr
Re: cpufreq problems.
« Reply #3 on: March 09, 2011, 07:52:44 PM »
Hi,

Maybe installing and configuring lm_sensors could help you. Would you at same time, invoke in the console "cat /proc/cpuinfo" and bring back the output ? It's just for simple information, incase it could help.

melodie at #lpic-fr on irc.freenode.net

Offline kolosus

  • Hero Member
  • *****
  • Posts: 774
  • I don't have blue eyes
Re: cpufreq problems.
« Reply #4 on: March 10, 2011, 10:46:37 AM »
[root@localhost root]# cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 17
model           : 3
model name      : AMD Turion(tm) X2 Dual-Core Mobile RM-70
stepping        : 1
cpu MHz         : 1999.864
cache size      : 512 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow constant_tsc nonstop_tsc extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy 3dnowprefetch osvw skinit
bogomips        : 3999.72
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor       : 1
vendor_id       : AuthenticAMD
cpu family      : 17
model           : 3
model name      : AMD Turion(tm) X2 Dual-Core Mobile RM-70
stepping        : 1
cpu MHz         : 1999.864
cache size      : 512 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
apicid          : 1
initial apicid  : 1
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow constant_tsc nonstop_tsc extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy 3dnowprefetch osvw skinit
bogomips        : 4000.51
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate


Since this is a second hand laptop... I was wondering if it was possible that someone opened it before and hard wired the cpu to run at full speed all the time? Just a thought.
Linux User # 435130

For what is evil but good tortured by its own hunger and thirst?
Verily when good is hungry it seeks food even in dark caves, and when it thirsts, it drinks even of dead waters.
The PROPHET, by Kahlil Gibran

Offline melodie

  • Hero Member
  • *****
  • Posts: 5945
  • Internet Relay Chat sur Freenode
    • PCLinuxOS Fr
Re: cpufreq problems.
« Reply #5 on: March 10, 2011, 11:43:03 AM »
Since this is a second hand laptop... I was wondering if it was possible that someone opened it before and hard wired the cpu to run at full speed all the time? Just a thought.

I don't think so, but that gives me an idea. Have you looked at the choices in the configuration of the BIOS ?

melodie at #lpic-fr on irc.freenode.net

Offline Bernd

  • Full Member
  • ***
  • Posts: 59
  • Addicted to PCLinuxOS
Re: cpufreq problems.
« Reply #6 on: March 10, 2011, 01:38:12 PM »
Hi Kolosus,
I have exacly the same processor and had the same problem  :-\ . And it was quite hard to find the solution . The powernow-k8-module (power saving technology of AMD's processors used in laptops) is not loading automatically. So (as root) do a
Quote
modprobe powernow-k8
it will load the module, you can check it with the command "cpufreq-info" in a konsole and it will show that the system will now use the Governor "ondemand" which calms down your system and heat. To save this setting permanently you have to change the file /etc/modprobe.preload.d/cpufreq and add powernow-k8 in the textfile at the very end. If powernow-k8 doesn´t work try powernow-k6 or powernow-k7. You'llfind CPU drivers here
/lib/modules/2.6.33.7-pclos5.pae[your kernel!]/kernel/arch/x86/kernel/cpu/cpufreq/.
I don´t know why this power saving thing is not loading automatically. Hope it helps
Bernado
Prozessor: Intel i5-2500K CPU @ 3.30GHz with onboard graphics
Motherboard: Intel DH67BLB3 with H67 Chip

Offline kolosus

  • Hero Member
  • *****
  • Posts: 774
  • I don't have blue eyes
Re: cpufreq problems.
« Reply #7 on: March 10, 2011, 07:07:12 PM »
Hello Bernado.

Your suggestion worked... kinda. modprobe powernow-k8 as root did activate some sort of feature.

[root@localhost root]# modprobe powernow-k8
[root@localhost root]# cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: powernow-k8
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 1000 ns.
  hardware limits: 500 MHz - 2.00 GHz
  available frequency steps: 2.00 GHz, 1000 MHz, 500 MHz
  available cpufreq governors: userspace, performance
  current policy: frequency should be within 500 MHz and 2.00 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 2.00 GHz (asserted by call to hardware).
analyzing CPU 1:
  driver: powernow-k8
  CPUs which run at the same hardware frequency: 1
  CPUs which need to have their frequency coordinated by software: 1
  maximum transition latency: 1000 ns.
  hardware limits: 500 MHz - 2.00 GHz
  available frequency steps: 2.00 GHz, 1000 MHz, 500 MHz
  available cpufreq governors: userspace, performance
  current policy: frequency should be within 500 MHz and 2.00 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 2.00 GHz (asserted by call to hardware).
[root@localhost root]# modprobe acpi-cpufreq
FATAL: Error inserting acpi_cpufreq (/lib/modules/2.6.33.7-pclos6.bfs/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko.gz): Device or resource busy

I couldn't get it to work from the command line... but when I tried to load cpufreq from PCC it worked.

Problem is that even though it worked and the cpu frequency is changing, my cpu is at 2.0 90% of the time, only occasionally it drops to 0.50 speed for a second or two and very infrequently it stops at 1.0 for a second.

So the obvious question is what's using my cpu. top shows that X is using 32-36% of the cpu while kwin is using 8-11%. All I have up is the basic desktop, conky and firefox. Even if I close out all applications (except conky) and the overall utilization of the cpu is 3-4% the cpu speed is still 2.0!

So the next question becomes why/what is eating my cpu and how can I get it to stop? I have an ATI Radeon graphics card should I use a different driver to lower cpu utilization?

Or should I just start another topic about this?

Thanks for all the help everyone...
« Last Edit: March 10, 2011, 07:12:25 PM by kolosus »
Linux User # 435130

For what is evil but good tortured by its own hunger and thirst?
Verily when good is hungry it seeks food even in dark caves, and when it thirsts, it drinks even of dead waters.
The PROPHET, by Kahlil Gibran

Offline Bernd

  • Full Member
  • ***
  • Posts: 59
  • Addicted to PCLinuxOS
Re: cpufreq problems.
« Reply #8 on: March 13, 2011, 04:51:20 AM »
Hy kolosus

Quote
The governor "performance" may decide which speed to use

"performance" means your system is running all the time in the hightest allowed frequency  :-\ Try to change this governor in "ondemand" by using following command in a console as root

cpufreq-set --governor ondemand -c0        for the first cpu
cpufreq-set --governor ondemand -c1        for the second cpu

"ondemand" means that The CPU frequency is adjusted to the current requirements on computing power. The CPU frequency is abruptly raised or lowered when the system is idle. Maybe this helps
Cheers Bernado

Prozessor: Intel i5-2500K CPU @ 3.30GHz with onboard graphics
Motherboard: Intel DH67BLB3 with H67 Chip

Offline melodie

  • Hero Member
  • *****
  • Posts: 5945
  • Internet Relay Chat sur Freenode
    • PCLinuxOS Fr
Re: cpufreq problems.
« Reply #9 on: March 13, 2011, 06:18:29 AM »
Hi,
There has been a thread not so long ago about the governors, and there had even been a package request and a new package done, (but not the cpufreqd script... which still could be updated), and yet I still find that there are governors that don't work. I think it's powersave and... well I don't remember at the moment. Just this to say that if you find how to make it work and make it hold from one session to the next, I'd be interested to know how to do that.



melodie at #lpic-fr on irc.freenode.net

Offline Giskard

  • Jr. Member
  • **
  • Posts: 24
Re: cpufreq problems.
« Reply #10 on: June 16, 2011, 01:08:13 PM »
Hi Kolosus,
I have exacly the same processor and had the same problem  :-\ . And it was quite hard to find the solution . The powernow-k8-module (power saving technology of AMD's processors used in laptops) is not loading automatically. So (as root) do a
Quote
modprobe powernow-k8
it will load the module, you can check it with the command "cpufreq-info" in a konsole and it will show that the system will now use the Governor "ondemand" which calms down your system and heat. To save this setting permanently you have to change the file /etc/modprobe.preload.d/cpufreq and add powernow-k8 in the textfile at the very end. If powernow-k8 doesn´t work try powernow-k6 or powernow-k7. You'llfind CPU drivers here
/lib/modules/2.6.33.7-pclos5.pae[your kernel!]/kernel/arch/x86/kernel/cpu/cpufreq/.
I don´t know why this power saving thing is not loading automatically. Hope it helps
Bernado


Hi Bernado, I tried your solution and works perfect, the problem is that I do not have the file cpufreq in
any directory on my install, so i can't make the change permanent.

so I have two questions, can i create the file and include powernow-k8 in it?
and second how do i set cpufreq-set --governor ondemand -c0 also permanent?.

Thank's in advance

Best Regards

Offline kolosus

  • Hero Member
  • *****
  • Posts: 774
  • I don't have blue eyes
Re: cpufreq problems.
« Reply #11 on: June 21, 2011, 12:44:15 PM »
If you have to enter a certain set of commands to set the cpu speed after ever boot up process then you can add those lines to a file and the commands will be executed at every bootup without you having to type it in every time. You have to edit the file as root. The file is...

/etc/rc.d/rc.local

Code: [Select]
#!/bin/sh
#
### BEGIN INIT INFO
# Yadda yadda yadda
### END INIT INFO

touch /var/lock/subsys/local

modprobe snd-usb-audio
modprobe acpi_cpufreq
cpufreq-set -g ondemand

# Fix linkage to cdrom/dvd and permissons since udev is screwed
ln -s /dev/sr0 /dev/dvd > /dev/null 2>&1
ln -s /dev/sr0 /dev/cdrom > /dev/null 2>&1
chmod 777 /dev/sr0 > /dev/null 2>&1
chown root:root /dev/sr0 > /dev/null 2>&1
chmod 777 /dev/sr1 > /dev/null 2>&1
chown root:root /dev/sr1 > /dev/null 2>&1

In my file there were already two lines present.

modprobe snd-usb-audio
modprobe acpi_cpufreq

They were needed to fix some sound problem I'm guessing. Regardless I didn't put them there. What I did put was the next line, which was "cpufreq-set -g ondemand".

This solved my cpufreq problems. I didn't have to type in that line after every boot. I should add that this is an intel machine. The AMD machine that I was having problems with, that gave rise to this thread, has a broken screen and thus I cant get info off the machine till I fix that. But on that machine I solved the problem in the same manner.

Hope that takes care of your issue.

PS: You'll find a file named rc.local inside the /etc folder without having to go into the subfolder /etc/rc.d but that's just a simlink to the file /etc/rc.d/rc.local.
Linux User # 435130

For what is evil but good tortured by its own hunger and thirst?
Verily when good is hungry it seeks food even in dark caves, and when it thirsts, it drinks even of dead waters.
The PROPHET, by Kahlil Gibran

Offline Giskard

  • Jr. Member
  • **
  • Posts: 24
Re: cpufreq problems.
« Reply #12 on: June 22, 2011, 09:18:38 PM »
Kolosus, thank you very much for your tip, it work's perfect.

Regards.

Offline redjama

  • Sr. Member
  • ****
  • Posts: 350
Re: cpufreq problems.
« Reply #13 on: June 23, 2011, 09:41:27 AM »
I have the exact problem only im using intel.  I have tried everything in here you guys have posted with no success at all.  It still wants to default running the performance governor.  The ondemand does nothing, the only one I can seem to get to work i the powersave and that lags the comp extremely.  Any ideas?

Here are my specs....
Code: [Select]
[root@localhost brian]# cat /etc/modprobe.preload.d/cpufreq
p4-clockmod
cpufreq_performance
cpufreq_powersave
cpufreq_conservative
cpufreq_ondemand
[root@localhost brian]# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 14
model name      : Intel(R) Celeron(R) M CPU        440  @ 1.86GHz
stepping        : 12
cpu MHz         : 1866.662
cache size      : 1024 KB
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 clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx constant_tsc up arch_perfmon bts aperfmperf pni monitor tm2 xtpr pdcm dts
bogomips        : 3733.42
clflush size    : 64
cache_alignment : 64
address sizes   : 32 bits physical, 32 bits virtual
power management:

[root@localhost brian]# modprobe p4-clockmod
[root@localhost brian]# cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: p4-clockmod
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.00 ms.
  hardware limits: 233 MHz - 1.87 GHz
  available frequency steps: 233 MHz, 467 MHz, 700 MHz, 933 MHz, 1.17 GHz, 1.40 GHz, 1.63 GHz, 1.87 GHz
  available cpufreq governors: ondemand, conservative, powersave, userspace, performance
  current policy: frequency should be within 700 MHz and 1.87 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 1.87 GHz (asserted by call to hardware).

Offline redjama

  • Sr. Member
  • ****
  • Posts: 350
Re: cpufreq problems.
« Reply #14 on: June 23, 2011, 03:54:24 PM »
Well I guess my laptop will continue to run at full blast cause noones knows how to fix this.  That sux.    ??? ??? :-\ :'(