Skip to content

Commit c33872e

Browse files
committed
Update config-txt.md
Various edits
1 parent fd0ca7f commit c33872e

File tree

1 file changed

+39
-47
lines changed

1 file changed

+39
-47
lines changed

configuration/config-txt.md

+39-47
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,21 @@
11
# config.txt
22

3-
As the raspberry PI doesn't have a conventional BIOS, the various system configuration parameters that would normally be kept and set using a BIOS are stored as a text file named "config.txt".
3+
As it's an embedded platform, the Raspberry Pi doesn't have a BIOS like you'd find on a conventional PC. The various system configuration parameters that would traditionally be edited and stored using a BIOS are stored in an optional text file named `config.txt`. This is read by the GPU before the ARM (and Linux) is initialised, so it must be located on the first (boot) partition of your SD card (alongside `bootcode.bin` and `start.elf`). This file is normally accessible as `/boot/config.txt` from Linux (needs to be edited as [root](../linux/usage/root.md)); but from Windows (or OS X) it is seen as a file in the only accessible part of the card. If you need to apply some of the config settings below but you don't have a `config.txt` on your boot partition yet, then simply create it as a new text file.
44

5-
The Raspberry Pi config.txt file is read by the GPU before the ARM core is initialised.
5+
Any changes will only take effect after you've rebooted your Raspberry Pi. After Linux has booted you can get the current active settings with the following commands:
66

7-
This file is an optional file on the boot partition. It is normally accessible as /boot/config.txt from Linux, but from Windows (or OS X) it is seen as a file in the accessible part of the card.
7+
`vcgencmd get_config <config>` - lists a specific config value. E.g. `vcgencmd get_config arm_freq`
88

9-
You can get your current active settings with the following commands:
10-
```
11-
vcgencmd get_config <config> - lists a specific config value. E.g. vcgencmd get_config arm_freq
12-
vcgencmd get_config int - lists all the integer config options that are set (non-zero)
13-
vcgencmd get_config str - lists all the string config options that are set (non-null)
14-
```
9+
`vcgencmd get_config int` - lists all the integer config options that are set (non-zero)
1510

16-
# File format
11+
`vcgencmd get_config str` - lists all the string config options that are set (non-null)
1712

18-
The format is "property=value" where value is an integer. You may specify only one option per line. Comments may be added by starting a line with the '#' character.
13+
# File format
1914

20-
Note: In the newer Raspberry Pi models there is # before every line. If you want changes to have an effect then 'uncomment', (i.e. remove the #).
15+
As `config.txt` is read by the early-stage boot firmware it has a very simple file format. The format is a single `property=value` statement on each line, where value is either an integer (i.e. a number) or a string. Comments may be added (or existing config values may be commented out, which disables them) by starting a line with the `#` character.
2116

2217
Here is an example file:
2318
```
24-
# Set stdv mode to PAL (as used in Europe)
25-
sdtv_mode=2
2619
# Force the monitor to HDMI mode so that sound will be sent over HDMI cable
2720
hdmi_drive=2
2821
# Set monitor mode to DMT
@@ -38,15 +31,15 @@ Here is an example file:
3831

3932
# Memory
4033

41-
```disable_l2cache``` disables ARM access to GPU's L2 cache. Needs corresponding L2 disabled kernel. Default 0.
34+
```gpu_mem``` GPU memory in megabytes. Sets the memory split between the ARM (CPU) and GPU. ARM gets the remaining memory. Min 16. Default 64.
4235

43-
```gpu_mem``` GPU memory in megabyte. Sets the memory split between the ARM and GPU. ARM gets the remaining memory. Min 16. Default 64.
36+
```gpu_mem_256``` GPU memory in megabytes for the 256MB Raspberry Pi. Ignored by the 512MB RP. Overrides gpu_mem. Max 192. Default not set.
4437

45-
```gpu_mem_256``` GPU memory in megabyte for the 256MB Raspberry Pi. Ignored by the 512MB RP. Overrides gpu_mem. Max 192. Default not set.
38+
```gpu_mem_512``` GPU memory in megabytes for the 512MB Raspberry Pi. Ignored by the 256MB RP. Overrides gpu_mem. Max 448. Default not set.
4639

47-
```gpu_mem_512``` GPU memory in megabyte for the 512MB Raspberry Pi. Ignored by the 256MB RP. Overrides gpu_mem. Max 448. Default not set.
40+
```disable_l2cache``` disables ARM access to GPU's L2 cache. Needs corresponding L2 disabled kernel. Default 0.
4841

49-
```disable_pvt``` Disable adjusting the refresh rate of RAM every 500ms (measuring RAM temparature).
42+
```disable_pvt``` Disable adjusting the refresh rate of RAM every 500ms (measuring RAM temparature).
5043

5144
## CMA - Dynamic Memory Split
5245

@@ -58,8 +51,7 @@ You can find an [example config.txt here](http://www.raspberrypi.org/phpBB3/view
5851

5952
```cma_hwm``` When GPU has more than cma_hwm (high water mark) memory available it will release some to ARM.
6053

61-
The following options need to be in cmdline.txt for CMA to work:
62-
coherent_pool=6M smsc95xx.turbo_mode=N
54+
The following options need to be in cmdline.txt for CMA to work: `coherent_pool=6M smsc95xx.turbo_mode=N`
6355

6456
Note: As per https://github.com/raspberrypi/linux/issues/503 popcornmix states that CMA is not officially supported.
6557

@@ -147,7 +139,7 @@ Not specifying the group, or setting to 0 will use the preferred group reported
147139
| --- | --- |
148140
| 0 | Auto-detect from EDID |
149141
| 1 | CEA |
150-
| 2 | DMT |
142+
| 2 | DMT |
151143

152144
```hdmi_mode``` defines screen resolution in CEA or DMT format.
153145
(For other modes not listed here have a look at [this thread](http://www.raspberrypi.org/phpBB3/viewtopic.php?f=29&t=24679).)
@@ -324,7 +316,7 @@ Not specifying the group, or setting to 0 will use the preferred group reported
324316

325317
```framebuffer_height``` console framebuffer height in pixels. Default is display height minus overscan.
326318

327-
```framebuffer_depth``` console framebuffer depth in bits per pixel. Default is 16. 8bit is valid, but default RGB palette makes an unreadable screen. 24bit looks better but has corruption issues as of 20120615. 32bit has no corruption issues but needs framebuffer_ignore_alpha=1 and shows the wrong colors as of 20120615.
319+
```framebuffer_depth``` console framebuffer depth in bits per pixel. Default is 16. 8bit is valid, but default RGB palette makes an unreadable screen. 24bit looks better but has corruption issues as of 20120615. 32bit has no corruption issues but needs framebuffer_ignore_alpha=1 and shows the wrong colors as of 20120615.
328320

329321
```framebuffer_ignore_alpha``` set to 1 to disable alpha channel. Helps with 32bit.
330322

@@ -335,12 +327,12 @@ Not specifying the group, or setting to 0 will use the preferred group reported
335327
```config_hdmi_boost``` configure the signal strength of the HDMI interface. Default is 0. Try 4 if you have interference issues with hdmi. 7 is the maximum.
336328

337329
```display_rotate``` rotates the display clockwise on the screen (default=0) or flips the display.
338-
display_rotate=0 Normal
339-
display_rotate=1 90 degrees
340-
display_rotate=2 180 degrees
341-
display_rotate=3 270 degrees
342-
display_rotate=0x10000 horizontal flip
343-
display_rotate=0x20000 vertical flip
330+
display_rotate=0 Normal
331+
display_rotate=1 90 degrees
332+
display_rotate=2 180 degrees
333+
display_rotate=3 270 degrees
334+
display_rotate=0x10000 horizontal flip
335+
display_rotate=0x20000 vertical flip
344336

345337
Note: the 90 and 270 degrees rotation options require additional memory on GPU, so won't work with the 16M GPU split. Probably the reason for:
346338
* Crashes my RPI before Linux boots if set to "1" -- REW 20120913.
@@ -375,42 +367,42 @@ Licence setup for SD-card sharing between multiple Pis. There is a maximum of ei
375367
#Boot
376368
```disable_commandline_tags``` stop start.elf from filling in ATAGS (memory from 0x100) before launching kernel.
377369

378-
```cmdline``` (string) command line parameters. Can be used instead of cmdline.txt file.
370+
```cmdline``` (string) command line parameters. Can be used instead of cmdline.txt file.
379371

380-
```kernel``` (string) alternative name to use when loading kernel. Default "kernel.img".
372+
```kernel``` (string) alternative name to use when loading kernel. Default "kernel.img".
381373

382-
```kernel_address``` address to load kernel.img file.
374+
```kernel_address``` address to load kernel.img file.
383375

384-
```kernel_old``` (bool) if 1, load kernel at 0x0.
376+
```kernel_old``` (bool) if 1, load kernel at 0x0.
385377

386-
```ramfsfile``` (string) ramfs file to load.
378+
```ramfsfile``` (string) ramfs file to load.
387379

388-
```ramfsaddr``` address to load ramfs file.
380+
```ramfsaddr``` address to load ramfs file.
389381

390-
```initramfs``` (string address) ramfs file and adress to load it at (it's like ramfsfile+ramfsaddr in one option). NOTE: this option uses different syntax than all other options - you should not use "=" character here. Example:
382+
```initramfs``` (string address) ramfs file and adress to load it at (it's like ramfsfile+ramfsaddr in one option). NOTE: this option uses different syntax than all other options - you should not use "=" character here. Example:
391383
initramfs initramf.gz 0x00800000
392384

393-
```device_tree_address``` address to load device_tree.
385+
```device_tree_address``` address to load device_tree.
394386

395-
```init_uart_baud``` initial uart baud rate. Default 115200.
387+
```init_uart_baud``` initial uart baud rate. Default 115200.
396388

397-
```init_uart_clock``` initial uart clock. Default 3000000 (3Mhz).
389+
```init_uart_clock``` initial uart clock. Default 3000000 (3Mhz).
398390

399-
```init_emmc_clock``` initial emmc clock. Default 100000000 (100MHz).
391+
```init_emmc_clock``` initial emmc clock. Default 100000000 (100MHz).
400392

401-
```boot_delay``` wait for given number of seconds in start.elf before loading kernel. delay = 1000 * boot_delay + boot_delay_ms. Default 1.
393+
```boot_delay``` wait for given number of seconds in start.elf before loading kernel. delay = 1000 * boot_delay + boot_delay_ms. Default 1.
402394

403-
```boot_delay_ms``` wait for given number of milliseconds in start.elf before loading kernel. Default 0.
395+
```boot_delay_ms``` wait for given number of milliseconds in start.elf before loading kernel. Default 0.
404396

405-
```avoid_safe_mode``` if set to 1, [[RPI_safe_mode|safe_mode]] boot won't be enabled. Default 0.
397+
```avoid_safe_mode``` if set to 1, [[RPI_safe_mode|safe_mode]] boot won't be enabled. Default 0.
406398

407-
```disable_splash``` if set to 1, avoids the rainbow splash screen on boot.
399+
```disable_splash``` if set to 1, avoids the rainbow splash screen on boot.
408400

409401
#Overclocking
410402
```NOTE:``` Setting parameters other than that available by 'raspi-config' will set a permanent bit within the SOC, making it possible to detect that you Pi has been overclocked. This was originally set to detect a void warranty if the device had been overclocked. Since September 19th 2012 you can overclock your Pi without affecting your warranty<ref>[http://www.raspberrypi.org/archives/2008 Introducing turbo mode: up to 50% more performance for free]</ref>.
411403

412404
The latest kernel has a [http://www.pantz.org/software/cpufreq/usingcpufreqonlinux.html cpufreq] kernel driver with the "ondemand" governor enabled by default. It has no effect if you have no overclock settings.
413-
But when you do, the ARM frequency will vary with processor load. Non-default values are only used when needed according to the governor. You can adjust the minimum values with the *_min config options or disable dynamic clocking with force_turbo=1. <ref name=cpufreq>http://www.raspberrypi.org/phpBB3/viewtopic.php?p=169726#p169726</ref>
405+
But when you do, the ARM frequency will vary with processor load. Non-default values are only used when needed according to the governor. You can adjust the minimum values with the *_min config options or disable dynamic clocking with force_turbo=1. <ref name=cpufreq>http://www.raspberrypi.org/phpBB3/viewtopic.php?p=169726#p169726</ref>
414406

415407
Overclock and overvoltage will be disabled at runtime when the SoC reaches 85°C to cool it down. You should not hit the limit, even with maximum settings at 25°C ambient temperature. <ref name=freq_overheat>http://www.raspberrypi.org/phpBB3/viewtopic.php?f=29&t=11579#p169872</ref>
416408

@@ -530,7 +522,7 @@ There are [http://www.raspberrypi.org/phpBB3/viewtopic.php?f=29&t=6201&p=159188&
530522

531523
##Monitoring Temperature and Voltage
532524

533-
To monitor the Pi's temperature, look at: <code>/sys/class/thermal/thermal_zone0/temp</code>.<br>
525+
To monitor the Pi's temperature, look at: <code>/sys/class/thermal/thermal_zone0/temp</code>.<br>
534526
To monitor the Pi's current frequency, look at: <code>/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq</code>.<br>
535527
To monitor the Pi's PSU voltage, you'll need a multimeter, to measure across the power supply test points, or the expansion header.
536528

@@ -554,7 +546,7 @@ If the system ''does'' crash, then hold down the ''shift'' key during boot, whic
554546
#Read the entire SD card 10x. Tests RAM and I/O
555547
for i in `seq 1 10`; do echo reading: $i; sudo dd if=/dev/mmcblk0 of=/dev/null bs=4M; done
556548

557-
#Writes 512 MB test file, 10x.
549+
#Writes 512 MB test file, 10x.
558550
for i in `seq 1 10`; do echo writing: $i; dd if=/dev/zero of=deleteme.dat bs=1M count=512; sync; done
559551

560552
#Clean up

0 commit comments

Comments
 (0)