Skip to content

Commit 045cd59

Browse files
Update conditional.md (raspberrypi#646)
1 parent 0009c0d commit 045cd59

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

configuration/config-txt/conditional.md

+13-11
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
## Conditional filters in config.txt
22

3-
When a single SD card (or card image) is only being used with one Pi and one monitor, it's easy to simply set `config.txt` as required for that specific combination and keep it that way, amending only when something changes.
3+
When a single SD card (or card image) is being used with one Pi and one monitor, it is easy to set `config.txt` as required for that specific combination and keep it that way, amending it only when something changes.
44

5-
However, if one Pi is swapped between different monitors, or if the SD card (or card image) is being swapped between multiple Pis, a single set of settings may no longer be sufficient. Conditional filters allow you to that certain sections of the config file are used only in specific cases, allowing a single `config.txt` to create different configurations when read by different hardware.
5+
6+
However, if one Pi is swapped between different monitors, or if the SD card (or card image) is being swapped between multiple Pis, a single set of settings may no longer be sufficient. Conditional filters allow you to define certain sections of the config file to be used only in specific cases, allowing a single `config.txt` to create different configurations when read by different hardware.
67

78
### The `[all]` filter
89

9-
The `[all]` filter is the most basic filter: it resets all previously set filters and allows any settings listed below it to be applied to all hardware.
10+
This is the most basic filter. It resets all previously set filters and allows any settings listed below it to be applied to all hardware.
11+
1012

1113
[all]
1214

13-
It's usually a good idea to add an `[all]` filter at the end of groups of filtered settings to avoid unintentionally combining filters (see below).
15+
It is usually a good idea to add an `[all]` filter at the end of groups of filtered settings to avoid unintentionally combining filters (see below).
1416

1517
### The `[pi1]` and `[pi2]` (etc.) filters
1618

@@ -22,7 +24,7 @@ Any settings below a `[pi2]` filter will only be applied to Pi 2 hardware. The `
2224
[pi3]
2325
[pi0]
2426

25-
These are particularly useful for defining different `kernel`, `initramfs`, and `cmdline` settings, as the Pi 1 and Pi 2 require different kernels. They can also be useful to define different overclocking settings for each, since they have different default speeds. For example, to define separate `initramfs` images for each:
27+
These are particularly useful for defining different `kernel`, `initramfs`, and `cmdline` settings, as the Pi 1 and Pi 2 require different kernels. They can also be useful to define different overclocking settings, as the Pi 1 and Pi 2 have different default speeds. For example, to define separate `initramfs` images for each:
2628

2729
[pi1]
2830
initramfs initrd.img-3.18.7+ followkernel
@@ -50,20 +52,20 @@ This will print something like this:
5052

5153
device_name=VSC-TD2220
5254

53-
You can then specify settings that apply only to this monitor like so:
55+
You can then specify settings that apply only to this monitor:
5456

5557
[EDID=VSC-TD2220]
5658
hdmi_group=2
5759
hdmi_mode=82
5860
[all]
5961

60-
This forces 1920x1080 DVT mode for this monitor, without affecting any other monitors.
62+
This forces 1920x1080 DVT mode for the specified monitor, without affecting any other monitors.
6163

62-
Note that these settings apply only at boot, so the monitor must be connected at boot time and the Pi must be able to read its EDID information to get the correct name. Hotplugging a different monitor after boot will not reselect different settings.
64+
Note that these settings apply only at boot, so the monitor must be connected at boot time and the Pi must be able to read its EDID information to find the correct name. Hotplugging a different monitor into the Pi after boot will not select different settings.
6365

6466
### The serial number filter
6567

66-
Sometimes settings should only be applied to a single specific Pi, even if you swap the SD card to a different one. Examples include licence keys and overclocking settings (although the licence keys already support SD card swapping in a different way). You can also use this to select different display settings even if the EDID identification above isn't possible for some reason, provided that you don't swap monitors between your Pis - for example, if your monitor doesn't supply a usable EDID name or if you're using composite output (for which EDID cannot be read).
68+
Sometimes settings should only be applied to a single specific Pi, even if you swap the SD card to a different one. Examples include licence keys and overclocking settings (although the licence keys already support SD card swapping in a different way). You can also use this to select different display settings, even if the EDID identification above is not possible, provided that you don't swap monitors between your Pis. For example, if your monitor doesn't supply a usable EDID name, or if you are using composite output (for which EDID cannot be read).
6769

6870
To view the serial number of your Pi, run the following command:
6971

@@ -73,7 +75,7 @@ The serial will be shown as a 16-digit hex value at the bottom. For example, if
7375

7476
Serial : 0000000012345678
7577

76-
Then you can define settings that will only be applied to this specific Pi like so:
78+
then you can define settings that will only be applied to this specific Pi:
7779

7880
[0x12345678]
7981
# settings here are applied only to the Pi with this serial
@@ -82,7 +84,7 @@ Then you can define settings that will only be applied to this specific Pi like
8284

8385
### Combining conditional filters
8486

85-
Filters of the same type replace each other, so `[pi2]` overrides `[pi1]`, as it's not possible for both to be true at once.
87+
Filters of the same type replace each other, so `[pi2]` overrides `[pi1]`, because it is not possible for both to be true at once.
8688

8789
Filters of different types can be combined simply by listing them one after the other, for example:
8890

0 commit comments

Comments
 (0)