Author Topic: CPUfreq ondemand is not working  (Read 1377 times)

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 359
CPUfreq ondemand is not working
« on: March 10, 2012, 03:06:46 AM »
Hi friends,

I followed step by step the Textar thread on my netbook and worked fine, but in my laptod doesn't work:

http://www.pclinuxos.com/forum/index.php/topic,93564.msg808893.html#msg808893


I tried also change "performance" for "ondemand" in: sys/devices/system/cpu/cpu0/cpufreq but nothing change, cpufreq is always "performance"

(Only for info, I have installed on both computers lxdpms)

Help please.

Code: [Select]
[salud@localhost ~]$ 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: 217 MHz - 1.73 GHz
  available frequency steps: 217 MHz, 433 MHz, 650 MHz, 867 MHz, 1.08 GHz, 1.30 GHz, 1.52 GHz, 1.73 GHz
  available cpufreq governors: conservative, powersave, ondemand, userspace, performance
  current policy: frequency should be within 650 MHz and 1.73 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 1.73 GHz.
[salud@localhost ~]$
« Last Edit: March 10, 2012, 03:33:00 AM by Aleph »

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: CPUfreq ondemand is not working
« Reply #1 on: March 10, 2012, 03:42:47 AM »
 ::) Who is Textar? ??? We do not have a Textar here. ::) We do have Texstar.     

This works for me. Maybe it will work for you too.

I have these packages installed.

[root@thenudiebar ~]# rpm -qa|grep cpufreq
cpufreq-1.0-28pclos2010
cpufrequtils-008-1pclos2010


In the root terminal I type:

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

I get the frequencies available to me. The one to the left is the highest and the one to the right is the lowest.
2800000 2100000 1600000 800000

Then I edit /etc/sysconfig/cpufreq file and add the minimum and maximum.

Looks like this:

# set cpufreq governor if defined
# possible choices are: ondemand powersave userspace performance
GOVERNOR=ondemand

# minimum frequency
MIN_FREQ=800000

# maximum frequency
MAX_FREQ=2800000

# Uncomment to use acpi-cpufreq as fallback
#USE_ACPI_CPUFREQ=yes


Then I go into the PCC and set cpufreq to start at boot. Once I reboot I open a terminal and check the status with


[texstar@thenudiebar ~]$ 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: 8.0 us.
  hardware limits: 800 MHz - 2.80 GHz
  available frequency steps: 2.80 GHz, 2.10 GHz, 1.60 GHz, 800 MHz
  available cpufreq governors: ondemand, conservative, powersave, userspace, performance
  current policy: frequency should be within 800 MHz and 2.80 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz

Cha-ching!!!


Bonus Tip! Install CpuFreqDisplay plasmoid from get more widgets and add it to your KDE taskbar to see it in action.


     
lxdpms is used to toggle energy star on or off. That is its use.     

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 359
Re: CPUfreq ondemand is not working
« Reply #2 on: March 10, 2012, 04:01:41 AM »
Hi Neal,


 :-[ Sorry, I forget the "s". Ok Texstar.
Maybe because I am from Seville and we are always forgetting the letter "s"  Spanish people from the south :D


Neal I followed step by step it:

This works for me. Maybe it will work for you too.

I have these packages installed.

[root@thenudiebar ~]# rpm -qa|grep cpufreq
cpufreq-1.0-28pclos2010
cpufrequtils-008-1pclos2010


In the root terminal I type:

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

I get the frequencies available to me. The one to the left is the highest and the one to the right is the lowest.
2800000 2100000 1600000 800000

Then I edit /etc/sysconfig/cpufreq file and add the minimum and maximum.

Looks like this:

# set cpufreq governor if defined
# possible choices are: ondemand powersave userspace performance
GOVERNOR=ondemand

# minimum frequency
MIN_FREQ=800000

# maximum frequency
MAX_FREQ=2800000

# Uncomment to use acpi-cpufreq as fallback
#USE_ACPI_CPUFREQ=yes


Then I go into the PCC and set cpufreq to start at boot. Once I reboot I open a terminal and check the status with


[texstar@thenudiebar ~]$ 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: 8.0 us.
  hardware limits: 800 MHz - 2.80 GHz
  available frequency steps: 2.80 GHz, 2.10 GHz, 1.60 GHz, 800 MHz
  available cpufreq governors: ondemand, conservative, powersave, userspace, performance
  current policy: frequency should be within 800 MHz and 2.80 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz

Cha-ching!!!


Bonus Tip! Install CpuFreqDisplay plasmoid from get more widgets and add it to your KDE taskbar to see it in action.






The info about lxdpms was only if could have some conflict between both, I don't know too much about, sorry...

Any advice for solve the ondemand setting?




Offline mag

  • Full Member
  • ***
  • Posts: 68
Re: CPUfreq ondemand is not working
« Reply #3 on: March 10, 2012, 04:18:49 AM »
There is a bit of general discussion on cpufrequtils in an Archlinux post here https://wiki.archlinux.org/index.php/CPU_Frequency_Scaling

Can't say I've followed it up wrt PCLOS at all, because Texstar's method worked perfectly on my laptop running LXDE :)

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: CPUfreq ondemand is not working
« Reply #4 on: March 10, 2012, 04:22:58 AM »
All I can tell you is contained in Texstar's post.     

Offline mag

  • Full Member
  • ***
  • Posts: 68
Re: CPUfreq ondemand is not working
« Reply #5 on: March 10, 2012, 04:26:56 AM »
What do you get from cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors?

I get:

[@localhost ~]$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
ondemand conservative powersave userspace performance
[@localhost ~]$

Are you perhaps missing ondemand?

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 359
Re: CPUfreq ondemand is not working
« Reply #6 on: March 10, 2012, 04:32:39 AM »
Quote
What do you get from cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors?

Code: [Select]
[salud@localhost ~]$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
conservative powersave ondemand userspace performance
[salud@localhost ~]$

Offline mag

  • Full Member
  • ***
  • Posts: 68
Re: CPUfreq ondemand is not working
« Reply #7 on: March 10, 2012, 04:50:27 AM »
So it's there.

Beyond me I suspect.

What do you get from:
ls /lib/modules/$(uname -r)/kernel/drivers/cpufreq/

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 359
Re: CPUfreq ondemand is not working
« Reply #8 on: March 10, 2012, 04:56:21 AM »
I get this:

Code: [Select]
[salud@localhost ~]$ ls /lib/modules/$(uname -r)/kernel/drivers/cpufreq/
cpufreq_conservative.ko.gz  cpufreq_powersave.ko.gz  freq_table.ko.gz
cpufreq_ondemand.ko.gz      cpufreq_stats.ko.gz
[salud@localhost ~]$

Offline mag

  • Full Member
  • ***
  • Posts: 68
Re: CPUfreq ondemand is not working
« Reply #9 on: March 10, 2012, 05:06:00 AM »
It seems to have an available  driver then?

I don't really have any useful suggestions I'm afraid. I'm sure you can read that Arch post as well as I can.

If it was my machine I'd be tempted to have a go at manually setting the drivers and governors - but then my machine is mainly for play and I don't mind re-installing every now and again.

I am reluctant to offer advice to others to modify their system based on my uninformed guesswork!

Hopefully someone who knows what they're doing will come along to help.

One question - have you made any acpi boot tweaks (eg acpi=off)?
« Last Edit: March 10, 2012, 05:08:02 AM by mag »

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 359
Re: CPUfreq ondemand is not working
« Reply #10 on: March 10, 2012, 05:31:10 AM »
Hi mag,

thanks,

Quote
One question - have you made any acpi boot tweaks (eg acpi=off)?

Not difference On/Off

Quote
I am reluctant to offer advice to others to modify their system based on my uninformed guesswork!

I read Arch thread but I don't know how do very well in PCLOS.

I'd like try/play around... :) 

Offline mag

  • Full Member
  • ***
  • Posts: 68
Re: CPUfreq ondemand is not working
« Reply #11 on: March 10, 2012, 06:16:40 AM »
A bit more info which may or may not be relevant.

I have a desktop that behaves as you describe (won't use ondemand governor) - and it also has 

driver: p4-clockmod

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 359
Re: CPUfreq ondemand is not working
« Reply #12 on: March 10, 2012, 06:27:33 AM »
Yes mag,

I suspect about p4-clockmod too, but how select properly this driver?

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 359
Re: CPUfreq ondemand is not working
« Reply #13 on: March 11, 2012, 04:38:39 AM »
I did in root terminal:

# modprobe p4_clockmod

also,

# modprobe cpufreq_ondemand



I changed in /etc/sysconfig/cpufreq:

#USE_ACPI_CPUFREQ=yes    for   #USE_p4_clockmod=yes


Nothing happens, always "performance"...



More advices please.
« Last Edit: March 11, 2012, 05:19:57 AM by Aleph »

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 359
Re: CPUfreq ondemand is not working
« Reply #14 on: March 11, 2012, 05:38:03 AM »
I have found this thread http://www.pclinuxos.com/forum/index.php?topic=101145.0 and did this:

Code: [Select]
[root@localhost salud]# modprobe -r p4-clockmod
[root@localhost salud]# modprobe acpi-cpufreq
FATAL: Error inserting acpi_cpufreq (/lib/modules/2.6.38.8-pclos1.bfs/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko.gz): No such device
[root@localhost salud]#

acpi_cpufreq reported an error...    (?)
« Last Edit: March 11, 2012, 06:17:30 AM by Aleph »