Incorrect solution to a minor problem.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
Juliana Rat 91aab15a11 Merge with-overclocking branch 2 months ago Add archive explanation 2 months ago
check-overscan Switch to pure sh 2 months ago
check-overscan-with-overclocking Merge with-overclocking branch 2 months ago
check-overscan.service Re-write; unify installation scripts 2 months ago Replace external cp with a shell function 2 months ago


A pure shell script and systemd service unit file to ensure overscan is disabled on Raspberry Pis running Debian-based systems.

Important Note

It has come to my attention that the problem this service seeks to resolve has a different intended resolution. If one creates a file called /etc/default/raspi-firmware-custom on a vanilla Debian 64-bit Raspberry Pi image (and probably others), anything in it is appened to /boot/firmware/config.txt. As such, this repository is being archived and all development is ceasing. The archive now exists primarily as a reference for me in the future.


The contents of this directory are simply:

  • check-overscan: a shell script to check if disable_overscan=1 is in the Raspberry Pi's config.txt file and add it if it isn't
  • check-overscan.service: a systemd unit file to run at shutdown or reboot
  • a shell script to install and enable the script and service, as well as disable and uninstall them (in that order)
  • this document


On the vanilla Debian arm64 Raspberry Pi image, updating the kernel overwrites any changes made to config.txt. This script and service make sure you don't forget to add back disable_overscan=1.

How (Usage)

To install the service, simply download this repository (such as cloning it with git), enter it, and run with root privileges.

git clone
cd rpi-check-overscan
sudo sh

To uninstall it, simply run again with --uninstall or -u.

cd rpi-check-overscan
sudo sh --uninstall

Note that on Raspberry Pi OS, the Raspberry Pi Foundation's spin of Debian, the path to config.txt is slightly different. For these cases, simply edit the path for configFile in with a text editor.


There are two maintained branches of this repository: one with only the overscan check, and one (that I use) which also adds overclocking if there is no overscan. Please note that this uses the maximum stable overclocking reported in Magpi's article on overclocking the Raspberry Pi 4. If you wish to use it, make sure you have proper cooling and a good-quality power source. I use the official Raspberry Pi power cord and an ICE Tower kit from GeeekPi on Amazon (I know, crucify me later). Corsair has a quality passive cooling case, as do others. Check some comparisons of different options to pick what works best for you. Just do not overclock without some cooling. I am not liable for anything you do to your Pi; I'm just here to facilitate it.