summaryrefslogtreecommitdiff
path: root/pm/power.d/laptop-mode
diff options
context:
space:
mode:
Diffstat (limited to 'pm/power.d/laptop-mode')
-rw-r--r--pm/power.d/laptop-mode3
1 files changed, 3 insertions, 0 deletions
diff --git a/pm/power.d/laptop-mode b/pm/power.d/laptop-mode
index 0e35f67..52a8452 100644
--- a/pm/power.d/laptop-mode
+++ b/pm/power.d/laptop-mode
@@ -5,6 +5,7 @@ VM="/proc/sys/vm"
[ -f $VM/laptop_mode -a -f $VM/dirty_ratio ] || exit $NA
laptop_mode_ac() {
+ # disable laptop mode, set vm parameters back to sane defaults
echo 0 >$VM/laptop_mode
echo 5 >$VM/dirty_background_ratio
echo 2999 >$VM/dirty_expire_centisecs
@@ -13,6 +14,8 @@ laptop_mode_ac() {
}
laptop_mode_battery() {
+ # enable laptop mode, set vm parameters to buffer as many writes as
+ # possible.
echo 1 >$VM/laptop_mode
echo 1 >$VM/dirty_background_ratio
echo 60000 >$VM/dirty_expire_centisecs