Original link: http://elinux.org/RPi_config.txt
Since the Raspberry Pi does not have a BIOS in the traditional sense, various system configuration parameters are usually stored in the text file "config.txt".
The config.txt file of the Raspberry Pi will be read by the GPU before the ARM core is initialized.
This file is stored on the boot partition. For Linux, the path is usually /boot/config.txt, if it is Windows (or OS X), it will be recognized as a normal file in the accessible part of the SD card.
If you want to edit the configuration file, please see the introduction to edit the Raspberry Pi configuration file .
You can use the following commands to get the currently active settings:
vcgencmd get_config <config> - 列出指定的配置参数. 例如: vcgencmd get_config arm_freq
vcgencmd get_config int - 列出所有已设置的整形配置参数(非零)
vcgencmd get_config str - 列出所有已设置的字符型配置参数(非零)
file format
When the value is integer, the format is "attribute=value". Only one parameter is specified per line. The comment uses the'#' hash sign as the beginning of the line.
Note: In the new version of Raspberry Pi, each line has # comment. To use this line of parameters, just remove #.
Below is the sample file
# Set stdv mode to PAL (as used in Europe) sdtv_mode=2
# Force the monitor to HDMI mode so that sound will be sent over HDMI cable
hdmi_drive=2
# Set monitor mode to DMT
hdmi_group=2
# Set monitor resolution to 1024x768 XGA 60Hz (HDMI_DMT_XGA_60)
hdmi_mode=16
# Make display smaller to stop text spilling off the screen
overscan_left=20
overscan_right=12
overscan_top=10
overscan_bottom=10
This is another sample file that contains extended documentation for various functions.
RAM
disable_l2cache prohibits ARM from accessing the GPU's second-level cache. Correspondingly, you need to turn off the second-level cache in the kernel. The default is 0
gpu_mem GPU memory is in megabytes. Set the memory allocation between ARM and GPU. ARM will get all the remaining memory. The minimum is set to 16. The default is 64
gpu_mem_256 is for the GPU memory setting of the Raspberry Pi with 256MB of memory. Please ignore the 512MB of Pi. It will overwrite gpu_mem. The maximum is set to 192. The default is not set
gpu_mem_512 is for the GPU memory setting of the Raspberry Pi with 512MB of memory. Please ignore the 256MB of Pi. It will overwrite gpu_mem. The maximum is set to 448. The default is not set
disable_pvt prohibits adjusting the RAM refresh rate (RAM temperature measurement) every 500 milliseconds.
CMA-Dynamic Memory Allocation
Since November 19, 2012, the firmware and kernel support CMA, which means that the memory allocation between ARM and GPU can be dynamically managed at runtime. Here is an example of related config.txt .
cma_lwm When the GPU available memory is lower than the value set by cma_lwm, it will request some memory from ARM.
cma_hwm When the GPU available memory is higher than the value set by cma_hwm, some memory will be released to ARM.
To enable CMA, the following parameters need to be added to the cmdline.txt file:
coherent_pool=6M smsc95xx.turbo_mode=N
video
Video mode options
sdtv_mode sets the video format for composite signal output (default is 0)
sdtv_mode=0 NTSC
sdtv_mode=1 日本版NTSC – 无基座
sdtv_mode=2 PAL
sdtv_mode=3 巴西版PAL – 副载波为525/60而不是625/50
sdtv_aspect sets the aspect ratio for composite signal output (default is 1)
sdtv_aspect=1 4:3
sdtv_aspect=2 14:9
sdtv_aspect=3 16:9
sdtv_disable_colourburst disables the composite signal output color subcarrier group. The picture will be displayed in monochrome, but it may be clearer
sdtv_disable_colourburst=1 禁止输出彩色副载波群
hdmi_safe uses the "safe mode" setting to try to boot with HDMI maximum compatibility. This has the same meaning as the following combination: hdmi_force_hotplug=1, config_hdmi_boost=4, hdmi_group=2, hdmi_mode=4, disable_overscan=0
hdmi_safe=1
hdmi_ignore_edid If your monitor is a junk product made by China, allow the system to ignore the EDID display data
hdmi_ignore_edid=0xa5000080
When hdmi_edid_file is set to 1, EDID data will be read from the edid.dat file, not from the display. [1]
hdmi_edid_file=1
hdmi_force_edid_audio pretends to support all audio format playback, even if the report does not support it, it is allowed to pass DTS/AC3.
hdmi_force_edid_audio=1
hdmi_force_edid_3d pretends that all CEA modes support 3D, even if EDID does not support it.
hdmi_force_edid_3d=1
avoid_edid_fuzzy_match prohibits de-fuzzy matching of the mode described in EDID. Even if the mask is wrong, the standard mode that matches the resolution and the closest frame rate is selected.
avoid_edid_fuzzy_match=1
hdmi_ignore_cec_init does not send the initialization activation source message. Avoid making (Enable CEC) TV to end standby and switch channels when restarting.
hdmi_ignore_cec_init=1
hdmi_ignore_cec pretends that TV does not support CEC. It will not support any CEC functions.
hdmi_ignore_cec=1
hdmi_force_hotplug disguised as an HDMI hot plug signal is detected, and the HDMI display is connected
hdmi_force_hotplug=1 即便没有检测到HDMI显示器也要使用HDMI模式
hdmi_ignore_hotplug disguised as HDMI hot plug signal is not detected, it appears that the HDMI display is not connected
hdmi_ignore_hotplug=1 即便检测到HDMI显示器也要使用混合模式
hdmi_pixel_encoding forces the pixel encoding mode. By default, the mode requested by EDID is used, so no modification is required.
hdmi_pixel_encoding=0 default (limited for CEA, full for DMT)
hdmi_pixel_encoding=1 RGB limited (16-235)
hdmi_pixel_encoding=2 RGB full ( 0-255)
hdmi_pixel_encoding=3 YCbCr limited (16-235)
hdmi_pixel_encoding=4 YCbCr limited ( 0-255)
hdmi_drive select HDMI or DVI mode
hdmi_drive=1 DVI模式 (没声音)
hdmi_drive=2 HDMI模式 (如果支持并已启用将有声音输出)
hdmi_group set HDMI type
If no group is specified, or set to 0, the preferred group reported by EDID will be used.
hdmi_group=1 CEA
hdmi_group=2 DMT
hdmi_mode sets the screen resolution in CEA or DMT format
当hdmi_group=1 (CEA)时,下列值有效
hdmi_mode=1 VGA
hdmi_mode=2 480p 60Hz
hdmi_mode=3 480p 60Hz H
hdmi_mode=4 720p 60Hz
hdmi_mode=5 1080i 60Hz
hdmi_mode=6 480i 60Hz
hdmi_mode=7 480i 60Hz H
hdmi_mode=8 240p 60Hz
hdmi_mode=9 240p 60Hz H
hdmi_mode=10 480i 60Hz 4x
hdmi_mode=11 480i 60Hz 4x H
hdmi_mode=12 240p 60Hz 4x
hdmi_mode=13 240p 60Hz 4x H
hdmi_mode=14 480p 60Hz 2x
hdmi_mode=15 480p 60Hz 2x H
hdmi_mode=16 1080p 60Hz
hdmi_mode=17 576p 50Hz
hdmi_mode=18 576p 50Hz H
hdmi_mode=19 720p 50Hz
hdmi_mode=20 1080i 50Hz
hdmi_mode=21 576i 50Hz
hdmi_mode=22 576i 50Hz H
hdmi_mode=23 288p 50Hz
hdmi_mode=24 288p 50Hz H
hdmi_mode=25 576i 50Hz 4x
hdmi_mode=26 576i 50Hz 4x H
hdmi_mode=27 288p 50Hz 4x
hdmi_mode=28 288p 50Hz 4x H
hdmi_mode=29 576p 50Hz 2x
hdmi_mode=30 576p 50Hz 2x H
hdmi_mode=31 1080p 50Hz
hdmi_mode=32 1080p 24Hz
hdmi_mode=33 1080p 25Hz
hdmi_mode=34 1080p 30Hz
hdmi_mode=35 480p 60Hz 4x
hdmi_mode=36 480p 60Hz 4xH
hdmi_mode=37 576p 50Hz 4x
hdmi_mode=38 576p 50Hz 4x H
hdmi_mode=39 1080i 50Hz reduced blanking
hdmi_mode=40 1080i 100Hz
hdmi_mode=41 720p 100Hz
hdmi_mode=42 576p 100Hz
hdmi_mode=43 576p 100Hz H
hdmi_mode=44 576i 100Hz
hdmi_mode=45 576i 100Hz H
hdmi_mode=46 1080i 120Hz
hdmi_mode=47 720p 120Hz
hdmi_mode=48 480p 120Hz
hdmi_mode=49 480p 120Hz H
hdmi_mode=50 480i 120Hz
hdmi_mode=51 480i 120Hz H
hdmi_mode=52 576p 200Hz
hdmi_mode=53 576p 200Hz H
hdmi_mode=54 576i 200Hz
hdmi_mode=55 576i 200Hz H
hdmi_mode=56 480p 240Hz
hdmi_mode=57 480p 240Hz H
hdmi_mode=58 480i 240Hz
hdmi_mode=59 480i 240Hz H
H表示16:9比例(正常是4:3).
2x表示双倍像素(即更高的像素时脉, 每个像素重复两次)
4x表示四倍像素(即更高的像素时脉, 每个像素重复四次)
当hdmi_group=2 (DMT)时,下列值有效
警告: 根据这篇帖子所述
像素时脉是有限制的, 最高支持的模式是1920x1200 @60Hz with reduced blanking.
hdmi_mode=1 640x350 85Hz
hdmi_mode=2 640x400 85Hz
hdmi_mode=3 720x400 85Hz
hdmi_mode=4 640x480 60Hz
hdmi_mode=5 640x480 72Hz
hdmi_mode=6 640x480 75Hz
hdmi_mode=7 640x480 85Hz
hdmi_mode=8 800x600 56Hz
hdmi_mode=9 800x600 60Hz
hdmi_mode=10 800x600 72Hz
hdmi_mode=11 800x600 75Hz
hdmi_mode=12 800x600 85Hz
hdmi_mode=13 800x600 120Hz
hdmi_mode=14 848x480 60Hz
hdmi_mode=15 1024x768 43Hz DO NOT USE
hdmi_mode=16 1024x768 60Hz
hdmi_mode=17 1024x768 70Hz
hdmi_mode=18 1024x768 75Hz
hdmi_mode=19 1024x768 85Hz
hdmi_mode=20 1024x768 120Hz
hdmi_mode=21 1152x864 75Hz
hdmi_mode=22 1280x768 reduced blanking
hdmi_mode=23 1280x768 60Hz
hdmi_mode=24 1280x768 75Hz
hdmi_mode=25 1280x768 85Hz
hdmi_mode=26 1280x768 120Hz reduced blanking
hdmi_mode=27 1280x800 reduced blanking
hdmi_mode=28 1280x800 60Hz
hdmi_mode=29 1280x800 75Hz
hdmi_mode=30 1280x800 85Hz
hdmi_mode=31 1280x800 120Hz reduced blanking
hdmi_mode=32 1280x960 60Hz
hdmi_mode=33 1280x960 85Hz
hdmi_mode=34 1280x960 120Hz reduced blanking
hdmi_mode=35 1280x1024 60Hz
hdmi_mode=36 1280x1024 75Hz
hdmi_mode=37 1280x1024 85Hz
hdmi_mode=38 1280x1024 120Hz reduced blanking
hdmi_mode=39 1360x768 60Hz
hdmi_mode=40 1360x768 120Hz reduced blanking
hdmi_mode=41 1400x1050 reduced blanking
hdmi_mode=42 1400x1050 60Hz
hdmi_mode=43 1400x1050 75Hz
hdmi_mode=44 1400x1050 85Hz
hdmi_mode=45 1400x1050 120Hz reduced blanking
hdmi_mode=46 1440x900 reduced blanking
hdmi_mode=47 1440x900 60Hz
hdmi_mode=48 1440x900 75Hz
hdmi_mode=49 1440x900 85Hz
hdmi_mode=50 1440x900 120Hz reduced blanking
hdmi_mode=51 1600x1200 60Hz
hdmi_mode=52 1600x1200 65Hz
hdmi_mode=53 1600x1200 70Hz
hdmi_mode=54 1600x1200 75Hz
hdmi_mode=55 1600x1200 85Hz
hdmi_mode=56 1600x1200 120Hz reduced blanking
hdmi_mode=57 1680x1050 reduced blanking
hdmi_mode=58 1680x1050 60Hz
hdmi_mode=59 1680x1050 75Hz
hdmi_mode=60 1680x1050 85Hz
hdmi_mode=61 1680x1050 120Hz reduced blanking
hdmi_mode=62 1792x1344 60Hz
hdmi_mode=63 1792x1344 75Hz
hdmi_mode=64 1792x1344 120Hz reduced blanking
hdmi_mode=65 1856x1392 60Hz
hdmi_mode=66 1856x1392 75Hz
hdmi_mode=67 1856x1392 120Hz reduced blanking
hdmi_mode=68 1920x1200 reduced blanking
hdmi_mode=69 1920x1200 60Hz
hdmi_mode=70 1920x1200 75Hz
hdmi_mode=71 1920x1200 85Hz
hdmi_mode=72 1920x1200 120Hz reduced blanking
hdmi_mode=73 1920x1440 60Hz
hdmi_mode=74 1920x1440 75Hz
hdmi_mode=75 1920x1440 120Hz reduced blanking
hdmi_mode=76 2560x1600 reduced blanking
hdmi_mode=77 2560x1600 60Hz
hdmi_mode=78 2560x1600 75Hz
hdmi_mode=79 2560x1600 85Hz
hdmi_mode=80 2560x1600 120Hz reduced blanking
hdmi_mode=81 1366x768 60Hz
hdmi_mode=82 1080p 60Hz
hdmi_mode=83 1600x900 reduced blanking
hdmi_mode=84 2048x1152 reduced blanking
hdmi_mode=85 720p 60Hz
hdmi_mode=86 1366x768 reduced blanking
overscan_left the number of skipped pixels on the left
The number of skipped pixels on the right of overscan_right
overscan_top the number of skipped pixels at the top
overscan_bottom the number of skipped pixels at the bottom
framebuffer_width The width of the console framebuffer, in pixels. The default is the display width minus the overscan.
framebuffer_height The height of the console framebuffer, in pixels. The default is the display height minus the overscan.
framebuffer_depth The depth of the console framebuffer, in bits. The default is 16 bits. 8 bits are also valid, but the default RGB palette will make the screen unreadable. 24-bit is better, but it was found on June 15, 2012. Confusion problem. There is no confusion problem in 32-bit, but you need to set framebuffer_ignore_alpha=1, and the color display error was found on June 15, 2012.
Framebuffer_ignore_alpha is set to 1 to disable the alpha channel. Only valid for 32 bits.
test_mode allows sound and image testing at startup.
Set disable_overscan to 1 to disable overscan.
config_hdmi_boost sets the signal strength of the HDMI interface. The default is 0. If you have HDMI interference problems, you can try to set it to 4. The maximum is 7.
display_rotate rotates the screen clockwise (default is 0) or flips the display.
display_rotate=0 正常
display_rotate=1 90度
display_rotate=2 180度
display_rotate=3 270度
display_rotate=0x10000 水平翻转
display_rotate=0x20000 垂直翻转
Note: Rotating 90 degrees or 270 degrees requires additional GPU memory, so the rotation will be invalid when the GPU is only allocated to 16M. Possible reasons:
- Crashes my RPI before Linux boots if set to "1" -- REW 20120913.
Which values are valid for my monitor?
Your HDMI display may only support some settings. To find out which settings are supported, you can use the following method.
- Set the output format to VGA 60Hz (hdmi_group=1 hdmi_mode=1) and start the Raspberry Pi
- Enter the following command to get a list of CEA support modes
/opt/vc/bin/tvservice -m CEA
- Enter the following command to get a list of DMT support modes
/opt/vc/bin/tvservice -m DMT
- Enter the following command to get the current setting status
/opt/vc/bin/tvservice -s
- Enter the following commands to get more detailed information from the display
/opt/vc/bin/tvservice -d edid.dat /opt/vc/bin/edidparser edid.dat
When using the default HDMI mode to troubleshoot problems, the edid.dat file will also provide information
Licensed decoder
You can purchase a certificate bound to the serial number of the Raspberry Pi CPU to use an additional hardware decoder.
decode_MPG2 can open the serial number of MPEG-2 hard decoding.
decode_MPG2=0x12345678
decode_WVC1 can open the serial number of VC-1 hard decoding.
decode_WVC1=0x12345678
The serial number of the SD card can be shared among multiple Raspberry Pis. Up to 8 certificates at the same time.
decode_XXXX=0x12345678,0xabcdabcd,0x87654321,...
start up
disable_commandline_tags prevents start.elf by overwriting ATAGS (memory at 0x100) before starting the kernel
cmdline (string) command line parameter. Can be used instead of cmdline.txt file
kernel (string) Load the kernel image file with the specified name to start the kernel. The default is "kernel.img"
kernel_address loads the kernel.img file address
When kernel_old (bool) is 1, load the kernel from 0x0
ramfsfile (string) The ramfs file to be loaded
The address of the ramfs file to be loaded by ramfsaddr
initramfs (string address) The ramfs file to be loaded and its address (that is, ramfsfile+ramfsaddr is merged into one).
Note: This uses a different syntax from other items-do not use the "=" sign here. Correct example:
initramfs initramf.gz 0x00800000
device_tree_address loads the address of device_tree
init_uart_baud initialize uart baud rate. The default is 115200
init_uart_clock initializes uart timing. The default is 3000000 (3Mhz)
init_emmc_clock initialize emmc timing. The default is 100000000 (100MHz)
boot_delay waits for the specified seconds in start.elf before loading the kernel. Total delay = 1000 * boot_delay + boot_delay_ms. The default is 1
boot_delay_ms waits for the specified milliseconds in start.elf before loading the kernel. The default is 0
If avoid_safe_mode is set to 1, it will not boot in safe mode . The default is 0
Overclocking
Note: Setting any parameters to overclock the Raspberry Pi will permanently store a warranty bit in the chip to detect whether your Raspberry Pi has been overclocked. If the device is overclocked, the warranty will be invalid. Since September 19, 2012, You can overclock freely without affecting the warranty. [2]
The latest kernel has a cpu frequency kernel driver with the "ondemand" governor turned on by default . There will be no effect if overclocking is not turned on. Once you turn on overclocking, the ARM frequency will vary with the processor load. Only required by the governor The non-default value will only be used when it is not. You can use the *_min configuration option to adjust the minimum value, or use force_turbo=1 to disable dynamic overclocking. [3]
When the chip temperature reaches 85°C, the overclocking and overpressure will be turned off until it cools down. Even if the highest setting is used at an ambient temperature of 25°C, don't let the temperature reach the limit. [4]
Overclocking options
parameter | Description |
---|---|
arm_freq | ARM frequency, in MHz. The default is 700 |
gpu_freq | Also set core_freq, h264_freq, isp_freq, v3d_freq. The default is 250 |
core_freq | GPU processor core frequency, in MHz. Since the GPU needs to drive the second-level cache, it will affect the performance of the ARM. The default is 250 |
h264_freq | Video hardware decoding module frequency, in MHz. The default is 250 |
isp_freq | Image sensor pipeline module frequency, in MHz. The default is 250 |
v3d_freq | 3D module frequency, in MHz. The default is 250 |
avoid_pwm_pll | Do not use PLL for PWM audio. This will slightly reduce the effect of analog audio. Idle PLL allows core_freq to be set independently from the remaining GPU, which will have more permissions than overclocking. The default is 0 |
sdram_freq | SDRAM frequency in MHz. The default is 400 |
over_voltage | ARM/GPU core voltage adjustment. [-16,8] 0.025V step is equivalent to [0.8V,1.4V]. The default is 0 (1.2V). Only when force_turbo or current_limit_override is specified (warranty bit will be set), Only allow values above 6 |
over_voltage_sdram | 同时设置over_voltage_sdram_c, over_voltage_sdram_i, over_voltage_sdram_p |
over_voltage_sdram_c | SDRAM controller voltage adjustment. [-16,8] 0.025V step is equivalent to [0.8V,1.4V]. The default is 0 (1.2V) |
over_voltage_sdram_i | SDRAM I/O voltage adjustment. [-16,8] Steps of 0.025V are equivalent to [0.8V,1.4V]. The default is 0 (1.2V) |
over_voltage_sdram_p | SDRAM phy voltage adjustment. [-16,8] 0.025V step is equivalent to [0.8V,1.4V]. The default is 0 (1.2V) |
force_turbo | Turn off the dynamic CPU frequency drive and the minimum settings below. Turn on h264/v3d/isp overclocking. The default is 0. The warranty bit will be set. |
initial_turbo | Start the fast mode with a specified number of seconds (upper limit is 60) or CPU frequency at startup. If you have overclocked, it can improve the SD card error problem. The default is 0 [5] |
arm_freq_min | Set the minimum arm_freq for dynamic timing. The default is 700 |
core_freq_min | Set the minimum core_freq for dynamic timing. The default is 250 |
sdram_freq_min | Set the minimum sdram_freq for dynamic timing. The default is 400 |
over_voltage_min | Set the minimum over_voltage of the dynamic sequence. The default is 0 |
temp_limit | Overheat protection. When the chip reaches the specified temperature, the timing and power switch will default to the default value. Setting this value higher than the default value will affect the warranty. The default is 85 |
current_limit_override | When set to "0x5A000020", SMPS current limiting protection is disabled. Setting this will help when overclocking is too high and cannot be restarted. Warranty bit will be set. [6] |
force_turbo mode
force_turbo=0
Turn on the dynamic timing and voltage of the ARM core, GPU core and SDRAM. The ARM frequency will increase to "arm_freq" when it is busy and decrease to "arm_freq_min" when it is idle. "core_freq", "sdram_freq" and "over_voltage" The behavior is the same. "over_voltage" is up to 6 (1.35V). The non-default value of the h264/v3d/isp part will be ignored.
force_turbo=1
Turn off dynamic timing, so all frequencies and voltages will remain high. The overclocking of the h264/v3d/isp GPU part will also be turned on, which is equivalent to setting "over_voltage" to 8 (1.4V). [7]
Temporal relationship
The GPU core, h264, v3d and isp share a phase-locked loop, so the associated frequency is required. ARM, SDRAM and GPU have their own unique phase-locked loops, so they can be set to unrelated frequencies. [8]
When "avoid_pwm_pll=1" is set, the following settings are unnecessary.
pll_freq = floor(2400 / (2 * core_freq)) * (2 * core_freq)
gpu_freq = pll_freq / [偶数]
Valid gpu_freq will be automatically rounded to the nearest integer even number, so request core_freq is 500, gpu_freq is 300, and calculate 2000/300 = 6.666 => 6, the result is 333.33MHz.
Tested overclocking settings
The following table shows some successful overclocking attempts, which can guide you in overclocking. These settings may not be successful on every Raspberry Pi, and will shorten the life of the Qualcomm chip.
arm_freq | gpu_freq | core_freq | h264_freq | isp_freq | v3d_freq | sdram_freq | over_voltage | over_voltage_sdram |
---|---|---|---|---|---|---|---|---|
800 | ||||||||
900 | 275 | 500 | ||||||
900 | 450 | 450 | ||||||
930 | 350 | 500 | ||||||
1000 | 500 | 500 | 6 | |||||
1050 | 6 | |||||||
1150 | 500 | 600 | 8 |
This is a report showing that Hynix RAM does not perform as well as Samsung RAM in overclocking .
SD card use when overclocking
设置SD卡: http://elinux.org/RPi_Easy_SD_Card_Setup
超频时使用6速或10速的SD卡(SHDC/SHDX)会导致在一些天后树莓派读取SD卡文件系统不稳定.
不管是ext4 , NTFS 或其他格式都一样.
不管是哪家SD卡生产商都一样.
不管是哪个版本的树莓派都一样.
这与SD卡容量无关 - 实际验证出现在16G或更大的SD卡上.
! 关键是你何时让树莓派功率不足,也就是低于树莓派的基本设置需求 !
popcornmix发表在https://github.com/raspberrypi/linux/issues/280:
"超频会导致SD卡错误.这情况往往是与板子相关(就是说有些树莓派超频后SD卡没事,有些不行).
我认为通常都是core_freq导致的SD卡问题(和arm_freq,sdram_freq比)"
在2013年4月写这个提示的时候在树莓派官方论坛上一共有137个有关于SD的问题, 绝大部分与超频有关.
如果你使用6速或10速SD卡, 还想要树莓派稳定运行: 不要尝试超频,否则很可能会丢失数据
Monitor temperature and voltage
To detect the temperature of the Raspberry Pi, see: /sys/class/thermal/thermal_zone0/temp
To detect the current frequency of the Raspberry Pi, see: /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
To detect the Raspberry Pi For the voltage of the power supply device, you need a multimeter, connect the power test point, or an extension head.
Generally speaking, the core temperature should be kept below 70 degrees and the voltage should be higher than 4.8V. (In addition, please note that don’t use that cheap USB power supply, which is basically 4.2V, because it is originally intended to charge 3.7V. The lithium battery is designed to provide a stable 5V voltage for the Raspberry Pi at all). In addition, it is also a good idea to use a heat sink, especially if you install the Raspberry Pi in the case. A suitable heat sink does not come with it. 14x14x10 mm heat sink in the form of a dry glue grid.
Overclocking stability test
Most overclocking problems will cause startup problems immediately, but file system problems will still occur over time. This is a script to stress test the system, especially the SD card. If the script is executed, dmesg will not prompt any errors. The overclocking settings you make may be more stable.
If the system crashes, hold down the shift key when restarting , this will temporarily disable all overclocking. Also, note that SD card problems are usually caused by core_freq. Do not set the high speed (950 MHz) and overspeed (1 GHz) preset by raspi-config ) Is a big jump (from 250 MHz to 500 MHz).
#!/bin/bash
#Simple stress test for system. If it survives this, it's probably stable.
#Free software, GPL2+
echo "Testing overclock stability..."
#Max out the CPU in the background (one core). Heats it up, loads the power-supply.
nice yes >/dev/null &
#Read the entire SD card 10x. Tests RAM and I/O
for i in `seq 1 10`; do echo reading: $i; sudo dd if=/dev/mmcblk0 of=/dev/null bs=4M; done
#Writes 512 MB test file, 10x.
for i in `seq 1 10`; do echo writing: $i; dd if=/dev/zero of=deleteme.dat bs=1M count=512; sync; done
#Clean up
killall yes
rm deleteme.dat
#Print summary. Anything nasty will appear in dmesg.
echo -n "CPU freq: " ; cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
echo -n "CPU temp: " ; cat /sys/class/thermal/thermal_zone0/temp
dmesg | tail
echo "Not crashed yet, probably stable."