Connect to your Raspberry Pi via SSH with the following command:
For RetroPie, you can connect using the hostname
The default password is
If your Pi doesn't have Internet access, you can instead remove its SD card and put it into your computer.
boot/config.txt file to make the change:
sudo nano /boot/config.txt
Change this line:
Then, save the file and exit.
If you're using the SD card method, you can browse to this file on your computer and edit it using a plaintext editor (like Notepad) instead.
Reboot your Pi for the changes to take effect:
Graphics on your Raspberry Pi will now take up the entire screen without the black border. You're all done!
So you've just finished setting up your Raspberry Pi touchscreen, and it's upside-down.