|
|
|
@ -2,15 +2,34 @@
|
|
|
|
|
A shell script and systemd service unit file to ensure overscan is disabled
|
|
|
|
|
on Raspberry Pis running Debian-based systems.
|
|
|
|
|
|
|
|
|
|
## Overview
|
|
|
|
|
This simply does what it says on the tin. The shell script `check-overscan.sh` does the "hard"
|
|
|
|
|
work of iterating over the lines of `/boot/firmware/config.txt` and adding
|
|
|
|
|
`disable_overscan=1` if it's not found. The unit file `check-overscan.service`
|
|
|
|
|
just tells systemd that we want to run this check on poweroff or reboot, as
|
|
|
|
|
vanilla Debian overwrites `config.txt` on kernel upgrades.
|
|
|
|
|
## What
|
|
|
|
|
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 `check-overscan.sh` at shutdown or reboot
|
|
|
|
|
* `install.sh`: a shell script to install and enable the script and service, as well as disable
|
|
|
|
|
and uninstall them (in that order)
|
|
|
|
|
* `README.md`: this document
|
|
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
You should be able to simply run `install.sh` with privileges (eg `sudo sh install.sh`) and everything
|
|
|
|
|
will be done for you. Note that this has not been tested anywhere but vanilla
|
|
|
|
|
Debian arm64 using Raspberry Pi 4-compatible images. `uninstall.sh` will simply remove the files and disable the service.
|
|
|
|
|
## Why
|
|
|
|
|
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 `install.sh`.
|
|
|
|
|
```
|
|
|
|
|
git clone https://github.com/Marie-Joseph/rpi-check-overscan.git
|
|
|
|
|
cd rpi-check-overscan
|
|
|
|
|
sh install.sh
|
|
|
|
|
```
|
|
|
|
|
To uninstall it, simply run `install.sh` again with `--uninstall` or `-u`.
|
|
|
|
|
```
|
|
|
|
|
cd rpi-check-overscan
|
|
|
|
|
sh install.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 `check-overscan.sh` with a text editor.
|
|
|
|
|