-
Notifications
You must be signed in to change notification settings - Fork 20
/
lowpower.sh
33 lines (25 loc) · 955 Bytes
/
lowpower.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash -ve
# For additional power savings, you can reduce the number of interrupts (with
# slower network speeds) by adding dwc_otg.speed=1 to your /boot/config.txt
# file. You can also add dwc_otg.fiq_fix_enable=1 to reduce the number of
# interrupts.
# Disable display
tvservice -o
# Turn off LEDs on Pi zero. From
# http://www.jeffgeerling.com/blogs/jeff-geerling/controlling-pwr-act-leds-raspberry-pi
echo none | sudo tee /sys/class/leds/led0/trigger
echo 1 | sudo tee /sys/class/leds/led0/brightness
# Remove some unneeded kernel modules
rmmod w1_gpio || true
rmmod wire || true
rmmod snd_bcm2835 snd_pcm snd_timer snd || true
rmmod bluetooth || true
# ... and services
systemctl stop avahi-daemon.service
systemctl disable avahi-daemon.service
systemctl stop triggerhappy.service
systemctl disable triggerhappy.service
# Enable powertop auto tuner
/usr/sbin/powertop --auto-tune
# Ensure system time is current
/usr/sbin/ntpdate-debian