From owner-freebsd-current@FreeBSD.ORG Thu Mar 17 12:27:14 2011 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3DFF1065670 for ; Thu, 17 Mar 2011 12:27:14 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (m209-73.dsl.rawbw.com [198.144.209.73]) by mx1.freebsd.org (Postfix) with ESMTP id 8F7A98FC15 for ; Thu, 17 Mar 2011 12:27:14 +0000 (UTC) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.4/8.14.4) with ESMTP id p2HBpCb5003808 for ; Thu, 17 Mar 2011 04:51:12 -0700 (PDT) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.4/8.14.4/Submit) id p2HBpCl5003807 for current@freebsd.org; Thu, 17 Mar 2011 04:51:12 -0700 (PDT) (envelope-from david) Date: Thu, 17 Mar 2011 04:51:12 -0700 From: David Wolfskill To: current@freebsd.org Message-ID: <20110317115112.GA3723@albert.catwhisker.org> Mail-Followup-To: David Wolfskill , current@freebsd.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="h31gzZEtNLTqOjlF" Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: /etc/rc.d/powerd vs. lack of OID dev.cpu.0.freq X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Mar 2011 12:27:14 -0000 --h31gzZEtNLTqOjlF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I run powerd(8) on my laptop, and track both stable/8 and head on it (on different slices), daily. I am now finally(!) getting around to pointing out that it appears that: * /etc/rc.d/powerd tries to make use of sysctl OID dev.cpu.0.freq. * That OID exists in stable/8. * It does not exist in head, certainly as of r219711. * The OID dev.cpu.0.freq_levels does exist (in both). =46rom /etc/rc.d/powerd: =2E.. # $FreeBSD: stable/8/etc/rc.d/powerd 180564 2008-07-16 19:50:29Z dougb $ =2E.. powerd_poststop() { sysctl dev.cpu.0.freq=3D`sysctl -n dev.cpu.0.freq_levels | sed -e 's:/.*::'` > /dev/null } FreeBSD g1-222.catwhisker.org. 9.0-CURRENT FreeBSD 9.0-CURRENT #169 r219711= : Thu Mar 17 04:19:43 PDT 2011 root@g1-222.catwhisker.org.:/usr/obj/usr= /src/sys/CANARY i386 g1-222(9.0-C)[7] sysctl dev.cpu dev.cpu.0.%desc: ACPI CPU dev.cpu.0.%driver: cpu dev.cpu.0.%location: handle=3D\_PR_.CPU0 dev.cpu.0.%pnpinfo: _HID=3Dnone _UID=3D0 dev.cpu.0.%parent: acpi0 dev.cpu.0.freq_levels: 2801/35000 2450/30625 2134/16607 1867/14531 1600/150= 00 1400/13125 1200/11250 1000/9375 800/12000 700/10500 600/9000 500/7500 40= 0/6000 300/4500 200/3000 100/1500 dev.cpu.0.cx_supported: C1/1 C2/1 C3/162 dev.cpu.0.cx_lowest: C1 dev.cpu.0.cx_usage: 100.00% 0.00% 0.00% last 309us dev.cpu.1.%desc: ACPI CPU dev.cpu.1.%driver: cpu dev.cpu.1.%location: handle=3D\_PR_.CPU1 dev.cpu.1.%pnpinfo: _HID=3Dnone _UID=3D0 dev.cpu.1.%parent: acpi0 dev.cpu.1.cx_supported: C1/1 C2/1 C3/162 dev.cpu.1.cx_lowest: C1 dev.cpu.1.cx_usage: 100.00% 0.00% 0.00% last 418us g1-222(9.0-C)[8]=20 The effect, of course, is that on shutdown, a whine is generated to the console, complaining about that lack of dev.cpu.0.freq. A quick glance at /usr/src/usr.sbin/powerd/powerd.c ($FreeBSD: head/usr.sbin/powerd/powerd.c 211415 2010-08-17 09:11:38Z brucec= $) also shows it attempting to work with dev.cpu.0.freq. Am I managing to overlook something fairly significant here? The hardware in question is a Dell Precision M4400. Peace, david --=20 David H. Wolfskill david@catwhisker.org Depriving a girl or boy of an opportunity for education is evil. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --h31gzZEtNLTqOjlF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iEYEARECAAYFAk2B9a8ACgkQmprOCmdXAD0c0wCdGFYwiqH3vQIwdTHEYgvHtO+4 glIAnj2Uzkt4DROxw5Wwzqxz8wbEW+TO =f44i -----END PGP SIGNATURE----- --h31gzZEtNLTqOjlF--