HowTo: Fix Overscan on Raspberry Pi OS

When I first used my Raspberry Pi, I wondered why the full 1920×1080 resolution of my monitor was not taken advantage of. In the preferences of the Pi, the resolution was set to the largest available (not 1080p), but after some research I found you can change a few settings in a configuration file that will remove the black bars (‘overscan’) and enjoy your Raspberry Pi fullscreen.

What is Overscan?

Overscan is a display issue where the edges of the screen appear cropped or cut off, making parts of the user interface, such as the taskbar or menu, invisible. This issue is common when using TVs as monitors, as many televisions apply overscan by default. The Raspberry Pi, when connected to a TV or monitor, may experience overscan problems depending on the display settings.

Identifying Overscan on Raspberry Pi

If you notice that text, icons, or menus are cut off at the edges of the screen when using your Raspberry Pi, you likely have an overscan issue. You may also notice black borders around the screen if underscan is applied.

Fixing Overscan on Raspberry Pi

There are multiple ways to fix overscan issues on your Raspberry Pi, primarily through system settings and configuration file adjustments.

Method 1: Using raspi-config
  • The easiest way to adjust overscan settings is through the Raspberry Pi configuration tool.
  • Open a terminal and type:
sudo raspi-config
  • Navigate to Display Options > Underscan.
  • Choose Disable if parts of the screen are missing (to turn off overscan) or Enable if there are black borders.
  • Press Finish and reboot your Raspberry Pi.
Method 2: Editing config.txt
  • Open a terminal and edit the file using:
sudo nano /boot/config.txt
  • Look for the following lines (or add them if they are missing):
disable_overscan=1
  • Setting this to 1 disables overscan. If you need fine-tuned adjustments, you can manually set the overscan values:
overscan_left=24
overscan_right=24
overscan_top=16
overscan_bottom=16
  • Adjust these values incrementally to fit your screen.
  • Save the file (Ctrl + X, then Y, then Enter) and reboot:
sudo reboot

You might need to change the values stated above as those were specific for my monitor requirements, the default value of overscan for the left, right, top, and bottom edges is 48 for HD CEA modes, 32 for SD CEA modes, and 0 for DMT modes.

Optional Ways

Some TVs have built-in overscan settings that can override Raspberry Pi adjustments. Check your TV’s menu for options like:

  • Screen Fit
  • Just Scan
  • 16:9 Mode
  • PC Mode

Enable one of these options to disable overscan on the TV itself.

OR

There is another fix to this whole issue that allows you to set Raspberry Pi overscan on the fly. It’s in this Github Repository. What Russel has done is create a c program to set the overscan without reboot.

Conclusion

Overscan can be frustrating, but with the right adjustments in raspi-config, config.txt, or your TV settings, you can achieve a properly scaled display. If you continue experiencing issues, try different HDMI cables or test on another display to rule out hardware limitations.

By following these steps, your Raspberry Pi should display everything correctly without any cropped edges or black borders.

Leave a Comment