You’ve completed your Raspberry Pi setup only to find you have annoying black borders.
You are confused about how to remove the black border on Raspberry Pi.
Don’t worry.
Plenty of times, it’s a screen resolution problem you can fix quickly from the display or configuration settings.
The fastest method to remove black borders on Raspberry Pi involves fixing the “CONFIGURATION” settings.
This is where you can undo the “UNDERSCAN” option.
If black borders interfere with your Raspberry Pi display, this guide shows you how to fix the errors.
Furthermore, we briefly cover other troubleshooting tips to avoid black borders on your RPi.
Table of Contents
- Remove Black Border Using Configuration
- Remove Black Border Using Desktop User Interface
- Remove Black Border Using Terminal Command
- Remove Black Border Using Raspi-config
- Can Updating the Firmware Remove Black Border From Raspberry Pi?
- Alternative Methods To Get Rid Of Black Border On Raspberry Pi
- Closing Remarks
Remove Black Border Using Configuration
No. | Steps |
Step 1 | Firstly, head over to your Raspberry Pi menu. You’ll see the drop-down options. |
Step 2 | Firstly, head over to your Raspberry Pi menu. You’ll see the drop-down options. |
Step 3 | Click on the PREFERENCES option. It’ll branch out into other options. |
Step 4 | Then, click the DISPLAY option ( the second option on the left after SYSTEM). |
Step 5 | Scroll to the RASPBERRY PI CONFIGURATION option. The configuration option opens up other options. |
Step 6 | Click on UNDERSCAN. Toggle the button to disable the UNDERSCAN option. Disabling the UNDERSCAN should turn the toggle grey. |
Remove Black Border Using Desktop User Interface
No. | Steps |
Step 1 | Click the Raspberry Pi icon on your display screen’s top left side. Clicking the icon opens the applications menu. |
Step 2 | Click PREFERENCES. |
Step 3 | Click the Raspberry Pi icon on your display screen’s top left side. Clicking the icon opens the applications menu. |
Step 4 | Click CONFIGUREIt should bring out a ‘SCREENS’ option. |
Step 5 | Click SCREEN CONFIGURATIONSIt should be the last option from the Preferences option. It will bring up a small pop-up window. |
Step 6 | Click RESOLUTIONS.Pick the resolution that fills up the screen and removes the black border on Raspberry Pi. |
Step 7 | Choose the screen you are using. One option will be grayed out if only one screen is connected. |
Remove Black Border Using Terminal Command
No. | Steps |
Step 1 | Open the Terminal (on your display screen’s top left side). |
Step 2 | Reboot your device. This method works for most users. However, some users, especially beginners, find it too technical. Alternatively, enter the prompt sudo nano /boot/config.txtLook for the following lines and values#overscan_left=16 #overscan_right=16 #overscan_top=16 #overscan_bottom=16 Change these values until you remove the black border in your Raspberry Pi. You can change the values to -16. Setting the value to negative numbers reduces or removes the black border for some users. Save the changes and reboot your device. Unfortunately, getting the correct value to fix the black border may take trial and error. |
Step 3 | Reboot your device. This method works for most users. However, some users, especially beginners, find it too technical. Alternatively, enter the prompt sudo nano /boot/config.textbook for the following lines and values#overscan_left=16 #overscan_right=16 #overscan_top=16 #overscan_bottom=16 Change these values until you remove the black border in your Raspberry Pi. You can change the values to -16. Setting the value to negative numbers reduces or removes the black border for some users. Save the changes and reboot your device. Unfortunately, getting the correct value to fix the black border may take trial and error. |
Step 4 | Hit ENTER to open the file. Look for the 8th line. It should read “#disable_overscan=1 ”. Then, hit CTRL + W to search for the “#disable_overscan=1” line. |
Step 5 | Hit ENTER to save the configuration file. |
Step 6 | Remove the # sign and press Y to save the changes. Hit CTRL + X to exit. |
Remove Black Border Using Raspi-config
No. | Steps |
Step 1 | Type in the following command. Sudo raspi-configThe above command opens up Raspberry Pi configurations. |
Step 2 | Use your arrow keys to scroll to option 6: ADVANCED OPTIONS: CONFIGURE ADVANCED SETTINGS. |
Step 3 | Type in the following command. Sudo raspy-config above command opens up Raspberry Pi configurations. |
Step 4 | Scroll to RESOLUTION. |
Step 5 | Hit ENTER. Here, you can choose the resolution that suits your display screen size. |
Step 6 | Exit Raspberry configuration by hitting ESC. |
Step 7 | Type in the following command. Sudo raspy-config above command opens up Raspberry Pi configurations. |
Step 8 | Type in the following command. Sudo raspy-config above command opens up Raspberry Pi configurations. |
Alternatively, using the same sudo raspi-config prompt,
Step 1 | Click D2 UNDERSCAN. It’s written right there. ‘Remove black border around the screen.’ |
Step 2 | Click D2 UNDERSCAN. It’s written right there. ‘Remove black border around the screen.’ |
Step 3 | Click NO when the prompt asks if you want to enable overscan compensation for the selected HDMI. |
Step 4 | Choose the HDMI port you’re using. It’ll bring a screen that asks you to select the output for which overscan compensation will be set. Choose HDMI 1 or HDMI 2. |
Step 5 | Reboot the device once you disable overscan. |
These three methods and their alternatives will likely remove the black borders on your Raspberry Pi.
However, did you know that the problem might lie elsewhere?
Can Updating the Firmware Remove Black Border From Raspberry Pi?
Firmware problems can sometimes mess with the screen resolution settings. A Raspberry Pi 3’s settings might not work with a Raspberry Pi 4 with different firmware. That is where a firmware update comes into play.
This firmware update procedure removes the black borders from Raspberry Pi.
No. | Steps |
Step 1 | Click on the Terminal icon to open the Terminal. Alternatively, press CTRL + Alt + T. |
Step 2 | Click on the Terminal icon to open the Terminal. Alternatively, press CTRL + Alt + T. |
Step 3 | Type out the command below. It updates your Raspberry Pi.sudo RPI-update |
Step 4 | Hit ENTER. Package updating might take a while to finish. |
Step 5 | Type out the command below. It installs the RPI -update tool. Sudo apt-get install RPI-update |
Step 6 | Hit ENTER. Package upgrading also might take a while to finish. |
Step 7 | Hit ENTER. |
Step 8 | Type out the command below. It installs the RPI -update tool. Sudo apt-get install RPI-update. |
Step 9 | Press Enter and wait for the update to finish. |
Step 10 | Type out the command below. It installs the RPI -update tool. Sudo apt-get install RPI-update. |
Step 11 | Once your device reboots, check whether the black border problem has been resolved. |
CAUTION: Updating firmware, though recommended, should be a security measure. Use it as a last resort if the main issue is the resolution of problems like black borders.
Alternative Methods To Get Rid Of Black Border On Raspberry Pi
If you have tried all the above methods and none have worked, consider checking the display screen settings or the connector.
Change Your TV Resolution Settings

Changing TV settings can remove black borders.
Your Raspberry Pi might have the correct settings. However, your display monitor might have different overscan or aspect ratio settings.
Here’s how to fix it.
Turn on your display monitor and Raspberry Pi. Full uninterrupted output confirms both units are fully functional. |
Go to the Display settings menu. Some TVs have a Pictures settings menu instead. |
Go to the Display settings menu. Some TVs have a Pictures settings menu instead. |
Change Your HDMI Cables
If you still have black borders, even with the right configurations, consider changing your HDMI cables.
However, some cables might not support your display monitor’s resolution. Ensure your HDMI cables support multiple resolutions.
Closing Remarks
There you have i. These methods will help you remove black borders on your Raspberry P.
However, additional measures such as firmware updates and using appropriate HDMI cables and connectors will reduce the chances of black borders in your Raspberry Pi.