/etc/rc.d/powerd vs. lack of OID dev.cpu.0.freq

David Wolfskill david at catwhisker.org
Thu Mar 17 12:27:14 UTC 2011


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

From /etc/rc.d/powerd:
...
# $FreeBSD: stable/8/etc/rc.d/powerd 180564 2008-07-16 19:50:29Z dougb $
...
powerd_poststop()
{
        sysctl dev.cpu.0.freq=`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 at 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=\_PR_.CPU0
dev.cpu.0.%pnpinfo: _HID=none _UID=0
dev.cpu.0.%parent: acpi0
dev.cpu.0.freq_levels: 2801/35000 2450/30625 2134/16607 1867/14531 1600/15000 1400/13125 1200/11250 1000/9375 800/12000 700/10500 600/9000 500/7500 400/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=\_PR_.CPU1
dev.cpu.1.%pnpinfo: _HID=none _UID=0
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] 

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
-- 
David H. Wolfskill				david at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20110317/c8a02d1b/attachment.pgp


More information about the freebsd-current mailing list