From ebb09f23989a134bf1f8a66de179652c0dbdd51a Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sun, 3 Jun 2007 22:14:08 +0000 Subject: the kernel starts with setperf=100, even though the bios may have throttled. this confuses apmd, so when using auto adjust modes, first cycle through 0 and 100 to make sure we're in a known state. ok deraadt --- usr.sbin/apmd/apmd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/usr.sbin/apmd/apmd.c b/usr.sbin/apmd/apmd.c index 45f1cb5ef1a..a96d7a9f155 100644 --- a/usr.sbin/apmd/apmd.c +++ b/usr.sbin/apmd/apmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apmd.c,v 1.46 2007/04/28 06:42:43 sturm Exp $ */ +/* $OpenBSD: apmd.c,v 1.47 2007/06/03 22:14:07 tedu Exp $ */ /* * Copyright (c) 1995, 1996 John T. Kohl @@ -632,6 +632,10 @@ main(int argc, char *argv[]) if (sysctl(ncpu_mib, 2, &ncpu, &ncpu_sz, NULL, 0) < 0) error("cannot read hw.ncpu", NULL); + if (doperf == PERF_AUTO || doperf == PERF_COOL) { + setperf(0); + setperf(100); + } for (;;) { int rv; -- cgit v1.2.3