category: RaspberryPi <div id="toc_heading"></div><div id="toc"></div> h2. Introduction The "Raspberry Pi":https://www.raspberrypi.com boot loader uses the @config.txt@ file to hold configuration options relevant at boot time. It is a plain text file, resident in the DOS partition of the boot SD card, alongside RISCOS.IMG etc. (for more information on other files in the DOS partition, see [[Software information: Raspberry Pi: Firmware]]) It should not be confused with [[cmdline.txt (Raspberry Pi)|cmdline.txt]] (which is used to pass parameters to RISC OS at boot time). h2. Accessing config.txt As stated above, config.txt is in the DOS partition of the SD card. On a standard RISC OS build using a [[Dual-format SD card]], this can be reached by double-clicking on <b>!Boot.Loader</b> (i.e. shift-doubleclick on !Boot and then double-click on the file called "Loader"). h2. Entries required by RISC OS The suggested contents of config.txt are as follows: <pre> <code> [pi4] enable_gic=1 [all] arm_64bit=0 fake_vsync_isr=1 framebuffer_swap=0 gpu_mem=64 init_emmc_clock=100000000 kernel=RISCOS.IMG ramfsfile=CMOS ramfsaddr=0x508000 </code> </pre> Note that the list is split[1] into two parts: the "pi4" section contains options for the Pi 4 only, while the "all" section contains options applicable to all versions of Raspberry Pi (including the Pi 4). Within each section, options can appear in any order: the important thing is to make sure they are in the right section! fn1. <small>The technique of splitting the list into multiple sections is explained in detail on the "Conditional filters":https://github.com/raspberrypi/documentation/blob/develop/documentation/asciidoc/computers/config_txt/conditional.adoc page of the Raspberry Pi documentation.</small> The entries on the list have the following meanings: * @enable_gic=1@<br />Enables the GIC interrupt controller. As this is in the "pi4" section, it will only be actioned on the Pi 4. * @arm_64bit=0@<br />Tell the bootloader to boot the kernel (i.e. RISCOS.IMG) in 32-bit mode[2]. * @fake_vsync_isr=1@<br />Triggers an "SMI interrupt at vertical sync (VSYNC) pulse":https://github.com/raspberrypi/firmware/issues/67 * @framebuffer_swap=0@<br />Corrects a problem where red and blue colour channels are swapped on later firmware. * @gpu_mem=64@<br />Allocates 64MB RAM to the GPU. At present, this enumerates the default setting. * @init_emmc_clock=100000000@<br />Sets the eMMC clock rate to 100MHz. At present, this enumerates the default setting. * @kernel=RISCOS.IMG@<br />Filename of the RISC OS ROM * @ramfsfile=CMOS@<br />Name of CMOS RAM file to be loaded * @ramfsaddr=0x508000@<br />Address to load the CMOS RAM. This address is 5MiB after the kernel start address (0x8000) so the RISC OS ROM cannot exceed 5MiB in size. fn2. <small>There has "already been one incident":https://github.com/raspberrypi/firmware/issues/1792 where the firmware tried to boot all kernels in 64-bit mode. Better safe than sorry.</small> h2(#Audio). Optional sound entries If you're having trouble getting HDMI sound to work, the following two entries may help: * @hdmi_drive=2@<br />Forces HDMI mode (sound enabled) instead of DVI mode (no sound). * @hdmi_force_edid_audio=1@<br />Send audio via HDMI, ignoring any "audio not supported" indications from the monitor. The following two entries are useful if you want to use the 3.5mm audio output jack instead of via the HDMI cable. * @hdmi_ignore_edid_audio=1@<br />Force the audio to use the stereo audio jack output. * @audio_pwm_mode=2@<br />Improves the sound quality and reduces annoying hissing. h2(#Video). Optional video entries h3. hdmi_mode and hdmi_group These options are used to specify the monitor's native pixel resolution. You might need them if you are using the _AnyMode_ utility, if your monitor does not support EDID, or if you want the Pi to run "headless" (i.e. without a monitor attached, and with all communication via VNC or similar). <table border="1" cellspacing="0"> <tr> <th bgcolor="silver">Monitor type</th> <th bgcolor="silver">hdmi_group</th> <th bgcolor="silver">hdmi_mode</th> <th bgcolor="silver">Notes</th> </tr> <tr> <td>1080p 60Hz television</td> <td align="center">1</td> <td align="center">16</td> <td>Full HD (USA)</td> </tr> <tr> <td>1080p 50Hz television</td> <td align="center">1</td> <td align="center">31</td> <td>Full HD (EUR)</td> </tr> <tr> <td>1360x768 (60Hz)</td> <td align="center">2</td> <td align="center">39</td> <td>e.g. Pi-Top v1</td> </tr> <tr> <td>1680x1050 (60Hz)</td> <td align="center">2</td> <td align="center">58</td> <td> </td> </tr> <tr> <td>1920x1200 (60Hz)</td> <td align="center">2</td> <td align="center">69</td> <td> </td> </tr> <tr> <td>1920x1080 (60Hz)</td> <td align="center">2</td> <td align="center">82</td> <td>Full HD</td> </tr> </table> For example, to specify a screen size of 1920x1080, you would use: @hdmi_group=2@ @hdmi_mode=82@ If your monitor size is not listed above, see "this documentation page":https://elinux.org/RPiconfig#Video_mode_options for other hdmi_mode and hdmi_group values. h3. Increasing the screen size The largest screen size officially supported by the Pi 1/2/3 is 1920x1200. These dimensions can be increased as follows: * @max_framebuffer_width, max_framebuffer_height@<br />Specifies the maximum dimensions that the internal frame buffer is allowed to be. There is a trade-off between screen size and display rate: the larger the screen, the lower the display rate. * @hdmi_pixel_freq_limit@<br />This command allows you to overclock the GPU above its nominal pixel frequency limit of 162MHz (Pi 1/2/3) or 300Mhz (Pi 4). For example, if you want a screen display of "2560x1440,60Hz" on a Pi 3, you would need a value of 250000000 (i.e. 250MHz).<br /><b>IMPORTANT NOTE</b>: Recent firmware versions - including the firmware distributed with RISC OS 5.28 - won't allow RISC OS to read this value. If you want to use this feature, you will have to lock the display to the required screen dimensions, as follows: ** Create a custom CVT mode by using the <i>hdmi_cvt</i> option along with hdmi_group=2 and hdmi_mode=87. For example, a 2560x1440,60Hz setting would look something like this:<br />@hdmi_cvt=2560 1440 60@<br />@hdmi_group=2@<br />@hdmi_mode=87@<br />@hdmi_drive=2@<br />@hdmi_pixel_freq_limit=250000000@<br />@max_framebuffer_width=2560@<br />@max_framebuffer_height=1440@ ** Specify "disable_mode_changes" in [[cmdline.txt (Raspberry Pi)|cmdline.txt]]. ** Add "AnyMode":http://www.pi-star.co.uk/anymode/ to !Boot.Choices.Boot.Predesk. h3. Other video entries * @hdmi_blanking=1@<br />Add this line if you want the monitor to switch to standby when the DPMS screen saver activates. Without this line, the screen will go blank, but the monitor will stay "on". * @hdmi_enable_4kp60=1@<br />Allows the Pi4 to use 3840x2160,60Hz (the default is to display 4K at 30Hz). Note this will increase the power consumption - and temperature - of the Pi 4. This command will not work on earlier models of Raspberry Pi: to avoid confusion, it should be placed in the "pi4" section[3] of config.txt. * @hdmi_force_hotplug=1@<br />Forces video output to use the HDMI connector. Use this if the Pi is having difficulties detecting your HDMI display, or if you want the Pi to run "headless" (i.e. without a monitor attached). * @disable_overscan=1@<br />Don't want those black borders at the edge of the screen? Try adding disable_overscan=1 to get rid of them. * @sdtv_mode=2@<br />This causes the composite video output to use European (PAL) picture format rather than American (NTSC) picture format. You will only need this option if you are using the composite video connector: it has no effect on video signals sent via the HDMI connector. fn3. <small>Putting it in the "pi4" section isn't strictly necessary (as older models of Raspberry Pi will ignore it) but it does make it clear it is for the Pi 4 only.</small> h2(#Misc). Miscellaneous entries The following entries may also be useful in certain circumstances: * @boot_delay@<br />Number of seconds to wait before loading the kernel. Use this if your SD card needs a while to get ready. * @bootcode_delay@<br />Number of seconds to wait before loading start.elf. Use this if your monitor takes a long time to start up (e.g. if a low-resolution desktop appears on cold boot, but restarting the Pi gives you a 1920x1080 desktop). h2. External links * "RPIconfig":https://elinux.org/RPiconfig (at elinux.org) contains further information on most of the options mentioned above, and many more besides. * On the Raspberry Pi website, documentation is split between two pages: ** "Options still supported by the Pi 5":https://www.raspberrypi.com/documentation/computers/config_txt.html ** "Options only available on earlier Pi models":https://www.raspberrypi.com/documentation/computers/legacy_config_txt.html (Pi Zero, Pi 1, Pi 2, Pi 3, Pi 4)