Skip to content

Instantly share code, notes, and snippets.

@UnJavaScripter
Last active September 18, 2022 23:08
Show Gist options
  • Save UnJavaScripter/134464bf56e3082be11e3d3aa147edc0 to your computer and use it in GitHub Desktop.
Save UnJavaScripter/134464bf56e3082be11e3d3aa147edc0 to your computer and use it in GitHub Desktop.
Tweaks to make things look better on a raspberry pi official touchscreen
# /boot/config.txt
#####
# Commenting out `dtoverlay=vc4-fkms-v3d` as disabling GPU acceleration is required in order to be able to rotate the lcd.
# More memory is assigned to the GPU by setting a new value to `gpu_mem`
# `lcd_rotate=2` Rotates the display by 180°
#####
# ...
[all]
# dtoverlay=vc4-fkms-v3d
gpu_mem=128
lcd_rotate=2
# /etc/lightdm/lightdm.conf
#####
# `-nocursor` hides the cursor
######
# ...
# xserver-command=X
xserver-command=X -nocursor
#!/bin/bash
val=$1
if [ -z "$val" ]
then
echo "\nPass in a brightness value between 0 and 255, for example:\n $ sh ${0} 50\n"
else
sudo bash -c "echo $1 > /sys/class/backlight/rpi_backlight/brightness"
echo "\nDisplay brigthness set to $val.\n"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment