== Overclocking options The kernel has a https://www.kernel.org/doc/html/latest/admin-guide/pm/cpufreq.html[CPUFreq] driver with the powersave governor enabled by default, switched to on-demand during boot, when xref:configuration.adoc#raspi-config[raspi-config] is installed. With the on-demand governor, CPU frequency will vary with processor load. You can adjust the minimum values with the `*_min` config options, or disable dynamic clocking by applying a static scaling governor (powersave or performance) or with `force_turbo=1`. Overclocking and overvoltage will be disabled at runtime when the SoC reaches `temp_limit` (see below), which defaults to 85°C, in order to cool down the SoC. You should not hit this limit with Raspberry Pi 1 and Raspberry Pi 2, but you are more likely to with Raspberry Pi 3 and newer. Overclocking and overvoltage are also disabled when an undervoltage situation is detected. NOTE: For more information xref:raspberry-pi.adoc#frequency-management-and-thermal-control[see the section on frequency management and thermal control]. WARNING: Setting any overclocking parameters to values other than those used by xref:configuration.adoc#overclock[`raspi-config`] might set a permanent bit within the SoC. This makes it possible to detect that your Raspberry Pi was once overclocked. The overclock bit sets when `force_turbo` is set to `1` and any of the `over_voltage_*` options are set to a value of more than `0`. See the https://www.raspberrypi.com/news/introducing-turbo-mode-up-to-50-more-performance-for-free/[blog post on Turbo mode] for more information. === Overclocking [cols="1m,3"] |=== | Option | Description | arm_freq | Frequency of the Arm CPU in MHz. | arm_boost | Increases `arm_freq` to the highest supported frequency for the board-type and firmware. Set to `1` to enable. | gpu_freq | Sets `core_freq`, `h264_freq`, `isp_freq`, `v3d_freq` and `hevc_freq` together. | core_freq | Frequency of the GPU processor core in MHz. Influences CPU performance because it drives the L2 cache and memory bus; the L2 cache benefits only Raspberry Pi Zero/Raspberry Pi Zero W/Raspberry Pi 1; and there is a small benefit for SDRAM on Raspberry Pi 2 and Raspberry Pi 3. See section below for use on Raspberry Pi 4. | h264_freq | Frequency of the hardware video block in MHz; individual override of the `gpu_freq` setting. | isp_freq | Frequency of the image sensor pipeline block in MHz; individual override of the `gpu_freq` setting. | v3d_freq | Frequency of the 3D block in MHz; individual override of the `gpu_freq` setting. On Raspberry Pi 5, V3D is independent of `core_freq`, `isp_freq` and `hevc_freq`. | hevc_freq | Frequency of the High Efficiency Video Codec block in MHz; individual override of the `gpu_freq` setting. Raspberry Pi 4 only. | sdram_freq | Frequency of the SDRAM in MHz. SDRAM overclocking on Raspberry Pi 4 or newer is not supported. | over_voltage | CPU/GPU core upper voltage limit. The value should be in the range [-16,8] which equates to the range [0.95V,1.55V] ([0.8,1.4V] on Raspberry Pi 1) with 0.025V steps. In other words, specifying -16 will give 0.95V (0.8V on Raspberry Pi 1) as the maximum CPU/GPU core voltage, and specifying 8 will allow up to 1.55V (1.4V on Raspberry Pi 1). For defaults, see the table below. Values above 6 are only allowed when `force_turbo=1` is specified: this sets the warranty bit if `over_voltage_*` > `0` is also set. | over_voltage_sdram | Sets `over_voltage_sdram_c`, `over_voltage_sdram_i`, and `over_voltage_sdram_p` together. | over_voltage_sdram_c | SDRAM controller voltage adjustment. [-16,8] equates to [0.8V,1.4V] with 0.025V steps. Not supported on Raspberry Pi 4 or later devices. | over_voltage_sdram_i | SDRAM I/O voltage adjustment. [-16,8] equates to [0.8V,1.4V] with 0.025V steps. Not supported on Raspberry Pi 4 or later devices. | over_voltage_sdram_p | SDRAM phy voltage adjustment. [-16,8] equates to [0.8V,1.4V] with 0.025V steps. Not supported on Raspberry Pi 4 or later devices. | force_turbo | Forces turbo mode frequencies even when the Arm cores are not busy. Enabling this might set the warranty bit if `over_voltage_*` is also set. | initial_turbo | Enables https://forums.raspberrypi.com/viewtopic.php?f=29&t=6201&start=425#p180099[turbo mode from boot] for the given value in seconds, or until `cpufreq` sets a frequency. The maximum value is `60`. The November 2024 firmware update made the following changes: * changed the default from `0` to `60` to reduce boot time * switched the kernel CPU performance governor from `powersave` to `ondemand` | arm_freq_min | Minimum value of `arm_freq` used for dynamic frequency clocking. Note that reducing this value below the default does not result in any significant power savings, and is not currently supported. | core_freq_min | Minimum value of `core_freq` used for dynamic frequency clocking. | gpu_freq_min | Minimum value of `gpu_freq` used for dynamic frequency clocking. | h264_freq_min | Minimum value of `h264_freq` used for dynamic frequency clocking. | isp_freq_min | Minimum value of `isp_freq` used for dynamic frequency clocking. | v3d_freq_min | Minimum value of `v3d_freq` used for dynamic frequency clocking. | hevc_freq_min | Minimum value of `hevc_freq` used for dynamic frequency clocking. | sdram_freq_min | Minimum value of `sdram_freq` used for dynamic frequency clocking. | over_voltage_min | Minimum value of `over_voltage` used for dynamic frequency clocking. The value should be in the range [-16,8] which equates to the range [0.8V,1.4V] with 0.025V steps. In other words, specifying -16 will give 0.8V as the CPU/GPU core idle voltage, and specifying 8 will give a minimum of 1.4V. This setting is deprecated on Raspberry Pi 4 and Raspberry Pi 5. | over_voltage_delta | On Raspberry Pi 4 and Raspberry Pi 5 the over_voltage_delta parameter adds the given offset in microvolts to the number calculated by the DVFS algorithm. | temp_limit | Overheat protection. This sets the clocks and voltages to default when the SoC reaches this value in degree Celsius. Values over 85 are clamped to 85. | temp_soft_limit | *3A+/3B+ only*. CPU speed throttle control. This sets the temperature at which the CPU clock speed throttling system activates. At this temperature, the clock speed is reduced from 1400 MHz to 1200 MHz. Defaults to `60`, can be raised to a maximum of `70`, but this might cause instability. | core_freq_fixed | Setting to 1 disables active scaling of the core clock frequency and ensures that any peripherals that use the core clock will maintain a consistent speed. The fixed clock speed is the higher/turbo frequency for the platform in use. Use this in preference to setting specific core_clock frequencies as it provides portability of config files between platforms. |=== This table gives the default values for the options on various Raspberry Pi models, all frequencies are stated in MHz. [cols="m,^,^,^,^,^,^,^,^,^,^"] |=== | Option | Pi Zero W | Pi 1 | Pi 2 | Pi 3 | Pi 3A+/Pi 3B+ | CM4 & Pi 4B <= R1.3 | Pi 4B R1.4 | Pi 400 | Pi Zero 2 W | Pi 5/500/500+ | arm_freq | 1000 | 700 | 900 | 1200 | 1400 | 1500 | 1500 or 1800 if `arm_boost`=1 | 1800 | 1000 | 2400 | core_freq | 400 | 250 | 250 | 400 | 400 | 500 | 500 | 500 | 400 | 910 | h264_freq | 300 | 250 | 250 | 400 | 400 | 500 | 500 | 500 | 300 | N/A | isp_freq | 300 | 250 | 250 | 400 | 400 | 500 | 500 | 500 | 300 | 910 | v3d_freq | 300 | 250 | 250 | 400 | 400 | 500 | 500 | 500 | 300 | 960 | hevc_freq | N/A | N/A | N/A | N/A | N/A | 500 | 500 | 500 | N/A | 910 | sdram_freq | 450 | 400 | 450 | 450 | 500 | 3200 | 3200 | 3200 | 450 | 4267 | arm_freq_min | 700 | 700 | 600 | 600 | 600 | 600 | 600 | 600 | 600 | 1500 | core_freq_min | 250 | 250 | 250 | 250 | 250 | 200 | 200 | 200 | 250 | 500 | gpu_freq_min | 250 | 250 | 250 | 250 | 250 | 250 | 250 | 250 | 250 | 500 | h264_freq_min | 250 | 250 | 250 | 250 | 250 | 250 | 250 | 250 | 250 | N/A | isp_freq_min | 250 | 250 | 250 | 250 | 250 | 250 | 250 | 250 | 250 | 500 | v3d_freq_min | 250 | 250 | 250 | 250 | 250 | 250 | 250 | 250 | 250 | 500 | sdram_freq_min | 400 | 400 | 400 | 400 | 400 | 3200 | 3200 | 3200 | 400 | 4267 |=== This table gives defaults for options which are the same across all models. [cols="m,^"] |=== | Option | Default | initial_turbo | 0 (seconds) | temp_limit | 85 (°C) | over_voltage | 0 (1.35V, 1.2V on Raspberry Pi 1) | over_voltage_min | 0 (1.2V) | over_voltage_sdram | 0 (1.2V) | over_voltage_sdram_c | 0 (1.2V) | over_voltage_sdram_i | 0 (1.2V) | over_voltage_sdram_p | 0 (1.2V) |=== The firmware uses Adaptive Voltage Scaling (AVS) to determine the optimum CPU/GPU core voltage in the range defined by `over_voltage` and `over_voltage_min`. [discrete] ==== Specific to Raspberry Pi 4, Raspberry Pi 400 and CM4 The minimum core frequency when the system is idle must be fast enough to support the highest pixel clock (ignoring blanking) of the display(s). Consequently, `core_freq` will be boosted above 500 MHz if the display mode is 4Kp60. |=== | Display option | Max `core_freq` | Default | 500 | `hdmi_enable_4kp60` | 550 |=== NOTE: There is no need to use `hdmi_enable_4kp60` on Flagship models since Raspberry Pi 5, Compute Modules since CM5, and Keyboard models since Pi 500; they support dual-4Kp60 displays by default. * Overclocking requires the latest firmware release. * The latest firmware automatically scales up the voltage if the system is overclocked. Manually setting `over_voltage` disables automatic voltage scaling for overclocking. * It is recommended when overclocking to use the individual frequency settings (`isp_freq`, `v3d_freq` etc) rather than `gpu_freq`, because the maximum stable frequency will be different for ISP, V3D, HEVC etc. * The SDRAM frequency is not configurable on Raspberry Pi 4 or later devices. ==== `force_turbo` By default (`force_turbo=0`) the on-demand CPU frequency driver will raise clocks to their maximum frequencies when the Arm cores are busy, and will lower them to the minimum frequencies when the Arm cores are idle. `force_turbo=1` overrides this behaviour and forces maximum frequencies even when the Arm cores are not busy. === Clocks relationship ==== Raspberry Pi 4 The GPU core, CPU, SDRAM and GPU each have their own PLLs and can have unrelated frequencies. The h264, v3d and ISP blocks share a PLL. To view the Raspberry Pi device's current frequency in KHz, type: `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq`. Divide the result by 1000 to find the value in MHz. Note that this frequency is the kernel _requested_ frequency, and it is possible that any throttling (for example at high temperatures) might mean the CPU is actually running more slowly than reported. An instantaneous measurement of the actual Arm CPU frequency can be retrieved using the vcgencmd `vcgencmd measure_clock arm`. This is displayed in Hertz. === Monitoring core temperature [.whitepaper, title="Cooling a Raspberry Pi device", subtitle="", link=https://pip.raspberrypi.com/documents/RP-003608-WP] **** This white paper goes through the reasons why your Raspberry Pi might get hot and why you might want to cool it back down, offering options on the cooling process. **** To view the temperature of a Raspberry Pi, run the following command: [source,console] ---- $ cat /sys/class/thermal/thermal_zone0/temp ---- Divide the result by 1000 to find the value in degrees Celsius. Alternatively, you can use `vcgencmd measure_temp` to report the GPU temperature. Hitting the temperature limit is not harmful to the SoC, but it will cause the CPU to throttle. A heatsink can help to control the core temperature, and therefore performance. This is especially useful if the Raspberry Pi is running inside a case. Airflow over the heatsink makes cooling more efficient. When the core temperature is between 80°C and 85°C, the Arm cores will be throttled back. If the temperature exceeds 85°C, the Arm cores and the GPU will be throttled back. For the Raspberry Pi 3 Model B+, the PCB technology has been changed to provide better heat dissipation and increased thermal mass. In addition, a soft temperature limit has been introduced, with the goal of maximising the time for which a device can "sprint" before reaching the hard limit at 85°C. When the soft limit is reached, the clock speed is reduced from 1.4 GHz to 1.2 GHz, and the operating voltage is reduced slightly. This reduces the rate of temperature increase: we trade a short period at 1.4 GHz for a longer period at 1.2 GHz. By default, the soft limit is 60°C. This can be changed by the `temp_soft_limit` setting in `config.txt`. === Monitoring voltage It is essential to keep the supply voltage above 4.8 V for reliable performance. Note that the voltage from some USB chargers/power supplies can fall as low as 4.2 V. This is because they are usually designed to charge a 3.7 V LiPo battery, not to supply 5 V to a computer. To monitor the Raspberry Pi device's PSU voltage, you will need to use a multimeter to measure between the VCC and GND pins on the GPIO. More information is available in the xref:raspberry-pi.adoc#power-supply[power] section of the documentation. If the voltage drops below 4.63 V (±5%), the Arm cores and the GPU are throttled back, and a message indicating the low voltage state is added to the kernel log. The Raspberry Pi 5 PMIC has built in ADCs that allow the supply voltage to be measured. To view the current supply voltage, run the following command: [source,console] ---- $ vcgencmd pmic_read_adc EXT5V_V ---- === Overclocking problems Most overclocking issues show up immediately, when the device fails to boot. If your device fails to boot due to an overclocking configuration change, use the following steps to return your device to a bootable state: . Remove any clock frequency overrides from `config.txt`. . Increase the core voltage using `over_voltage_delta`. . Re-apply overclocking parameters, taking care to avoid the previous known-bad overclocking parameters.