You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: configuration/config-txt.md
+39-47
Original file line number
Diff line number
Diff line change
@@ -1,28 +1,21 @@
1
1
# config.txt
2
2
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.
4
4
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:
6
6
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`
8
8
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)
15
10
16
-
# File format
11
+
`vcgencmd get_config str` - lists all the string config options that are set (non-null)
17
12
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
19
14
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.
21
16
22
17
Here is an example file:
23
18
```
24
-
# Set stdv mode to PAL (as used in Europe)
25
-
sdtv_mode=2
26
19
# Force the monitor to HDMI mode so that sound will be sent over HDMI cable
27
20
hdmi_drive=2
28
21
# Set monitor mode to DMT
@@ -38,15 +31,15 @@ Here is an example file:
38
31
39
32
# Memory
40
33
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.
42
35
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.
44
37
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.
46
39
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.
48
41
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).
50
43
51
44
## CMA - Dynamic Memory Split
52
45
@@ -58,8 +51,7 @@ You can find an [example config.txt here](http://www.raspberrypi.org/phpBB3/view
58
51
59
52
```cma_hwm``` When GPU has more than cma_hwm (high water mark) memory available it will release some to ARM.
60
53
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`
63
55
64
56
Note: As per https://github.com/raspberrypi/linux/issues/503 popcornmix states that CMA is not officially supported.
65
57
@@ -147,7 +139,7 @@ Not specifying the group, or setting to 0 will use the preferred group reported
147
139
| --- | --- |
148
140
| 0 | Auto-detect from EDID |
149
141
| 1 | CEA |
150
-
| 2 |DMT |
142
+
| 2 | DMT |
151
143
152
144
```hdmi_mode``` defines screen resolution in CEA or DMT format.
153
145
(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
324
316
325
317
```framebuffer_height``` console framebuffer height in pixels. Default is display height minus overscan.
326
318
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.
328
320
329
321
```framebuffer_ignore_alpha``` set to 1 to disable alpha channel. Helps with 32bit.
330
322
@@ -335,12 +327,12 @@ Not specifying the group, or setting to 0 will use the preferred group reported
335
327
```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.
336
328
337
329
```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
344
336
345
337
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:
346
338
* 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
375
367
#Boot
376
368
```disable_commandline_tags``` stop start.elf from filling in ATAGS (memory from 0x100) before launching kernel.
377
369
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.
379
371
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".
381
373
382
-
```kernel_address```address to load kernel.img file.
374
+
```kernel_address``` address to load kernel.img file.
383
375
384
-
```kernel_old```(bool) if 1, load kernel at 0x0.
376
+
```kernel_old``` (bool) if 1, load kernel at 0x0.
385
377
386
-
```ramfsfile```(string) ramfs file to load.
378
+
```ramfsfile``` (string) ramfs file to load.
387
379
388
-
```ramfsaddr```address to load ramfs file.
380
+
```ramfsaddr``` address to load ramfs file.
389
381
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:
391
383
initramfs initramf.gz 0x00800000
392
384
393
-
```device_tree_address```address to load device_tree.
385
+
```device_tree_address``` address to load device_tree.
```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.
402
394
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.
404
396
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.
406
398
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.
408
400
409
401
#Overclocking
410
402
```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>.
411
403
412
404
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. <refname=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. <refname=cpufreq>http://www.raspberrypi.org/phpBB3/viewtopic.php?p=169726#p169726</ref>
414
406
415
407
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. <refname=freq_overheat>http://www.raspberrypi.org/phpBB3/viewtopic.php?f=29&t=11579#p169872</ref>
416
408
@@ -530,7 +522,7 @@ There are [http://www.raspberrypi.org/phpBB3/viewtopic.php?f=29&t=6201&p=159188&
530
522
531
523
##Monitoring Temperature and Voltage
532
524
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>
534
526
To monitor the Pi's current frequency, look at: <code>/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq</code>.<br>
535
527
To monitor the Pi's PSU voltage, you'll need a multimeter, to measure across the power supply test points, or the expansion header.
536
528
@@ -554,7 +546,7 @@ If the system ''does'' crash, then hold down the ''shift'' key during boot, whic
554
546
#Read the entire SD card 10x. Tests RAM and I/O
555
547
for i in `seq 1 10`; do echo reading: $i; sudo dd if=/dev/mmcblk0 of=/dev/null bs=4M; done
556
548
557
-
#Writes 512 MB test file, 10x.
549
+
#Writes 512 MB test file, 10x.
558
550
for i in `seq 1 10`; do echo writing: $i; dd if=/dev/zero of=deleteme.dat bs=1M count=512; sync; done
0 commit comments