Difference between revisions of "Overclocking"

From Pandora Wiki
Jump to: navigation, search
(warranty information)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The Pandora's [[CPU]] can officially run at 600Mhz, but most Pandoras can also run at higher speeds. This can make CPU-intensive programs (such as an N64 emulator) run smoother. If you try a speed that's too high, your Pandora can freeze up. If this occurs, you can force a restart by holding the Pandora button and sliding the power switch to the right. If you still have problems, take out your battery for a minute before turning on your Pandora (this will discharge the backup capacitor that was designed to retain RTC while the battery is being changed <sup>[http://www.gp32x.com/board/index.php?/topic/57303-overclocking-broke-my-pandora/page__view__findpost__p__924479]</sup>)
+
Several components of the Pandora can be overclocked: the CPU, the system bus, and the DSP. The clock speed of the system bus also determines the clock speed of the RAM and the GPU. Overclocking the CPU is relatively well understood and harmless: the worst that can happen is that your system freezes and you need to reboot - but there is a CPU stress test available which helps to find a safe overclock speed. Overclocking the DSP is also considered to be safe. Overclocking the system bus is more dangerous, since problems may not be noticable immediately and there is no stress test available to find a safe system bus overclock speed for your unit. Because of this, overclocking the system bus may lead to SD card data corruption and other problems.
  
 +
Overclocking can make CPU- and/or GPU-intensive programs (such as an N64 emulator) run smoother. Set too high, your Pandora can freeze up. If this occurs, you can force a restart by holding the Pandora button and sliding the power switch to the right. If you still have problems, take out your battery for a minute before turning on your Pandora (this will discharge the backup capacitor that was designed to retain RTC while the battery is being changed <sup>[http://www.gp32x.com/board/index.php?/topic/57303-overclocking-broke-my-pandora/page__view__findpost__p__924479]</sup>)
 +
 +
[[Overclocking]] functionality is provided through 2 files in /proc/pandora/: cpu_mhz_max and cpu_opp_max. The *mhz* one refers to raw ARM CPU clock, *opp* one refers to TI's OPP concept - voltage+clock pairs. As far as this implementation is concerned, OPP basically means CPU voltage levels. Achieving certain clock values requires having certain minimum OPP set, for example, most units need OPP 4 or 5 to go above 800MHz. Trying to up the clock on too low OPP will crash the machine.
  
 
==How to Overclock==
 
==How to Overclock==
 
'''Notes:'''
 
'''Notes:'''
  
The [[OMAP]] core will actually adjust its speed to match the load; you are setting the ''upper limit''. On its own, reducing the clock speed has little impact on battery life.
+
The OMAP core will actually adjust its speed to match the load; you are setting the ''upper limit''. On its own, reducing the clock speed has little impact on battery life.
  
 
The operating voltage is specified as an 'opp' in the range 1-5, with 3 being the default.
 
The operating voltage is specified as an 'opp' in the range 1-5, with 3 being the default.
  
===GUI Tools===
+
===Graphical Tools===
The OS comes with the ability to modify the CPU speed from the GUI. Under "System" in the menu, you should find "CPU-Speed". This gives you a slider to set the desired MHz. Since [[Hot Fix 5]], the maximum and minimum values can be set by using a separate tool (previously, it was limited from 14 to 900MHz).
+
"System" "CPU-Speed". This gives you a slider to set the desired MHz. Since Hot Fix 5, the maximum and minimum values can be set by using a separate tool (previously, it was limited from 14 to 900MHz).
  
A second tool was introduced in [[Hot Fix 5]] which allows you to set the maximum OPP level, define the minimum/maximum clock speeds, change the way the "CPU-Speed" script warns you, and define a default clock speed. This can be found under "Settings", then "CPU-Settings".
+
"Settings" → "CPU-Settings".
 +
A second tool was introduced in Hot Fix 5 which allows you to set the maximum OPP level, define the minimum/maximum clock speeds, change the way the "CPU-Speed" script warns you, and define a default clock speed.
  
===CLI Commands===
+
You can also use [http://repo.openpandora.org/?page=detail&app=sysinfo.wb Pandora System Info] to set the clock speed of the CPU. At the CPU information panel (press "C" or "1" to go to that panel), press the "<" and ">" keys (or rather "," and ".") to change the clock speed. You can change it faster by holding L1 (10MHz increments) or R1 (100MHz increments).
For anyone who likes using the terminal, here are some examples:
+
 
 +
===Terminal Commands===
  
 
To set OPP5:
 
To set OPP5:
 
<source lang="bash">echo 5 > /proc/pandora/cpu_opp_max</source>
 
<source lang="bash">echo 5 > /proc/pandora/cpu_opp_max</source>
  
To set your CPU speed to 800MHz:
+
To set your CPU speed:<br>
<source lang="bash">echo 800 > /proc/pandora/cpu_mhz_max</source>
+
see [[Kernel_interface#Overclocking|Overclocking]]
  
 
==Voltage Scaling==
 
==Voltage Scaling==
{{warning|OverVolting can potentially halve the life of your Pandora}}
+
{{warning|OverVolting can potentially halve the lifespan of your Pandora}}
OverVolting can be chieved by adjusting the [[Power_modes#Opperating_Point|operating point (OPP)]]
+
OverVolting can be achieved by adjusting the [[Power_modes#Opperating_Point|operating point (OPP)]]
  
At low frequencies, the [[OMAP]] can still work with a reduced voltage, and that causes it to drain the battery a little slower. Alternatively, you can increase the voltage and maybe get a higher overclock. '''This WILL reduce the lifetime of your Pandora.''' 3 is the default OPP.
+
At low frequencies, the OMAP CPU can still work with a reduced voltage, and that causes it to drain the battery a little slower. Alternatively, you can increase the voltage and maybe get a higher overclock. '''This WILL reduce the lifetime of your Pandora.''' 3 is the default OPP.
  
 
If you reduce the CPU speed below specific thresholds, the voltage will automatically adjust downwards.  If you set the OPP to 1 whilst still running at the default 500 MHz, your Pandora is very likely to crash. At 4, you may see almost as good an overclock performance as at 5.
 
If you reduce the CPU speed below specific thresholds, the voltage will automatically adjust downwards.  If you set the OPP to 1 whilst still running at the default 500 MHz, your Pandora is very likely to crash. At 4, you may see almost as good an overclock performance as at 5.
Line 38: Line 43:
 
OPP5 and 1Ghz is the maximum level that is covered by warranty.[http://boards.openpandora.org/index.php?/topic/2993-overclocking-questions/page__st__20__p__71694#entry71694]
 
OPP5 and 1Ghz is the maximum level that is covered by warranty.[http://boards.openpandora.org/index.php?/topic/2993-overclocking-questions/page__st__20__p__71694#entry71694]
  
 +
== Linux kernel info ==
 +
 +
Exact meaning of /proc/ files is slightly different on different kernel versions:
 +
=== 2.6.27 ===
 +
* cpu_mhz_max - sets CPU clock to value written (in MHz), plain and simple.
 +
* cpu_opp_max - sets maximum opp level (1-5). The actual OPP level set in hardware will depend on cpu_mhz_max (but will never exceed cpu_opp_max):
 +
{|
 +
|-
 +
|mhz:
 +
|0-125
 +
|126-250
 +
|251-600
 +
|601-720
 +
|720-inf.
 +
|-
 +
|opp:
 +
|1
 +
|2
 +
|3
 +
|4
 +
|5
 +
|}
 +
This is more optimistic than TI recommendations, but was experimentally determined to work in most cases.
 +
=== 3.2+ ===
 +
On 3.2 this has been reworked to use cpufreq:
 +
* cpu_mhz_max - set the maximum clock cpufreq can set
 +
* cpu_opp_max - set the maximum OPP level cpufreq can set
 +
cpufreq can then scale OPP and frequency automatically depending on CPU usage, if "ondemand" governor is set. Governor can be checked/changed by reading/writing
 +
<source lang="bash">
 +
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
 +
</source>
 +
list of available governors is at
 +
<source lang="bash">
 +
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
 +
</source>
 +
(some may need to be modprobe'd before use).
 +
If "ondemand" governor is not set, cpufreq/scaling_governor must be updated after cpu_mhz_max is set (can write the same value as previous one).
 +
=== config ===
 +
Firmware overclocking tools use /etc/pandora/conf/cpu.conf to limit cpu_mhz_max and cpu_opp_max.
 
[[Category:Tutorials]]
 
[[Category:Tutorials]]
 
[[Category:Optimization]]
 
[[Category:Optimization]]

Latest revision as of 13:39, 6 November 2013

Several components of the Pandora can be overclocked: the CPU, the system bus, and the DSP. The clock speed of the system bus also determines the clock speed of the RAM and the GPU. Overclocking the CPU is relatively well understood and harmless: the worst that can happen is that your system freezes and you need to reboot - but there is a CPU stress test available which helps to find a safe overclock speed. Overclocking the DSP is also considered to be safe. Overclocking the system bus is more dangerous, since problems may not be noticable immediately and there is no stress test available to find a safe system bus overclock speed for your unit. Because of this, overclocking the system bus may lead to SD card data corruption and other problems.

Overclocking can make CPU- and/or GPU-intensive programs (such as an N64 emulator) run smoother. Set too high, your Pandora can freeze up. If this occurs, you can force a restart by holding the Pandora button and sliding the power switch to the right. If you still have problems, take out your battery for a minute before turning on your Pandora (this will discharge the backup capacitor that was designed to retain RTC while the battery is being changed [1])

Overclocking functionality is provided through 2 files in /proc/pandora/: cpu_mhz_max and cpu_opp_max. The *mhz* one refers to raw ARM CPU clock, *opp* one refers to TI's OPP concept - voltage+clock pairs. As far as this implementation is concerned, OPP basically means CPU voltage levels. Achieving certain clock values requires having certain minimum OPP set, for example, most units need OPP 4 or 5 to go above 800MHz. Trying to up the clock on too low OPP will crash the machine.

How to Overclock

Notes:

The OMAP core will actually adjust its speed to match the load; you are setting the upper limit. On its own, reducing the clock speed has little impact on battery life.

The operating voltage is specified as an 'opp' in the range 1-5, with 3 being the default.

Graphical Tools

"System" → "CPU-Speed". This gives you a slider to set the desired MHz. Since Hot Fix 5, the maximum and minimum values can be set by using a separate tool (previously, it was limited from 14 to 900MHz).

"Settings" → "CPU-Settings". A second tool was introduced in Hot Fix 5 which allows you to set the maximum OPP level, define the minimum/maximum clock speeds, change the way the "CPU-Speed" script warns you, and define a default clock speed.

You can also use Pandora System Info to set the clock speed of the CPU. At the CPU information panel (press "C" or "1" to go to that panel), press the "<" and ">" keys (or rather "," and ".") to change the clock speed. You can change it faster by holding L1 (10MHz increments) or R1 (100MHz increments).

Terminal Commands

To set OPP5:

echo 5 > /proc/pandora/cpu_opp_max

To set your CPU speed:
see Overclocking

Voltage Scaling



OverVolting can be achieved by adjusting the operating point (OPP)

At low frequencies, the OMAP CPU can still work with a reduced voltage, and that causes it to drain the battery a little slower. Alternatively, you can increase the voltage and maybe get a higher overclock. This WILL reduce the lifetime of your Pandora. 3 is the default OPP.

If you reduce the CPU speed below specific thresholds, the voltage will automatically adjust downwards. If you set the OPP to 1 whilst still running at the default 500 MHz, your Pandora is very likely to crash. At 4, you may see almost as good an overclock performance as at 5.

App-specific Speed Control

It is possible to auto configure specific applications to increase the CPU speed whilst running. Applications can be configured to prompt with a suggested speed, and you are given the option to select a speed, making the choice persistent if desired. This is done by placing a cpuspeed file in the /pandora/appdata/{pnd_name}/ directory. Delete the file to have the app ask again next time it is run. Some apps, such as PCSX-rearmed, also allows on-the-go overclocking thanks to the sdk.

Warranty information

OPP5 and 1Ghz is the maximum level that is covered by warranty.[2]

Linux kernel info

Exact meaning of /proc/ files is slightly different on different kernel versions:

2.6.27

  • cpu_mhz_max - sets CPU clock to value written (in MHz), plain and simple.
  • cpu_opp_max - sets maximum opp level (1-5). The actual OPP level set in hardware will depend on cpu_mhz_max (but will never exceed cpu_opp_max):
mhz: 0-125 126-250 251-600 601-720 720-inf.
opp: 1 2 3 4 5

This is more optimistic than TI recommendations, but was experimentally determined to work in most cases.

3.2+

On 3.2 this has been reworked to use cpufreq:

  • cpu_mhz_max - set the maximum clock cpufreq can set
  • cpu_opp_max - set the maximum OPP level cpufreq can set

cpufreq can then scale OPP and frequency automatically depending on CPU usage, if "ondemand" governor is set. Governor can be checked/changed by reading/writing

/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

list of available governors is at

/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors

(some may need to be modprobe'd before use). If "ondemand" governor is not set, cpufreq/scaling_governor must be updated after cpu_mhz_max is set (can write the same value as previous one).

config

Firmware overclocking tools use /etc/pandora/conf/cpu.conf to limit cpu_mhz_max and cpu_opp_max.