Skip to content

Commit 2c5b6bf

Browse files
authored
Update cmdline-txt.md (raspberrypi#1403)
* Update cmdline-txt.md * Update cmdline-txt.md * Update cmdline-txt.md * Update cmdline-txt.md * Update cmdline-txt.md
1 parent 0ed5233 commit 2c5b6bf

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

configuration/cmdline-txt.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ The Linux kernel accepts a command line of parameters during boot. On the Raspbe
44
```
55
sudo nano /boot/cmdline.txt
66
```
7-
Note that we have to use `sudo` to edit anything in the boot partition.
7+
Note that we have to use `sudo` to edit anything in the boot partition, and that all parameters in `cmdline.txt` must be on the same line (no carriage returns).
8+
9+
The command line that was passed to the kernel at boot time can be displayed using `cat /proc/cmdline`. It will not be exactly the same as that in `cmdline.txt` as the firmware can make changes to it prior to launching the kernel.
810

911
## Command Line Options
1012

@@ -20,6 +22,26 @@ There are many kernel command line parameters, some of which are defined by the
2022
- elevator: specifies the I/O scheduler to use. `elevator=deadline` means the kernel imposes a deadline on all I/O operations to prevent request starvation.
2123
- quiet: sets the default kernel log level to `KERN_WARNING`, which suppresses all but very serious log messages during boot.
2224

25+
#### Display Entries in FKMS and KMS modes
26+
27+
The firmware automatically adds a preferred resolution and overscan settings via an entry such as:
28+
29+
```video=HDMI-A-1:1920x1080M@60,margin_left=0,margin_right=0,margin_top=0,margin_bottom=0```
30+
31+
This default entry can be modified by duplicating the entry above manually in /boot/cmdline.txt and making required changes to the margin parameters. In addition, it is possible to add rotation and reflect parameters as documented in the standard [Linux framebuffer documentation](https://github.com/raspberrypi/linux/blob/rpi-4.19.y/Documentation/fb/modedb.txt). By default the `margin_*` options are set from the `overscan` entries in config.txt, if present. The firmware can be prevented from making any KMS specific changes to the command line by adding `disable_fw_kms_setup=1` to `config.txt`
32+
33+
An example entry may be as follows:
34+
35+
```video=HDMI-A-1:1920x1080M@60,margin_left=0,margin_right=0,margin_top=0,margin_bottom=0,rotate=90,reflect_x```
36+
37+
Possible options for the display type, the first part of the `video=` entry, are as follows:
38+
39+
| video option | Display |
40+
|:---:|:---|
41+
| HDMI-A-1 | HDMI 1 (HDMI 0 on silkscreen of Pi4B, HDMI on single HDMI boards) |
42+
| HDMI-A-2 | HDMI 2 (HDMI 1 on silkscreen of Pi4B) |
43+
| DSI-1 | DSI or DPI |
44+
| Composite-1 | Composite |
2345

2446
#### Other Entries (not exhaustive)
2547

0 commit comments

Comments
 (0)