Operation Manual
Chapter 6: Configuring the Raspberry Pi
Because of its origins in embedded computing, the BCM2835 chip at the heart of the Raspberry Pi doesn’t have anything like a
PC’s BIOS menu where various low-level system settings can be configured. Instead, it relies on text files containing
configuration strings that are loaded by the chip when the power is switched on.
Before taking a look at the various options available in these files—config.txt, cmdline.txt and start.elf—a word of
warning: changing some of these settings away from their defaults can result in a Pi that, best case, doesn’t boot until the files are
reverted and, worst case, can physically damage the system. These potentially dangerous settings will be highlighted with
warnings in this chapter.
Hardware Settings—config.txt
The Pi’s hardware is controlled by settings contained in a file called config.txt, which is located in the /boot directory (see
Figure 6-1). This file tells the Pi how to set up its various inputs and outputs, and at what speed the BCM2835 chip and its
connected memory module should run.
Figure 6-1: The contents of the /boot directory, with config.txt highlighted
If you’re having problems with graphics output, such as the image not filling the screen or spilling over the edge, config.txt is
where you’ll be able to fix it. Normally, the file is empty or—on some distributions—simply not present; this just means that the
Pi will operate using its preset defaults. If you want to make changes and the file isn’t there, just create a new text file called
config.txt and fill in the settings you want to change.
The config.txt file can control almost all aspects of the Pi’s hardware, with the exception of the way the central processing
unit (CPU) and graphics processing unit (GPU) sections of the BCM2835 apportion the memory. You’ll learn how to alter that
split in the “Memory Partitioning—start.elf” section, later in this chapter.
The config.txt file is only read when the system first starts up. Any changes made while the Pi is running won’t take effect
until the system is restarted, or switched off and back on again. In the event that the changes are unwanted, simply deleting the
file from the /boot directory should be enough to restore the defaults once more. If the Pi won’t boot with your new settings,
just remove the SD card and delete config.txt from the boot partition on another PC, and then reinsert it into the Pi and try
again.