Discussion
Setting CPU Frequency (CB for Banana Pi image)
26
51384
View: 51384|Reply: 26
|
[Discussion]
Setting CPU Frequency (CB for Banana Pi image)
[Copy link]
|
|
Post Last Edited by tony_zhang at 2014-5-4 12:45
Post Last Edited by tony_zhang at 2014-5-1 15:37
Banana Pi CPU frequency can be adjusted in real time, , the following file save as shell file, or placed in / etc / rc.local before the exit 0 can be executed. Specific CPU frequency maximum and minimum values can be set based on usage .- #!/bin/sh
- echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
- echo 1000000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
- echo 600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
- echo 25 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
- echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
Copy the Code After testing, Banana Pi dual-core A20 can also be overclocked to 1.2GHz. |
|
|
|
|
|
|
|
it is not stable @1.2GHZ on my board. |
|
|
|
|
|
|
|
I have a little heatsink ( see here ) on the A20 and
tested 1.2 Ghz with "stress --cpu 2" for 4 hours, no problems. |
|
|
|
|
|
|
|
I don't like overclocking, like factory clock, more stable, more life. |
|
|
|
|
|
|
|
My board is stable only on 1008 Mhz - all, that higher leads to x-server crash, then hang...
It is necessary to measure real core voltages on 1,2G to make final conclusion and maybe add some voltage in dvfs_table section. Maybe then I'll get it stable. For now 1008 is enough. |
|
|
|
|
|
|
|
Hello!
What´s the lowest usable frequency ? it your settings above, min is 60 Mhz...
what are theese settings exactly for?
/sys/devices/system/cpu/cpufreq/ondemand/up_threshold
/sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
many thanks! br hk2k2 |
|
|
|
|
|
|
|
Hello!
What´s the lowest usable frequency ? it your settings above, min is 60 Mhz...
what are thee ...
hk2k2 Posted at 2014-7-24 17:46 
This explains a few things. I've noticed a few reviews that show how slow the board is in single threaded benchmarks. Eg: slower than the rpi but in multi-threaded tests the bpi somehow becomes over four times faster.
The default governor is "fantasy" with a range of 336-912mhz with lagged scaling. Which is what those two settings are used for (up_threshold and sampling rate).
Back to those reviews with single threaded benchmarks...Now we can see that in single threaded benchmarks with the default governor those boards are never ramping up and so are running on a single thread at ~336mhz. When allowed to use both threads they ramp up to using both cores at 912mhz.
With the settings in the OP a single core will now ramp up because one maxed core will go over the threshold and run at 1ghz and you will get single-threaded benchmark results in line with what you would expect. You'll also now be getting the advertised dual 1ghz instead of 912mhz.
Some more detail here: http://linux-sunxi.org/Cpufreq |
|
|
|
|
|
|
|
Post Last Edited by thatsbanana at 2014-8-7 15:13
Post Last Edited by thatsbanana at 2014-8-7 15:12
Post Last Edited by thatsbanana at 2014-8-7 15:12
This didn't work for me because I got a 'permission denied' every time (logged in as admin).
However I changed the lines and then it did work. Any reason why it didn't work initially?- #!/bin/sh
- echo ondemand | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
- echo 1000000 | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
- echo 600000 | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
- echo 25 | sudo tee /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
- echo 10 | sudo tee /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
Copy the Code I did some over clocking from 0.9 to 1.3 GHz with a passive cooler attached!  |
|
|
|
|
|
|
|
What about temperatures?
I get 35°C in an idle desktop and up to 50°C in 100% CPU use after 1 hour (both with cooler attached).
Can someone give me his CPU temperatures idle and busy?
(in Lubuntu start->system tools->system profiler and benchmark->sensors) |
|
|
|
|
|
|