Optimize headless rPi OS settings

file: optimize-rPi-memory-boot_time.txt

#turn off hdmi to save power:
in /etc/rc.local add “/usr/bin/tvservice -o” before “return 0”

#turn off audio to save memory and interrupt issues:
in /boot/config.txt turn “on” to “off” “dtparam=audio=off”
in /etc/modprobe.d/raspi-blacklist.conf add “blacklist snd_bcm2835”

#speed up boot by changing network wait time, remove /var/swap, turn off ipv6
#in /etc/systemd/system/network-online.target.wants/networking.service change “TimeoutStartSec=5min” to “TimeoutStartSec=1”
#in /etc/dphys-swapfile change “CONF_SWAPSIZE=100” to “CONF_SWAPSIZE=0”
in /etc/sysctl.conf" add “net.ipv6.conf.all.disable_ipv6 = 1”
in /etc/modprobe.d/ipv6.conf add “blacklist ipv6”
in /etc/modprobe.d/ipv6.conf change “#alias ipv6 off” to “alias ipv6 off”