Overclocking

From Pandora Wiki
Revision as of 14:39, 6 November 2013 by Jonsneyers (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.