Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Mar 2011 04:51:12 -0700
From:      David Wolfskill <david@catwhisker.org>
To:        current@freebsd.org
Subject:   /etc/rc.d/powerd vs. lack of OID dev.cpu.0.freq
Message-ID:  <20110317115112.GA3723@albert.catwhisker.org>

next in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110317115112.GA3723>