3 ways to get Rid of raspberry pi black border in display(2023)

Table of Contents

  1. Raspberry pi
  2. how to Fix Raspberry Pi HDMI not working
  3. How to Get Rid of unused pixel or black border

Raspberry pi

  Raspberry Pi is a low-cost and powerful Single Board Computer. It is a widely used Single Board computer Featuring 4 &8 GB Ram and a 4K dual display support with a cost of about 80 -150 USD. if you compare with a smaller computer with a cost of USD 500, Raspberry pi offers more features at a low cost along with USB Gen 3 port and two 4k micro HDMI ports. it is mostly used for internet of things related stuff.

When you Buy raspberry pi and install the software in it and try to use it for the first time you will get some errors. It may be with your display or HDMI many more.

The most common are :

  • HDMI is not Displaying
  • Unused pixel or black borders around the screen
  • Stuck at Boot Screen

How to Fix Raspberry pi Hdmi not working or displaying

This is caused due to the low power supply. It can be fixed by changing the Charger or by forcing and increasing the HDMI signal.

To do this you need to edit a config, txt file by using other computers, or by connecting through SSH(secured shell). 

Find the following in the config.txt file

 #hdmi_force_hotplug=1

 #hdmi_drive=2

Remove Hash(#) and save file

anything with a hash symbol is considered as comment. By removing Hash(#) you can activate those settings

If these lines are not present. then copy these lines and paste them to the config.txt file

If still, it doesn’t work, then search for the following line

#hdmi_safe=1
#hdmi_drive=2

remove Hash(#) and save the file

How to Fix Unused Pixel or Black border?

This problem is caused due to unused pixels.it can be removed easily by changing modes. I got this problem when I Installed Kali Linux in Raspberry Pi 4. I kept searching on the web, forums and tried every possible combination in the Config.txt file. After a few days, I tried Altering settings and got the solution

In this post, I will Explain Two solutions One which is crowded all over the forums and another which is not present in any forums,

At first I will explain how to get rid of the black border by altering settings:-

  1. Open your Raspberry Pi desktop
  2. Go to applications menu
  3. Click on Preferences
  4. Screen configuration
  5. You will get two options – Hdmi 1 and 2
  6. select Hdmi 1 then click on configure
  7. select option for screens -> Hdmi 1 and select the resolution
  8. select the resolution as 1920*1080. you can choose which suits you
  9. go to configure click apply

If you Don’t get Different resolutions don’t worry. you need to make a small change in config.text, you can edit using nano or by simply going to file manager

to edit using nano. Go to terminal and enter below code

sudo nano /boot/config.txt

Go to the file manager. select boot file,-> then config.txt

there you will find a setting

sdtv_mode=2

change it to 2 and remove #.

#sdtv_mode=2

now again repeat the above instructions and go to resolution and select the required one and click on apply. you should click apply within 5 secs else it will be reverted back

raspberry pi black border

Second method is by editing and altering the config.txt file

Go to the config.txt file using any of the above methods.

Search the following

#disable_overscan=1

Remove the hash symbol and save it (ctrl+x). Then reboot

if it doesn’t work .find the following

#overscan_left=20
#overscan_right=12
#overscan_top=10
#overscan_bottom=10

try some combination by changing values and removing Hash (#).

If Still the problem continues comment below I will help you and if it works for you .please give us a comment

note:

The below comment form won’t work on the amp version. you can comment on non-amp versions

8 thoughts on “3 ways to get Rid of raspberry pi black border in display(2023)”

  1. I have recently started a website, the information you offer on this site has helped me greatly. Thank you for all of your time & work. Sande Lorin Antonin

  2. Hi
    Trying Debian on my rpi. But can’t figure out how to remove the black borders. The things you are saying are not present on debian.

  3. Andrinea C Murphy

    Hi,
    I tried it and it fixed my panel to the right size which is great but I still have borders on the side. I’ve tried so many things just not sure what could be controlling it.

    Can you still help?

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.


Notice: ob_end_flush(): Failed to send buffer of zlib output compression (0) in /home/hackerst/public_html/wp-includes/functions.php on line 5349