← Older revision
Revision as of 12:03, 28 September 2012
Line 4:
Line 4:
{{Article summary heading|Related}}
{{Article summary heading|Related}}
{{Article summary wiki|Pm-utils}}
{{Article summary wiki|Pm-utils}}
+
{{Article summary wiki|Udev}}
{{Article summary wiki|Display Power Management Signaling}}
{{Article summary wiki|Display Power Management Signaling}}
{{Article summary end}}
{{Article summary end}}
Line 9:
Line 10:
Powerdown is a bunch of scripts to take the hassle out of maximizing battery-life.
Powerdown is a bunch of scripts to take the hassle out of maximizing battery-life.
−
{{
Note
|Use at your own risk. It is recommended to read through all the tweaks in order to disable those that might not be compatible with your system.}}
+
{{
Warning
|Use at your own risk. It is recommended to read through all the tweaks in order to disable those that might not be compatible with your system.}}
==Installation==
==Installation==
Line 42:
Line 43:
|-
|-
| powerdown, powerup || Powers everything down or up.
| 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.
| 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-mem || Suspends to RAM.
Line 49:
Line 54:
| suspend-to-disk || Suspends to HDD, creates a 2GB swap file at the first time doing so.
| suspend-to-disk || Suspends to HDD, creates a 2GB swap file at the first time doing so.
|-
|-
−
|
turn
-
off
||
Wrapper around poweroff
.
+
|
suspend
-
hybrid
||
First, suspends to RAM
.
After 10 minutes
,
wakes up and suspends to HDD
.
−
|-
+
−
| usb-bind
,
usb-unbind || Both are probably called by the other scripts
.
+
|-
|-
| pm-is-supported, pm-powersave, pm-suspend, pm-hibernate || Wrappers with pm-utils syntax (for legacy support?).
| pm-is-supported, pm-powersave, pm-suspend, pm-hibernate || Wrappers with pm-utils syntax (for legacy support?).
Line 58:
Line 61:
After a reboot the scripts can now be run in a terminal.
After a reboot the scripts can now be run in a terminal.
−
Powerdown is automatically loaded by a
udev
rule, so no daemon, rc-script or service-file
should be
necessary.
+
Powerdown is automatically loaded by a
[[Udev]]
rule, so no daemon, rc-script or service-file
is
necessary.
−
+
−
Here's an example for a slightly more sophisticated script that uses either powerdown or powerup depending on your current power supply:
+
−
if grep -Fxq "0" /sys/class/power_supply/AC0/online; then
+
−
powerdown
+
−
else
+
−
powerup
+
−
fi
+
−
+
−
+
−
Modify "/sys/class/power_supply/AC0/online" line if necessary so that it corresponds with your system.
+
−
Save this as a script and have it run from /etc/rc.local
+
If it does not run automatically at power state change, add "upower -e" to your ~/.xinitrc
If it does not run automatically at power state change, add "upower -e" to your ~/.xinitrc