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-mode6
1 files changed, 5 insertions, 1 deletions
diff --git a/pm/power.d/laptop-mode b/pm/power.d/laptop-mode
index 52a8452..aae2335 100644
--- a/pm/power.d/laptop-mode
+++ b/pm/power.d/laptop-mode
@@ -2,7 +2,11 @@
VM="/proc/sys/vm"
-[ -f $VM/laptop_mode -a -f $VM/dirty_ratio ] || exit $NA
+[ -w $VM/laptop_mode -a -w $VM/dirty_ratio ] || exit $NA
+
+# We might only want to enable laptop mode on actual laptops.
+# It really depends on how green we want to try to make the Linux
+# world.
laptop_mode_ac() {
# disable laptop mode, set vm parameters back to sane defaults