不用软件超频降频CPU GPU 

官方正式版没试过,因为我已经刷了心灵的集优版了,心灵的内核已经支持频率调节CPU,但是GPU还没有实现。 


CPU 

CPU频率,governor都在这个文件夹下面,/sys/devices/system/cpu/,里面分别包含CPU0CPU1。由于高通双核是异步运行的,因此CPU1暂时不好调节(除非你强行打开),因为如果负荷不高,CPU1是关闭的。/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 这个文件就是我们通常说的governor了,可以选用ondemand, performance, powersave等模式。降频的话只要改这个文件/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq,比如1026M(你要输入的数值应该是1026000)。 

好了,比方说你想要ondemand模式,最高频率是1026,就用RE分别打开 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor,然后输入ondemand退出,RE会提示你保存并自动备份。同样打开/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq,输入1026000退出。 

注意调节频率的时候要看你输入的频率是否支持,查看同文件夹下面的scaling_available_frequencies 

超频我没试过,因为速度已经够快了。 


GPU 

GPUgovernor自动是ondemand,因此调频的话只需要改max_gpuclk就行了,也就是最高频率。 

分别修改/sys/class/kgsl/kgsl-2d0/max_gpuclk (默认200000000,代表200m的频率),/sys/class/kgsl/kgsl-2d1/max_gpuclk(默认200000000),/sys/class/kgsl/kgsl-3d0/max_gpuclk(默认300000000)三个文件,输入你想要的频率。同理先参看scaling_available_frequencies是否支持你的频率。 

改好后用kernel tunner查看,就会发现频率已经变了。 

注意重启后就失效了。我自己用了个脚本启动的时候自动修改。 

 

Android: Changing GPU frequency for Adreno GPUs (Nexus 4)

July 6, 2013

the GPU is one of the most commonly used and power hungry part of the smart phone experience and its one of the main reasons just typing out a text message can cause your phone to get uncomfortably warm. Heres some advice on how to manipulate the GPU. Of course you need root to change any of this. In a console or ADB the relevant nodes are in:

/sys/class/kgsl/kgsl-3d0

In here youll find the following:

gpuclk: This prints out the current clock rate for the GPU.

max_gpuclk: The maximum clock the GPU will pick.

idle_timer Were not going to touch this now but this value means the time after the GPU is used to keep the GPU in a ready’ state. Set it too high and power will be terrible, set it too low and both power AND performance will be terrible. Id just leave it alone.

pwrscale/avail_policies This is a list of available algorithms used for calculating the optimal GPU frequency.

pwrscale/policy This is the current algorithm used, probably trustzone. Trustzone means the algorithm is somewhere else out of the kernel so you wont know what its actually doing. 

If you just want to set the gpu frequency to maximum and forget about it: echo none > pwrscale/policy This is a really bad idea if you like to have a long battery life. 

You can also set the GPU clock to any frequency you want, after you set the pwrscale/policy to none you can now echo any available frequency to the gpuclk node and it will set the gpu to that frequency. Or you can only set the max_gpuclk to whatever frequency you want and then let the algorithm decide which frequencies below that rate to use. 

But which frequencies to use? Luckily all the gpu performance levels are readily available in open source, that file shows what is relevant for my Nexus 4, and any other device that uses the Qualcomm 8064 hardware. Its not mentioned here but each of these GPU levels also correlates with system voltages. The highest frequencies have the highest voltages and that means theyll burn through power much faster. Using lower frequencies will save a lot of power but performance will likely take a hit. Personally I wrote a script to set max_gpuclk to 325000000 every boot up which I think is a good compromise.


高通手机 gpu 频率调节

echo 400000000 > /sys/class/kgsl/kgsl-3d0/max_gpuclk 
cat /sys/class/kgsl/kgsl-3d0/max_gpuclk