diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2015-11-22 09:40:08 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2015-11-22 09:40:08 +0000 |
commit | f03acee44c3badd17aefb5d177430c9dd06fba63 (patch) | |
tree | fec1d9534820c30092e23b04a9ee5d98792364b0 /sys/dev | |
parent | 7f6a3622ac4f6c4370c55aa690fa98cffbb039d8 (diff) |
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@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/acpi/acpi.c | 4 |
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; |