Raspberry Pi The Config
Raspberry Pi The Config
Raspberry Pi
Documentation
Computers
Accessories
Microcontrollers
Services
Pico C SDK
What is config.txt?
Edit this on GitHub
Any changes will only take effect after you have rebooted
your Raspberry Pi. After Linux has booted, you can view
the current active settings using the following
commands:
NOTE
File Format
The config.txt 2le is read by the early-stage boot
2rmware, so it has a very simple 2le format. The format is
a single property=value statement on each line, where
value is either an integer or a string. Comments may be
added, or existing con2g values may be commented out
and disabled, by starting a line with the # character.
Advanced Features
include
Conditional Filtering
autoboot.txt
Edit this on GitHub
boot_partition
Speci2es the partition number for booting unless the
partition number was already speci2ed as parameter to
the reboot command (e.g. sudo reboot 2).
tryboot_a_b
Set this property to 1 to load the normal config.txt and
boot.img 2les instead of tryboot.txt and
tryboot.img when the tryboot ^ag is set. This enables
the tryboot switch to be made at the partition level
rather than the 2le-level without having to modify
con2guration 2les in the A/B partitions.
Initial autoboot.txt
[all]
tryboot_a_b=1
boot_partition=2
[tryboot]
boot_partition=3
Replace autoboot.txt
swapping the boot_partition
con2guration.
Else
End if
End If
End If
Updated autoboot.txt
[all]
tryboot_a_b=1
boot_partition=3
[tryboot]
boot_partition=2
Common Options
Edit this on GitHub
disable_overscan
IMPORTANT
WARNING
camera_auto_detect
IMPORTANT
display_auto_detect
IMPORTANT
dtoverlay
dtparam
IMPORTANT
audio_pwm_mode
audio_pwm_mode=1 selects legacy low-quality analogue
audio from the 3.5mm AV jack.
NOTE
disable_audio_dither
By default, a 1.0LSB dither is applied to the audio stream
if it is routed to the analogue audio output. This can
create audible background "hiss" in some situations, for
example when the ALSA volume is set to a low level. Set
disable_audio_dither to 1 to disable dither
application.
enable_audio_dither
Audio dither (see disable_audio_dither above) is normally
disabled when the audio samples are larger than 16 bits.
Set this option to 1 to force the use of dithering for all bit
depths.
pwm_sample_bits
The pwm_sample_bits command adjusts the bit depth
of the analogue audio output. The default bit depth is 11.
Selecting bit depths below 8 will result in nonfunctional
audio, as settings below 8 result in a PLL frequency too
low to support. This is generally only useful as a
demonstration of how bit depth affects quantisation
noise.
Boot Options
Edit this on GitHub
start_file, fixup_file
These options specify the 2rmware 2les transferred to the
VideoCore GPU prior to booting.
start_x, start_debug
These provide a shortcut to some alternative
start_file and fixup_file settings, and are the
recommended methods for selecting 2rmware
con2gurations.
start_x=1 implies
start_file=start_x.elf
fixup_file=fixup_x.dat
start_debug=1 implies
start_file=start_db.elf
fixup_file=fixup_db.dat
disable_commandline_tags
Set the disable_commandline_tags command to 1 to
stop start.elf from 2lling in ATAGS (memory from
0x100) before launching the kernel.
cmdline
cmdline is the alternative 2lename on the boot partition
from which to read the kernel command line string; the
default value is cmdline.txt.
kernel
kernel is the alternative 2lename on the boot partition to
use when loading the kernel. The default value on the
Raspberry Pi 1, Zero and Zero W, and Raspberry Pi
Compute Module 1 is kernel.img. The default value on
the Raspberry Pi 2, 3, 3+ and Zero 2 W, and Raspberry Pi
Compute Modules 3 and 3+ is kernel7.img. The default
value on the Raspberry Pi 4 and 400, and Raspberry Pi
Compute Module 4 is kernel8.img, or kernel7l.img if
arm_64bit is set to 0.
arm_64bit
If set to 1, the kernel will be started in 64-bit mode.
Setting to 0 selects 32-bit mode.
NOTE
NOTE
arm_control
WARNING
armstub
armstub is the 2lename on the boot partition from which
to load the ARM stub. The default ARM stub is stored in
2rmware and is selected automatically based on the
Raspberry Pi model and various settings.
arm_peri_high
Set arm_peri_high to 1 to enable "High Peripheral"
mode on the Raspberry Pi 4. It is set automatically if a
suitable DTB is loaded.
NOTE
kernel_address
kernel_address is the memory address to which the
kernel image should be loaded. 32-bit kernels are loaded
to address 0x8000 by default, and 64-bit kernels to
address 0x200000. If kernel_old is set, kernels are
loaded to the address 0x0.
kernel_old
Set kernel_old to 1 to load the kernel to the memory
address 0x0.
ramfsfile
ramfsfile is the optional 2lename on the boot partition
of a ramfs to load.
NOTE
ramfsaddr
ramfsaddr is the memory address to which the
ramfsfile should be loaded.
initramfs
The initramfs command speci2es both the ramfs
2lename and the memory address to which to load it. It
performs the actions of both ramfsfile and ramfsaddr
in one parameter. The address can also be
followkernel (or 0) to place it in memory after the
kernel image. Example values are: initramfs
initramf.gz 0x00800000 or initramfs init.gz
followkernel. As with ramfsfile, newer 2rmwares
allow the loading of multiple 2les by comma-separating
their names.
NOTE
init_uart_baud
init_uart_baud is the initial UART baud rate. The
default value is 115200.
init_uart_clock
init_uart_clock is the initial UART clock frequency.
The default value is 48000000 (48MHz). Note that this
clock only applies to UART0 (ttyAMA0 in Linux), and that
the maximum baudrate for the UART is limited to 1/16th
of the clock. The default UART on the Raspberry Pi 3 and
Raspberry Pi Zero is UART1 (ttyS0 in Linux), and its clock
is the core VPU clock - at least 250MHz.
bootcode_delay
The bootcode_delay command delays for a given
number of seconds in bootcode.bin before loading
start.elf: the default value is 0.
boot_delay
The boot_delay command instructs to wait for a given
number of seconds in start.elf before loading the
kernel: the default value is 1. The total delay in
milliseconds is calculated as (1000 x boot_delay) +
boot_delay_ms. This can be useful if your SD card
needs a while to get ready before Linux is able to boot
from it.
boot_delay_ms
The boot_delay_ms command means wait for a given
number of milliseconds in start.elf, together with
boot_delay, before loading the kernel. The default value
is 0.
disable_poe_fan
By default, a probe on the I2C bus will happen at startup,
even when a PoE HAT is not attached. Setting this option
to 1 disables control of a PoE HAT fan through I2C (on
pins ID_SD & ID_SC). If you are not intending to use a PoE
HAT doing this is useful if you need to minimise boot