Intel89
Posts: 2
Joined: Wed Mar 11, 2015 12:46 pm

Re: Overclocking

Wed Mar 11, 2015 9:42 pm

Hi, I just got my very first Pi (Pi 2 Model B) yesterday and started tinkering with it right away. I tried overclocking it using the turbo preset but it failed to boot every single time (I'm using 5v/2A power lead, not sure if power is the problem), any tips on what to do?

I'd also like to know if the Pi2 overclock pre-set voids the Pi warranty, thanks. :)

User avatar
expandables
Posts: 654
Joined: Fri Jun 27, 2014 7:34 pm
Location: Neverland with Michael Jackson

Re: Overclocking

Thu Mar 12, 2015 12:35 am

Is this a stable over clock?

Code: Select all

force_turbo=1
gpu_mem=320
arm_freq=1000
core_freq=500
sdram_freq=483
over_voltage=0
over_voltage_sdram_p=2
over_voltage_sdram_i=0
over_voltage_sdram_c=0
v3d_freq=360
:mrgreen:
By thinking like an engineer you can create a raspberry pi.
Michael Jackson enthusiast.
I got the PI model B, B+ and PI 2 model B.
When will I get the A? I don't know.

RobHenry
Posts: 452
Joined: Fri Sep 21, 2012 9:04 pm
Location: UK

Re: Overclocking

Thu Mar 12, 2015 1:05 am

Intel89 wrote:Hi, I just got my very first Pi (Pi 2 Model B) yesterday and started tinkering with it right away. I tried overclocking it using the turbo preset but it failed to boot every single time (I'm using 5v/2A power lead, not sure if power is the problem), any tips on what to do?
Use the Pi2 specific overclock setting - the one below Turbo
Intel89 wrote:I'd also like to know if the Pi2 overclock pre-set voids the Pi warranty, thanks. :)
Using the raspi-config option will not void your warranty. Setting force_turbo=1 and over_voltage>0 will void your warranty, but you can only do that by editing /boot/config.txt manually.

RobHenry
Posts: 452
Joined: Fri Sep 21, 2012 9:04 pm
Location: UK

Re: Overclocking

Thu Mar 12, 2015 1:06 am

expandables wrote:Is this a stable over clock?

Code: Select all

force_turbo=1
gpu_mem=320
arm_freq=1000
core_freq=500
sdram_freq=483
over_voltage=0
over_voltage_sdram_p=2
over_voltage_sdram_i=0
over_voltage_sdram_c=0
v3d_freq=360
:mrgreen:
Every device is different. That may be stable on one pi but not on another.

User avatar
expandables
Posts: 654
Joined: Fri Jun 27, 2014 7:34 pm
Location: Neverland with Michael Jackson

Re: Overclocking

Thu Mar 12, 2015 3:56 am

What does this stands for and do?

Code: Select all

over_voltage_sdram_p=0
over_voltage_sdram_i=0
over_voltage_sdram_c=0

:mrgreen:
By thinking like an engineer you can create a raspberry pi.
Michael Jackson enthusiast.
I got the PI model B, B+ and PI 2 model B.
When will I get the A? I don't know.

Intel89
Posts: 2
Joined: Wed Mar 11, 2015 12:46 pm

Re: Overclocking

Thu Mar 12, 2015 9:18 am

RobHenry wrote:
Intel89 wrote:Hi, I just got my very first Pi (Pi 2 Model B) yesterday and started tinkering with it right away. I tried overclocking it using the turbo preset but it failed to boot every single time (I'm using 5v/2A power lead, not sure if power is the problem), any tips on what to do?
Use the Pi2 specific overclock setting - the one below Turbo
Intel89 wrote:I'd also like to know if the Pi2 overclock pre-set voids the Pi warranty, thanks. :)
Using the raspi-config option will not void your warranty. Setting force_turbo=1 and over_voltage>0 will void your warranty, but you can only do that by editing /boot/config.txt manually.
Great, thanks for the help! I'll give the Pi2 pre-set OC a run once I get home from work. :D

User avatar
expandables
Posts: 654
Joined: Fri Jun 27, 2014 7:34 pm
Location: Neverland with Michael Jackson

Re: Overclocking

Thu Mar 12, 2015 2:42 pm

The raspberry pi foundation default overclock of 1ghz has over_voltage=2 which is still unstable for most rpi2 by setting just one
sd ram to 2 over_voltage_sdram_p=2 wouldn't it make the 1ghz stable compare to setting all to 2? :mrgreen:
By thinking like an engineer you can create a raspberry pi.
Michael Jackson enthusiast.
I got the PI model B, B+ and PI 2 model B.
When will I get the A? I don't know.

Qwahchees
Posts: 4
Joined: Fri Apr 24, 2015 5:09 am

Re: Overclocking

Sat Apr 25, 2015 7:34 am

Any tips on passing 1115 from sdcard corruption/kernel panic after stress test?

aphorise
Posts: 2
Joined: Wed May 13, 2015 3:48 pm

Re: Overclocking

Wed May 13, 2015 4:26 pm

I'm having trouble getting any overclocking to work with my RPI2b.

I'm using a PSU with the following rating: 5v / 2.2A - with the latest firmware.

I'm also following the blog / configuration thats been kindly provided by hglm:

Code: Select all

arm_freq=1000
over_voltage=0
core_freq=500
sdram_freq=483
over_voltage_sdram_p=0
over_voltage_sdram_i=0
over_voltage_sdram_c=0
However - the CPU-Frequency panel in LXDE always reports this as 600Mhz (shouldnt it be 700?) - similar to CLI tools which also claim the same unchanged frequency. Occasionally with some settings I get initialisation errors where it loops indefinably trying to init related CPU stuff and never succeeds.

Is overclocking specific to certain models and batches only?
What may I be doing wrong?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5762
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Overclocking

Wed May 13, 2015 6:12 pm

Overclocking by definition means clocking faster than the chip is rated.
There is no guarantee any overclock above default will work.
All chips are different. Some will overclock more than others.

If you get any instability or crashes then you will have to reduce the overclock.
Make sure you any experiments on a backed up (or freshly installed) sdcard image, as the crashes than can occur during testing could corrupt sdcard.

The cpu frequency will report 600MHz when system is idle. Only when at least one of cores is above 50% busy will the top frequency be switched to.
Launch Epiphany Web browser and you should see the frequency increase.

aphorise
Posts: 2
Joined: Wed May 13, 2015 3:48 pm

Re: Overclocking

Wed May 13, 2015 7:56 pm

dom wrote:The cpu frequency will report 600MHz when system is idle. Only when at least one of cores is above 50% busy will the top frequency be switched to.
@dom thanks for the info. Whats the power deamon thats adaptively adjusting / scaling CPU? - is there a way I can disable / set speeds to a fixed maximum? perhaps a _min in by config.txt ?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5762
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Overclocking

Fri May 15, 2015 10:45 am

We use the ondemand governor by default. That and other settings can be changed in /sys/devices/system/cpu/cpu0/cpufreq/
Switching to the performance governor, or changing up_threshold and/or sampling_down_factor can tweak when turbo mode is active.

arm_freq_min=500 in config.txt would reduce the non-turbo frequency (Note: this can't be set above the default of 600).

User avatar
DrDominodog51
Posts: 79
Joined: Sun Sep 29, 2013 6:16 pm

Re: Overclocking

Sat May 16, 2015 7:12 pm

What programs does anyone use to test GPU overclocks?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5762
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Overclocking

Mon May 18, 2015 5:31 pm

Latest rpi-update firmware includes and alternative sdcard driver ("sdhost") and settings for sdcard overclocking.
Note: any experimenting with sdcard overclock could cause corruption, so only test if you are backed up.

From @PhilE
The mmc driver loads by default, but you can gratuitously use an overlay:

Code: Select all

    dtoverlay=mmc
The sdhost driver requires an overlay to select it:

Code: Select all

    dtoverlay=sdhost
To activate the overclock, use one of the following:

Code: Select all

    dtoverlay=mmc,overclock_50=63
    dtoverlay=sdhost,overclock_50=63
    dtoverlay=sdhost,overclock_50=84
Supplied overclock values will be substituted when the MMC framework requests 50MHz, after rounding down to an (even, in the case of the mmc driver) integer division of 250MHz (or whatever the core clock is, if overclocking). You will get a warning message during bootup showing that the overclock is active:

Code: Select all

rpi22:~ # dmesg | grep Overclock
[    1.518576] mmc0: Overclocking to 62500000Hz
These are the results from a Rev 1.1 B+ (the mmc driver can't reach 50MHz because of the even-clock-divisor requirement):

Code: Select all

Class 6 NOOBS:
mmc    42 -> hdparm -t=17.52MB/s, dd read=18.2MB/s, dd write=7.0MB/s
sdhost 50 -> hdparm -t=21.22MB/s, dd read=22.1MB/s, dd write=7.0MB/s (read +21%)
mmc    63 -> hdparm -t=25.07MB/s, dd read=26.0MB/s, dd write=7.0MB/s (read +43%)
sdhost 63 -> hdparm -t=25.97MB/s, dd read=27.0MB/s, dd write=7.0MB/s (read +48%)
sdhost 84 -> hdparm -t=32.95MB/s, dd read=34.0MB/s, dd write=7.0MB/s (read +87%)

Sandisk Class 10:
mmc    42 -> hdparm -t=17.83MB/s, dd read=18.6MB/s, dd write=9.7MB/s
sdhost 50 -> hdparm -t=21.27MB/s, dd read=22.1MB/s, dd write=10.0MB/s (read +18%, write +3%)
mmc    63 -> hdparm -t=25.87MB/s, dd read=26.8MB/s, dd write=10.3MB/s (read +44%, write +6%)
sdhost 63 -> hdparm -t=26.02MB/s, dd read=27.0MB/s, dd write=10.3MB/s (read +45%, write +6%)
sdhost 84 -> hdparm -t=33.31MB/s, dd read=34.4MB/s, dd write=10.5MB/s (read +85%, write +8%)
Note that you can confirm the current operating state of the card using:

Code: Select all

cat /sys/kernel/debug/mmc0/ios
Phil
These are @Milhouse's benchmark results when using a class 6 NOOBS 8GB SD card in a RPi2. Results are from this script:

Code: Select all

Overlay config                      core_freq   turbo   overclock_50    WRITE        READ        HDPARM
dtoverlay=mmc                          250        0      41.667 Mhz    6.06 MB/s   18.21 MB/s   18.54 MB/s   [1]
dtoverlay=mmc,overclock_50=63          250        0      62.500 Mhz    5.95 MB/s   26.47 MB/s   26.58 MB/s
dtoverlay=sdhost                       250        0      50.000 Mhz    5.90 MB/s   21.49 MB/s   21.64 MB/s
dtoverlay=sdhost,overclock_50=63       250        0      62.500 Mhz    5.93 MB/s   26.34 MB/s   26.80 MB/s
dtoverlay=sdhost,overclock_50=84       250        0      83.333 MHz    5.98 MB/s   34.00 MB/s   34.87 MB/s

dtoverlay=mmc                          250        1      41.667 MHz    6.03 MB/s   18.28 MB/s   18.48 MB/s   [1]
dtoverlay=mmc,overclock_50=63          250        1      62.500 MHz    6.01 MB/s   26.61 MB/s   27.15 MB/s
dtoverlay=sdhost                       250        1      50.000 MHz    6.03 MB/s   21.50 MB/s   22.00 MB/s
dtoverlay=sdhost,overclock_50=63       250        1      62.500 MHz    6.06 MB/s   26.35 MB/s   27.15 MB/s
dtoverlay=sdhost,overclock_50=84       250        1      83.333 MHz    6.00 MB/s   34.02 MB/s   35.41 MB/s
 
dtoverlay=mmc                          500        0      41.667 MHz    5.89 MB/s   18.21 MB/s   18.32 MB/s
dtoverlay=mmc,overclock_50=63          500        0      62.500 MHz    5.96 MB/s   26.48 MB/s   26.58 MB/s
dtoverlay=mmc,overclock_50=84          500        0      62.500 MHz    5.90 MB/s   26.46 MB/s   26.58 MB/s   [2, 3]
dtoverlay=sdhost                       500        0      50.000 MHz    5.99 MB/s   11.25 MB/s   11.18 MB/s   [4]
dtoverlay=sdhost,overclock_50=63       500        0      62.500 MHz    5.94 MB/s   13.97 MB/s   13.91 MB/s   [4]
dtoverlay=sdhost,overclock_50=72       500        0      71.429 MHz    5.96 MB/s   15.89 MB/s   15.79 MB/s   [4]
dtoverlay=sdhost,overclock_50=84       500        0      83.333 MHz    6.01 MB/s   18.35 MB/s   18.30 MB/s   [4]
dtoverlay=sdhost,overclock_50=100      500        0     100.000 MHz    6.00 MB/s   21.78 MB/s   21.76 MB/s   [4]

dtoverlay=mmc                          500        1      41.667 MHz    6.11 MB/s   18.31 MB/s   18.48 MB/s   [1]
dtoverlay=mmc,overclock_50=63          500        1      62.500 MHz    6.14 MB/s   26.67 MB/s   27.24 MB/s
dtoverlay=mmc,overclock_50=84          500        1      62.500 MHz    6.06 MB/s   26.66 MB/s   27.24 MB/s   [2]
dtoverlay=sdhost                       500        1      50.000 MHz    6.12 MB/s   21.50 MB/s   22.01 MB/s
dtoverlay=sdhost,overclock_50=63       500        1      62.500 MHz    6.11 MB/s   26.34 MB/s   27.15 MB/s
dtoverlay=sdhost,overclock_50=72       500        1      71.429 MHz    6.05 MB/s   29.69 MB/s   30.82 MB/s
dtoverlay=sdhost,overclock_50=84       500        1      83.333 MHz    6.06 MB/s   34.01 MB/s   35.53 MB/s
dtoverlay=sdhost,overclock_50=100      500        1     100.000 MHz    6.14 MB/s   39.81 MB/s   41.72 MB/s
Observations:
  1. The MMC driver with default clock won't achieve a 50MHz clock due to even divisor requirement (250/50 => 5, which isn't supported by the mmc driver). Nearest clock frequency with an even divisor (6) is 41.667MHz. However, at 500MHz core_freq, an even divisor of 10 would give 50MHz...
  2. The MMC driver won't accept an 84MHz overclock with core_freq=500 - this should be a divisor of 6 (even)
  3. The performance of the SDHost driver is comparable with the MMC driver at lower overclocks, however the former supports both odd/even divisors whereas the latter is limited to even divisors
  4. The performance of the SDHost driver suffers significantly at higher core_freq with force_turbo disabled. Probably best not to use sdhost at higher core_freq unless force_turbo is enabled. Turbo can be enabled in config.txt, or with:

    Code: Select all

    echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
    
Possible mmc/sdhost overclocks, based on various core frequencies - adjust core frequency to enable a specific overclock_50 frequency (bracketed items may be too high/unstable):

Code: Select all

Core     mmc	        sdhost
Freq     overclock_50   overclock_50

250      63             63,84
275      69             55,69,92
300      50,75          60,75,100
325      55,82          55,65,82,(109)
350      59,88          59,70,88.(117)
375      63,94          54,63,75,94
400      67,100         58,67,80,100
425      54,71,(107)    54,61,71,85,(107)
450      57,75,(113)    57,65,75,90,(113)
475      60,80,(119)    53,60,68,80,95,(119)
500      63,84          56,63,72,84,100

milhouse
Posts: 642
Joined: Mon Jan 16, 2012 12:59 pm

Re: Overclocking

Mon May 18, 2015 5:42 pm

Regarding my observations about the mmc driver not hitting 50Mhz when core_freq=500:
pelwell wrote: The mmc clock is locked to 250MHz. This makes it immune to variations in core frequency, but also means you can't get to other SD clock frequencies by varying core_freq.
in which case 63 is the only possible overclock_50 value for the mmc driver, regardless of whichever value is used for core_freq.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5762
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Overclocking

Mon May 18, 2015 5:52 pm

milhouse wrote:Regarding my observations about the mmc driver not hitting 50Mhz when core_freq=500:
pelwell wrote: The mmc clock is locked to 250MHz. This makes it immune to variations in core frequency, but also means you can't get to other SD clock frequencies by varying core_freq.
in which case 63 is the only possible overclock_50 value for the mmc driver, regardless of whichever value is used for core_freq.
You should be able to force that to a different value with, e.g.

Code: Select all

init_emmc_clock=500000000
Note: this setting is in Hz (most others are in MHz). E.g:

Code: Select all

core_freq=500
force_turbo=1
init_emmc_clock=500000000
should work (assuming the core_freq overclock is stable for you). init_emmc_clock on its own doesn't directly affect the speed of the communication to the sdcard, but by using a larger divisor, you are more likely to get closer to the frequency you requested. E.g. you can now get the ideal 50MHz frequency with the "mmc" driver, as it is an even divisor.

Note: init_emmc_clock is only used by "mmc" driver, not by new "sdhost" driver which directly uses core_freq as its clock.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5762
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Overclocking

Tue May 26, 2015 2:53 pm

I was asked about more extreme overclocks, using higher than 1.4V on Pi 2. I've asked James Adams for suggestions and there is a simple mod.

There is a voltage divider used to produce the SMPS reference voltage.

From the wikipedia link R55 is Z1 and R56 is Z2. By default R55 is a zero ohm link, and R56 is not fitted.

Replacing R55 with 100R and R56 with 680R will scale the 1.225V reference voltage to 1.4V, meaning if you set over_voltage=4, you will scale the expected ~1.4V to ~1.6V.

We expect you will get about 100MHz per 100mV, so that may allow another 200MHz of overclock compared to a normal 1.4V overclock.

Be aware that the chips are not tested or guaranteed at this voltage, so we can't say what the effects on lifespan may be.

User avatar
BenoitSvB
Posts: 26
Joined: Sun Sep 29, 2013 8:57 am

Re: Overclocking

Fri Jul 03, 2015 9:22 pm

dom wrote:... changing up_threshold and/or sampling_down_factor can tweak when turbo mode is active.
Where are the default values for up_threshold and sampling_down_factor set om my P1 B (512MB)?
up_threshold default is 50 on my P1 and 95 on my P2. P2 regularly shifts, P1 hangs on 900 MHz so I'd like to experiment with the values for the P1 a bit.

EDIT: found: /etc/init.d/raspi-config

plugh
Posts: 41
Joined: Sun Dec 02, 2012 6:58 pm

Re: Overclocking

Mon Jul 06, 2015 6:43 pm

I've tried a number of searches and can't find an answer...

Is avoid_pwm_pll applicable to RPi2?

thanks

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5762
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Overclocking

Mon Jul 06, 2015 6:45 pm

plugh wrote:I've tried a number of searches and can't find an answer...

Is avoid_pwm_pll applicable to RPi2?
Yes.

User avatar
expandables
Posts: 654
Joined: Fri Jun 27, 2014 7:34 pm
Location: Neverland with Michael Jackson

Re: Overclocking

Tue Jul 07, 2015 2:58 am

What's the benefits of overclocking the sd host for example

Code: Select all

dtoverlay=sdhost,overclock_50=63
By thinking like an engineer you can create a raspberry pi.
Michael Jackson enthusiast.
I got the PI model B, B+ and PI 2 model B.
When will I get the A? I don't know.

milhouse
Posts: 642
Joined: Mon Jan 16, 2012 12:59 pm

Re: Overclocking

Tue Jul 07, 2015 3:18 am

expandables wrote:What's the benefits of overclocking the sd host for example

Code: Select all

dtoverlay=sdhost,overclock_50=63
See this earlier post which benchmarks performance at different overclocks.

apoc [t.i.m.]
Posts: 1
Joined: Tue Jul 14, 2015 7:26 am

Re: Overclocking

Fri Jul 17, 2015 10:57 am

dom wrote:We use the ondemand governor by default. That and other settings can be changed in /sys/devices/system/cpu/cpu0/cpufreq/
Switching to the performance governor, or changing up_threshold and/or sampling_down_factor can tweak when turbo mode is active.
a question about this comment, I use these settings as we speak (MilhouseVH optimal CPU & IO):
echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo 100000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor

Also 'Ondemand', why not 'Performance'? I'm really curious what's the reason is not to choose for 'Performance' instead?

With kind regards (and hoping to learn something), Tim.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5762
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Overclocking

Fri Jul 17, 2015 2:16 pm

apoc [t.i.m.] wrote: Also 'Ondemand', why not 'Performance'? I'm really curious what's the reason is not to choose for 'Performance' instead?
There's not much point in the higher voltage/clock when idle.
There are minor downsides relating to temperature, power consumption and chip lifespan.
But, sure you can use performance governor if you wish.

ripednail
Posts: 9
Joined: Fri Feb 20, 2015 6:10 am

Re: Overclocking

Tue Jul 21, 2015 9:09 am

arm_freq=1050
over_voltage=4
core_freq=525
gpu_freq=350
sdram_freq=480
over_voltage_sdram_p=2
over_voltage_sdram_i=2
over_voltage_sdram_c=2
gpu_mem=256
Last edited by ripednail on Sat Apr 01, 2017 6:59 am, edited 1 time in total.

Return to “Advanced users”