Operation Manual
value of 0 allows the Pi to attempt to detect the display, while a value of 1 forces the Pi to use HDMI regardless.
• hdmi_group—Sets the HDMI group mode to CEA or DMT. You should change this setting according to the display type
you’re trying to connect, before using hdmi_mode to control the output resolution and frequency. The two possible values
are:
• 1—Sets the HDMI group to that defined by the Consumer Electronics Association of America (CEA). Use this setting
when the Pi is connected to a high-definition television (HDTV) over HDMI and use the first settings list from Appendix B,
“HDMI Display Modes”.
• 2—Sets the HDMI group to that defined by the Video Electronics Standards Association (VESA) in the Display
Monitor Timings (DMT) specification. Use this setting when the Pi is connected to a computer monitor over DVI and use
the second settings list from Appendix B, “HDMI Display Modes”.
• hdmi_safe—Forces the Pi to use a pre-set collection of HDMI settings designed to provide maximum compatibility with
displays connected to the HDMI port. Setting this to a value of 1 is the equivalent of setting hdmi_force_hotpug=1,
config_hdmi_boost=4, hdmi_group=1, hdmi_mode=1 and disable_overscan=0.
• config_hdmi_boost—Some monitors require more power on the HDMI output to operate. If your picture is covered in
snow, try increasing this value in stages from 1 (for short cables) to 7 (for long cables).
Each option in config.txt should be on its own line, with the option name followed by an equals sign (=) and then the required
value. For example, to tell the Pi to use a PAL-format analogue TV with a 4:3 aspect ratio and a 20-pixel overscan on all sides,
put the following lines into config.txt:
sdtv_mode=2
sdtv_aspect=1
overscan_left=20
overscan_right=20
overscan_top=20
overscan_bottom=20
To tell the Pi to use a DVI display through the HDMI port in the 720p60 format with no overscan at all, use the following values
instead:
hdmi_group=1
hdmi_mode=4
hdmi_drive=1
disable_overscan=1
For the changes to take effect, the Pi must be restarted. If you find that your changes have disabled the Pi’s video output on your
monitor, simply insert the SD card into another computer and either modify the config.txt file with new settings or delete it
altogether to restore the defaults.
Boot Options
The config.txt file can also be used to control how Linux is loaded on the Raspberry Pi. Although the most common method
for controlling the loading of the Linux kernel is to use a separate file called cmdline.txt (which you’ll learn about later in this
chapter), it is possible to use just config.txt. The following options control the boot process:
• disable_commandline_tags—This tells the start.elf module (discussed later in this chapter) to skip filling in memory
locations past 0x100 before loading the Linux kernel. This option should not be disabled, as doing so can cause Linux to load
incorrectly and crash.
• cmdline—The command line parameters to be passed to the Linux kernel. This can be used in place of the cmdline.txt
file, usually found in the /boot directory.
• kernel—The name of the kernel file to be loaded. This can be used as a way to load the emergency kernel (see Chapter 3,
“Troubleshooting”).
• ramfsfile—The name of the initial RAM file system (RAMFS) to be loaded. This should rarely be modified, unless you’ve
built a new initial file system with which to experiment.
• init_uart_baud—The speed of the serial console, in bits per second. The default is 115200, but lower values may improve
the connection if the Pi is used with an older hardware serial terminal.
Overclocking the Raspberry Pi
The config.txt file not only controls the graphics outputs of the Pi’s BCM2835 processor, but it also enables you to control