Adjust Resolution for Raspberry Pi
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.