Difference between revisions of "Misc guides"

From sudomod
Jump to: navigation, search
m (Raspberry Pi Zero Pinouts: Added USB & power pinouts diagram)
m (Power optimization: fixing a bad link)
Line 5: Line 5:
 
== Power optimization ==
 
== Power optimization ==
  
Forum User Yaya has an excellent power management and optimization post located [https://upload.wikimedia.org/wikipedia/commons/8/83/Composite_Video.svg here].
+
Forum User Yaya has an excellent power management and optimization post located [http://www.sudomod.com/forum/viewtopic.php?f=43&t=4258#p46032 here].
  
 
Note that these optimizations assume SSH or CLI access.
 
Note that these optimizations assume SSH or CLI access.

Revision as of 21:47, 30 November 2017

Raspberry Pi Zero Pinouts

USB Data & Power Solder Points

PiZeroConnections usbpower.png

Power optimization

Forum User Yaya has an excellent power management and optimization post located here.

Note that these optimizations assume SSH or CLI access.

Quick Nano guide:

  • Arrow Keys to move around as expected
  • Ctrl-W to find (Where is)
  • Ctrl-O to save (Write Out)
  • Ctrl-X to Exit (will be prompted to save on exit, press 'n' to exit without saving)
  • On Windows using Putty SSH client, 'paste' is performed by right-clicking with the mouse anywhere in the window, the contents of the clipboard will be pasted at the current cursor location

Disable Samba

If you do not use Samba (Windows File Sharing) to add/backup ROMS, then you can disable it:

sudo ~/RetroPie-Setup/retropie_setup.sh

  1. Choose C : Configuration / tools
  2. Choose 828 : Samba
  3. Choose 2 : Remove Samba Shares
  4. Choose 5 : Remove Samba

Disable ROMService

If you do not use the USB Flash/Thumb drive service, then you can disable it:

sudo ~/RetroPie-Setup/retropie_setup.sh

  1. Choose C : Configuration / tools
  2. Choose 835 : usbromservice
  3. Choose 2 : disable usbromservice scripts

Disable TV and HDMI signals

If you are using an SPI or DPI display (such as Kite's AIO or the MintyPi) then you can disable HDMI and Composite/TV circuits:
DO NOT perform this step if you use an HDMI or Composite (such as the GearBest, Adafruit, or BW) screen

/usr/bin/tvservice -o
To disable (will re-enable on reboot).

/usr/bin/tvservice -p
To re-enable (Often breaks and wont re-enable composite, just reboot).

To make permanent:
sudo nano /etc/rc.local
At the bottom, add: /usr/bin/tvservice -o

Disable Pi Status LEDs

sudo nano /boot/config.txt
At the bottom, add:

##########################
#### DISABLE PI STATUS LED ######
##########################
dtparam=act_led_trigger=none
dtparam=act_led_activelow=on

Improve SD Performance

sudo nano /boot/cmdline.txt
Find: elevator=deadline
Change to: elevator=noop
Do not add any extra line breaks, or your Pi may not boot. You can make this edit on a Windows PC viewing the SD card, so make a backup before).

Adjust Swap

To be nicer to the SD card, and to make better use of available RAM, only use swap when its needed.
sudo nano /etc/sysctl.conf
At the end, add:
vm.swappiness = 1

Tweak Filesystem for fewer writes

By default Retropie will write a tiny bit of metadata to the SD card every time a file is even viewed. On write sensitive flash media, this is wasted power and life-shortening.

sudo nano /etc/fstab
Locate the line containing the text /boot. It will normally be the 2nd one. On the same line, find the word defaults.
Change to: defaults,noatime. The 3rd line may already have it, if so, mimic it.

Example:

proc            /proc           proc    defaults          0       0
/dev/mmcblk0p1  /boot           vfat    defaults,noatime          0       2
/dev/mmcblk0p2  /               ext4    defaults,noatime  0       1
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that


Disable Avahi service

Windows Users wont notice this most likely, but Mac & linux users might. With this service disabled you'll need to SSH in using the DNS hostname or the IP adress rather than the simpler 'pi.local' short name.

sudo apt-get purge avahi-daemon -y

Disable Wireless Systems

If not being used, you can disable the on-board Wifi & Bluetooth of the Pi3 and Zero W to save power.

sudo nano /boot/config.txt
At the bottom, add:

Wifi

##########################
#### DISABLE Wifi ######
##########################
dtoverlay=pi3-disable-wifi

Bluetooth

#########################
#### DISABLE BLUETOOTH ######
##########################
dtoverlay=pi3-disable-bt