Difference between revisions of "Adjust Resolution for Raspberry Pi"
Line 1: | Line 1: | ||
− | If you are using Raspberry Pi with the screen, you may encounter incomplete display, with black space around. that would be wrong resolution. | + | If you are using Raspberry Pi with the screen, you may encounter incomplete display, with black space around. that would be wrong resolution.<br> |
− | Step 1: Open config.txt<br> | + | '''Step 1: Open config.txt'''<br> |
− | Connect a mouse and a keyboard to your Raspberry Pi. Click open the Terminal, and type in the command to open config.txt | + | Connect a mouse and a keyboard to your Raspberry Pi. Click open the Terminal, and type in the command to open config.txt<br> |
sudo leafpad /boot/config.txt | sudo leafpad /boot/config.txt | ||
− | Step 2: Modify the config.txt file<br> | + | '''Step 2: Modify the config.txt file'''<br> |
Now the file config.txt is opened.<br> | Now the file config.txt is opened.<br> | ||
− | 1)Define a custom CVT mode add the following lines below #hdmi_force_hotplug=1. hdmi_cvt=1920 1080 60 3 0 0 0 | + | 1)Define a custom CVT mode add the following lines below #hdmi_force_hotplug=1.<br> hdmi_cvt=1920 1080 60 3 0 0 0<br> |
− | hdmi_cvt=<width> <height> <framerate> <aspect> <margins> <interlace> | + | '''hdmi_cvt=<width> <height> <framerate> <aspect> <margins> <interlace>'''<br> |
Value Default Default | Value Default Default | ||
Line 23: | Line 23: | ||
....<br> | ....<br> | ||
hdmi_drive=2<br> | hdmi_drive=2<br> | ||
− | hdmi_group=2 means DMT (Display Monitor Timings; the standard typically used by monitors)<br> | + | '''hdmi_group=2''' means DMT (Display Monitor Timings; the standard typically used by monitors)<br> |
− | hdmi_mode=87 indicates the resolution mode we set before.<br> | + | '''hdmi_mode=87''' indicates the resolution mode we set before.<br> |
− | hdmi_drive=2 selects the Normal HDMI mode.<br> | + | '''hdmi_drive=2''' selects the Normal HDMI mode.<br> |
For more details about configuring config.txt, refer to Raspberry Pi official website: https://www.raspberrypi.org/documentation/configuration/config-txt.md. | For more details about configuring config.txt, refer to Raspberry Pi official website: https://www.raspberrypi.org/documentation/configuration/config-txt.md. | ||
After the modification is done, save, exit then reboot your Raspberry Pi and enjoy. | After the modification is done, save, exit then reboot your Raspberry Pi and enjoy. |
Revision as of 10:28, 20 February 2019
If you are using Raspberry Pi with the screen, you may encounter incomplete display, with black space around. that would be wrong resolution.
Step 1: Open config.txt
Connect a mouse and a keyboard to your Raspberry Pi. Click open the Terminal, and type in the command to open config.txt
sudo leafpad /boot/config.txt
Step 2: Modify the config.txt file
Now the file config.txt is opened.
1)Define a custom CVT mode add the following lines below #hdmi_force_hotplug=1.
hdmi_cvt=1920 1080 60 3 0 0 0
hdmi_cvt=<width> <height> <framerate> <aspect> <margins> <interlace>
Value Default Default
width (required) width in pixels
height (required) height in pixels
framerate (required) framerate in Hz
aspect 3 aspect ratio 1=4:3, 2=14:9, 3=16:9, 4=5:4, 5=16:10, 6=15:9
margins 0 0=margins disabled, 1=margins enabled
interlace 0 0=progressive, 1=interlaced
rb 0 0=normal, 1=reduced blanking
2)Find the following lines (If there is a "#" mark at the beginning of any of the three lines, which means they are comments, delete the mark. The asterisk "*" represents the value.
hdmi_group=*
hdmi_mode=*
hdmi_drive=*
3)Modify the value, like this:
hdmi_group=2
hdmi_mode=87
....
hdmi_drive=2
hdmi_group=2 means DMT (Display Monitor Timings; the standard typically used by monitors)
hdmi_mode=87 indicates the resolution mode we set before.
hdmi_drive=2 selects the Normal HDMI mode.
For more details about configuring config.txt, refer to Raspberry Pi official website: https://www.raspberrypi.org/documentation/configuration/config-txt.md.
After the modification is done, save, exit then reboot your Raspberry Pi and enjoy.