summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2015-11-22 09:40:07 +0000
committerreyk <reyk@openbsd.org>2015-11-22 09:40:07 +0000
commit432b8435e01722db919dfcd91f87467cd6b0ea71 (patch)
treef3f193fdf74b604f0ede60afe7b77ec10ff6baf6
parentThis man page uses "Note that" profusely, which is generally considered (diff)
downloadwireguard-openbsd-432b8435e01722db919dfcd91f87467cd6b0ea71.tar.xz
wireguard-openbsd-432b8435e01722db919dfcd91f87467cd6b0ea71.zip
The "CRITICAL" APM battery level, that is exported/faked by the ACPI
stack, is currently set to 25%. With 25% battery left, a typical modern laptop will have at least one hour runtime left. It is an arbitrary value, and other APM power layers in the kernel set CRITICAL to something like 5% or 10%, so set it to 10% for now. OK mlarkin@
-rw-r--r--sys/dev/acpi/acpi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c
index 50f46abcf76..75de2c95834 100644
--- a/sys/dev/acpi/acpi.c
+++ b/sys/dev/acpi/acpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi.c,v 1.295 2015/09/28 18:36:36 deraadt Exp $ */
+/* $OpenBSD: acpi.c,v 1.296 2015/11/22 09:40:07 reyk Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
@@ -2924,7 +2924,7 @@ acpiioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
pi->battery_life = remaining / bats;
if (pi->battery_life > 50)
pi->battery_state = APM_BATT_HIGH;
- else if (pi->battery_life > 25)
+ else if (pi->battery_life > 10)
pi->battery_state = APM_BATT_LOW;
else
pi->battery_state = APM_BATT_CRITICAL;