Overclocking the CPU of a Rasp Pi running OpenELEC

Modifying the Configuration

With SSH, the commands are the same on all operating systems. To modify the configuration file, enter:

$ mount /flash -o remount,rw
$ cd /flash
$ nano config.txt

The first command allows you to write on the /flash partition of the system. The second command changes directory in the corresponding folder, and the last command opens the OpenELEC configuration file in the Nano text editor.

Now in Nano, scroll down to the section labeled Overclock mode settings. A table commented out with hash marks lists the default values recommended by the Raspberry Pi Foundation (Table 1). Understandably, far fewer of these values exist for the RPi2, given the shorter user experience. Therefore, as of March 2015, the table in config.txt contains only values for the first-generation Rasp Pi. The values for the RPi2 presented in Table 1 are derived from tests performed within the Rasp Pi community [5] and have shown good results in my tests.

Table 1

Recommended Clock Rates

 

arm_freq (MHz)

core_freq (MHz)

sdram_freq (MHz)

over_voltage

Raspberry Pi 1

Standard

700

250

400

0

Modest

800

300

400

0

Medium

900

333

450

2

High

950

450

450

6

Turbo

1000

500

500

6

Raspberry Pi 2

Standard

900

250

450

0

High*

1000

500

500

2

Turbo*

1100

500

500

6

*Currently no official overclock rates are recommended for the RPi2.

To initiate overclocking, use the editor to remove the hash marks in front of lines arm_freq through over_voltage, which increases the supply voltage for the chipset. Next, enter the values from one of the rows in the table (Figure 5). For example, to overclock using the RPi1 High settings, enter:

arm_freq=950
core_freq=450
sdram_freq=450
over_voltage=6

The equivalent lines for the RPi2 High settings would be:

arm_freq=1000
sdram_freq=500
core_freq=500
over_voltage=2

To save your changes, press Ctrl+O, and confirm the existing file name with the Enter key. To close the editor, press Ctrl+X.

Figure 5: The maximum clock rates selected to overclock the Rasp Pi should be entered manually into config.txt.

Please do not start immediately in Turbo mode and set the clock rates at maximum speed. Instead, it is better to proceed step by step. Not every Raspberry Pi can tolerate the maximum clock rate, so you should observe the system after increasing the CPU speed gradually. If the system is stable, you can turn the rate up a notch. If the system experiences interruptions, or worse yet a crash, you should take the rate back down a notch. In this way, you can figure out the limits to overclocking your Rasp Pi.

The operating system increases the clock rate only as needed regardless of the overclock rate chosen. For example, when Kodi has nothing to do, the system will reduce CPU speed to the default settings. However, the system turns up the clock rate when playing high-resolution videos or navigating through the menus. This strategy saves electricity and significantly reduces the average operating temperature of the Rasp Pi. Additionally, a built-in mechanism shuts the CPU down when temperatures get too high.

Overclocking with increased workload does not occur instantaneously. To achieve the fastest possible response, you can deactivate variable clocking with the force_turbo=1 option:

# set to 'force_turbo=1' to disable dynamic
# overclocking (you can lose your warranty!)
force_turbo=0

However, take into account when using this option that the Rasp Pi will set a so-called sticky bit in the CPU, which in turn might affect your warranty. You won't need this option when the Rasp Pi is used as a media center, because it will work fast enough with moderate overclock settings.

Testing

After saving the modified configuration file, you need to restart the OpenELEC system to activate the changes; however, you should first unplug the Rasp Pi from the power supply or go to the home screen and find the power icon below the menu on the left for shutting down and restarting Kodi. The overclocked system should run noticeably better, especially if you're using an RPi1 (but see the "Emergency Plan" box). For example, navigating through the menus should be more fluid.

Emergency Plan

If the Raspberry Pi does not tolerate overclocking and the system won't restart, you need to edit the configuration file on your computer, or you can hook up a keyboard to the Rasp Pi running OpenELEC and hold the Shift key down during the boot process. If the computer recognizes this keypress, it will ignore all of the changes made to the config.txt file and start without engaging the afterburners.

If you don't notice much of a difference, you should test the success of your overclocking activities by going to System | System info | Hardware (Figure 6). You can increase the clock rate by another level as needed. To make sure the Rasp Pi only overclocks when required, pay attention to the system information while playing a high-resolution video like Tears of Steel [6] in HD 1080p.

Figure 6: System information tells you how hard the media center CPU is working.

Buy this article as PDF

Express-Checkout as PDF

Pages: 4

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content