Configure cpufreqd for laptop users

Source: Internet
Author: User
Tags apm
Article Title: Configure cpufreqd for laptop users. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
If you use notebook without a good speedstep, the sound of the fan will be annoying, and the battery time will also be reduced-but I don't care about it, because there is basically no battery.
  
The commonly used speedstep software includes cpudyn, cpufreqd, and powernowd. The cpufreq_ondemand in the new kernel can also adjust the cpu frequency according to the system load.
  
Why not use cpufreq_ondemand directly? For example, some websites may make the cpu usage reach 100% due to some bad javascript. I don't want to keep the cpu running at full speed for these websites, I hope the cpu runs at full speed only when running gcc/g ++/make, or when bzip2 or gzip is added. In other cases, it is cooler. this requires cpufreqd. The core is the CPU Dyn and powernowd.
  
You need to use speedstep and kernel configuration,
  
Code:
  
1. Provides the speedstep operation api
For example, speedstep_smi, speedstep_ich, and speedstep_centrino. The core configurations are described. You can select the correct one based on the actual situation of your machine,
Basically
Of course, the centrino is the speedstep_centrino
Machines with PIII-M and P4-M can access speedstep with the speedstep-ich Module
Speedstep_smi for copper PIII
  
Desktop P4 also has an X86_P4_CLOCKMOD Interface
  
2. cpufreq governor
Cpu frequency controller
  
If a proper module has been loaded on the speedstep, load the gover cpufreq_perfermance.
The cpu keeps running at high speed. If the gover cpufreq_powersafe is loaded, it will keep running at low speed.
Cpufreq_ondemand enables the core to automatically adjust according to the cpu load. If cpufreq_userspace is loaded, the user
Level code can be directly controlled by/sys/devices/system/cpu/cpu0/cpufreq.
  
Cpudyn, cpufreqd, and powernowd
The user-level code and core code communication interfaces in/proc or/sys are not the same for each software.
Check that each interface is selected during core compilation, including the three obsolete interfaces/proc/cpufreq,/proc/sys/cpu/
/Proc/acpi/processor/../performance, which does not increase the overhead.
  
Cpufreqd does not automatically load the module. Therefore, cpufreq_gov is cpufreq_performance,
Cpufreq_powersave and cpufreq_ondemand are either compiled into the kernel or in modules.
Load.
  
I want cpufreqd to work with acpi instead of apm. Therefore, the system must install acpid.
  
My/etc/modules is as follows
  
Code:
  
Speedstep-ich
Cpufreq_powersave
Cpufreq_performance
  
My cpufreqd. conf provides high-speed cpu for compilation and low-speed cpu at other times, as shown below:
  
Code:
  
# The profile definition is omitted here, and the default setting is returned.
  
[General]
Pidfile =/var/run/cpufreqd. pid
Poll_interval = 4
Pm_type = acpi # (acpi, apm or pmu)
# Uncomment the following line to enable ACPI workaround (see cpufreqd. conf (5 ))
# Acpi_workaround = 1
Verbosity = 4 # (if you want a minimal logging set to 5)
  
# Non-compiled ac
[Rule]
Name = not_important
Ac = on # (on/off)
Battery_integer = 0-100
Cpu_interval = 0-100
Profile = lo_power
  
  
# Uncompiled battery
[Rule]
Name = not_important_bat
Ac = off # (on/off)
Battery_integer = 0-100
Cpu_interval = 0-100
Profile = lo_power
  
  
# Even if the programs does not match, the two will get 14 points. Therefore, if the programs does not match, the two points above will be the same, and the above two points will be used.
# Gcc compilation, ac
[Rule]
Name = important
Ac = on # (on/off)
Battery_integer = 0-100
Programs = cc1plus, make
Cpu_interval = 80-100
Profile = hi_boost
  
# Gcc compilation, battery
[Rule]
Name = important_bat
Ac = off # (on/off)
Battery_integer = 0-100
Programs = cc1plus, make
Cpu_interval = 80-100
Profile = hi_boost
  
Then killall-SIGHUP cpufreqd, cpufreqd can work normally, such flexible configuration, windows below also seems to be only ibm/sony/toshba three programs can achieve http://sourceforge.net/projects/bioswriter/
Tool for reading and writing BOIS in LINUX'
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.