summaryrefslogtreecommitdiffstats
path: root/etc/devd
diff options
context:
space:
mode:
authorjhibbits <jhibbits@FreeBSD.org>2014-10-12 19:12:48 +0000
committerjhibbits <jhibbits@FreeBSD.org>2014-10-12 19:12:48 +0000
commit71bc2d78463933cae06f488e3121ad429ca6786f (patch)
tree0e9e64a5938e4732510eb4c46a49397fbac1a6b0 /etc/devd
parent5607da901dcfd962c7dc0fdfd4202ce8dd771131 (diff)
downloadFreeBSD-src-71bc2d78463933cae06f488e3121ad429ca6786f.zip
FreeBSD-src-71bc2d78463933cae06f488e3121ad429ca6786f.tar.gz
Add an AC line monitor so power_profile can work
Summary: Add a polling loop (1Hz) to monitor the battery and AC status, to notify devd like ACPI does for power monitoring. This allows /etc/rc.d/power_profile to work on PowerPC laptops Test Plan: Tested on a Titanium PowerBook, configuring economy_cpu_freq and performance_cpu_freq, disabling powerd. Reviewers: #powerpc, nwhitehorn Reviewed By: nwhitehorn Subscribers: rpaulo Differential Revision: https://reviews.freebsd.org/D937
Diffstat (limited to 'etc/devd')
-rw-r--r--etc/devd/apple.conf8
1 files changed, 7 insertions, 1 deletions
diff --git a/etc/devd/apple.conf b/etc/devd/apple.conf
index 8518890..7f066cd 100644
--- a/etc/devd/apple.conf
+++ b/etc/devd/apple.conf
@@ -71,4 +71,10 @@ notify 0 {
action "camcontrol eject cd0";
};
-
+# Equivalent to the ACPI/ACAD notify
+notify 10 {
+ match "system" "PMU";
+ match "subsystem" "POWER";
+ match "type" "ACLINE";
+ action "/etc/rc.d/power_profile $notify";
+}
OpenPOWER on IntegriCloud