Powerdown
Related articles
Powerdown is a bunch of scripts by Taylorchu that combine all sorts of settings to make your computer consume less energy and thus save batterylife.
Contents
Installation
powerdown-gitAUR is available from the AUR.
Add the following lines to ~/.xinitrc
to turn off your screen after 5 minutes of idling by default:
~/.xinitrc
# screen powersave xset +dpms xset dpms 0 0 300
The powerdown
shell script located in /usr/bin
can be customised to your needs. To disable any undesired features simply comment out its appropriate line.
Usage
The following table presents all scripts installed.
Name | Function |
---|---|
powerdown, powerup | Powers everything down or up. |
powerdown-functions | Defines functions that are used by powerdown and powerup. |
powernow | Displays current power usage and settings. |
powerdown.rules | The Udev rule that loads powerdown or powerup. |
suspend-to-mem | Suspends to RAM. |
suspend-to-disk | Suspends to HDD, creates a 2GB swap file at the first time doing so. |
suspend-hybrid | First, suspends to RAM. After 10 minutes, wakes up and suspends to HDD. |
pm-is-supported, pm-powersave, pm-suspend, pm-hibernate | Wrappers with pm-utils syntax (for legacy support?). |
After a reboot the scripts can now be run in a terminal.
Automatically running powerdown at power state changes
Powerdown is automatically loaded by a Udev rule, so no daemon, rc-script or service-file is necessary.
However, this doesn't work on every machine, so you might want to enable upower.service in systemd with
# systemctl enable upower.service
or add upower -e
to your .xinitrc
.
Configuration
As there are no config files for powerdown, you have to edit /usr/bin/powerdown
by hand and adjust the values. Note, however, that these changes will be overwritten during an update!
FAQ
I do get more spinups and clicks from my HDD. Where is this setting stored in powerdown?
Set the following tweak to a higher value:
hdparm -B