Author Topic: cpufreq  (Read 606 times)

Offline dsonyay

  • Full Member
  • ***
  • Posts: 193
cpufreq
« on: October 25, 2012, 05:03:41 AM »
Is there a way to edit my cpufreq file to limit the CPU to operate at the lowest setting?

Here is my cpufreq -info:
Quote
[root@localhost sysconfig]# 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: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 1.73 GHz
  available frequency steps: 1.73 GHz, 1.33 GHz, 1.07 GHz, 800 MHz
  available cpufreq governors: ondemand, conservative, powersave, userspace, performance
  current policy: frequency should be within 800 MHz and 1.73 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1.73 GHz (asserted by call to hardware).
analyzing CPU 1:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1
  CPUs which need to have their frequency coordinated by software: 1
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 1.73 GHz
  available frequency steps: 1.73 GHz, 1.33 GHz, 1.07 GHz, 800 MHz
  available cpufreq governors: ondemand, conservative, powersave, userspace, performance
  current policy: frequency should be within 800 MHz and 1.73 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1.73 GHz (asserted by call to hardware).

here is the cpufreq file as set now after loading PCLOS 2012 (I use kernel 2.6.38.8-pclos3.bfs):
Quote
# set cpufreq governor if defined
# possible choices are: ondemand powersave userspace performance
GOVERNOR=ondemand

# minimum frequency
#MIN_FREQ=

# maximum frequency
#MAX_FREQ=

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

I want to use only 800MHz just to keep the CPUs cooler.  I only websurf and light office type work.  What should I comment out of the cpufreq file?  I wanted to get it right and not screw something up.... thanks!

David
« Last Edit: October 25, 2012, 03:58:49 PM by jaydot »

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: CPUFREQ
« Reply #1 on: October 25, 2012, 06:34:51 AM »
Have you gone through this thread by Texstar?
http://www.pclinuxos.com/forum/index.php/topic,93564.0.html
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline dsonyay

  • Full Member
  • ***
  • Posts: 193
Re: CPUFREQ
« Reply #2 on: October 25, 2012, 02:12:01 PM »
Have you gone through this thread by Texstar?
http://www.pclinuxos.com/forum/index.php/topic,93564.0.html


Sling-
Yes, I have.  What I'm wondering is, based on that thread, how do I use only 88MHz?
Would I simply do this?
Quote
# set cpufreq governor if defined
# possible choices are: ondemand powersave userspace performance
#GOVERNOR=ondemand

# minimum frequency
#MIN_FREQ=800000

# maximum frequency
MAX_FREQ=800000


Would that be OK to do?  Or would it be better to comment everything out except the MAX FREQ and type in 80000?  Like this:
Quote
# set cpufreq governor if defined
# possible choices are: ondemand powersave userspace performance
#GOVERNOR=

# minimum frequency
#MIN_FREQ=

# maximum frequency
MAX_FREQ=800000





Online Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10633
  • MLUs Forever!
Re: CPUFREQ
« Reply #3 on: October 25, 2012, 02:40:56 PM »
use cpufreq-set according to the help output below and observe the effect on the frequency of the CPU/s until you get it as you want it.

In your case I would be inclined to use the governor and select  'ondemand' ......  which will keep the freq low unless required.

If that is not sufficient you could try 'conservative' or 'powersave'.



Code: [Select]
[user@XPS ~]$ cpufreq-set --help
cpufrequtils 008: cpufreq-set (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
Usage: cpufreq-set [options]
Options:
  -c CPU, --cpu CPU        number of CPU where cpufreq settings shall be modified
  -d FREQ, --min FREQ      new minimum CPU frequency the governor may select
  -u FREQ, --max FREQ      new maximum CPU frequency the governor may select
  -g GOV, --governor GOV   new cpufreq governor
  -f FREQ, --freq FREQ     specific frequency to be set. Requires userspace
                           governor to be available and loaded
  -r, --related            Switches all hardware-related CPUs
  -h, --help               Prints out this screen

Notes:
1. Omitting the -c or --cpu argument is equivalent to setting it to zero
2. The -f FREQ, --freq FREQ parameter cannot be combined with any other parameter
   except the -c CPU, --cpu CPU parameter
3. FREQuencies can be passed in Hz, kHz (default), MHz, GHz, or THz
   by postfixing the value with the wanted unit name, without any space
   (FREQuency in kHz =^ Hz * 0.001 =^ MHz * 1000 =^ GHz * 1000000).
[user@XPS ~]$
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1477
  • In theory, theory=practice, in practice ???
Re: cpufreq
« Reply #4 on: October 25, 2012, 06:06:58 PM »
I just had to reset mine the other day because my machine
keeps trying to tell me I have a dual core processor when
I don't and keeps setting itself at the lowest speed because the
battery is dead.    Anyway.

cpufreq-set -r -g performance

The above gives the highest performance out of all processors
at all times.    I'd place that command at the bottom of /etc/rc.local

Other options to set to a set speed are available.

cpufreq-set -r -g performance -u 800mhz

for example.

Hope the above helps.

« Last Edit: October 25, 2012, 08:02:55 PM by Ferdes Fides »
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline dsonyay

  • Full Member
  • ***
  • Posts: 193
Re: cpufreq
« Reply #5 on: October 26, 2012, 12:44:31 PM »
What does the choice "USERSPACE" do?

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1477
  • In theory, theory=practice, in practice ???
Re: cpufreq
« Reply #6 on: October 26, 2012, 04:21:42 PM »
What does the choice "USERSPACE" do?


Available governors:

cpufreq_ondemand (default and recommended)
    Dynamically switches between the CPU(s) available clock speeds based on system load
cpufreq_performance
    The performance governor runs the CPU(s) at maximum clock speed
cpufreq_conservative
    Similar to ondemand, but the CPU(s) clock speed switches gradually through all its available frequencies based on system load
cpufreq_powersave
    Runs the CPU(s) at minimum speed
cpufreq_userspace
    Manually configured clock speeds by user



But, test this command for a few days:

cpufreq-set -r -g conservative


Explanation:

The conservative governor switches smoothly and utilizes all of the available frequencies.
Out-of-the-box it will clock the CPU up when load reaches 75% and clock down when load
drops to 20%.

Looks good to me.

Actually, I leave mine on performance, it was only 1 or 2 degrees hotter than when
I forced it to run at a lower speed.


FF
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE