9.0-RC2: regression in power management on VIA Samuel 2

kron kron24 at gmail.com
Mon Nov 14 18:45:25 UTC 2011


Hi,

I have a few machines (mostly routers) with VIA Samuel 2.
FreeBSD 9.0-RC2 breaks power management on them.

8.2-RELEASE detects:

   CPU: VIA Samuel 2 (532.64-MHz 686-class CPU)
     Origin = "CentaurHauls"  Id = 0x673  Family = 6  Model = 7
     Stepping = 3
     Features=0x803035<FPU,DE,TSC,MSR,MTRR,PGE,MMX>

and sysctl dev.cpu.0 says:

   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: 532
   dev.cpu.0.freq_levels: 532/-1 266/-1
   dev.cpu.0.cx_supported: C1/0 C2/90 C3/900
   dev.cpu.0.cx_lowest: C2
   dev.cpu.0.cx_usage: 0.45% 99.54% 0.00% last 783us

In 8.2 I can use dev.cpu.0.cx_lowest=C2 in /etc/sysctl.conf
and powerd runs fine switching between 532 and 266 MHz.

FreeBSD 9.0-RC2 detects:

   CPU: VIA Samuel 2 (532.65-MHz 686-class CPU)
     Origin = "CentaurHauls"  Id = 0x673  Family = 6  Model = 7
     Stepping = 3
     Features=0x803035<FPU,DE,TSC,MSR,MTRR,PGE,MMX>
     AMD Features=0x80000000<3DNow!>
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the only difference

and sysctl dev.cpu.0 is:

   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.cx_supported: C1/0
   dev.cpu.0.cx_lowest: C1
   dev.cpu.0.cx_usage: 100.00% last 208us

Of course, dev.cpu.0.cx_lowest=C2 is not available and powerd
cannot start - "powerd -v" fails:

   powerd: lookup freq: No such file or directory

I haven't studied sources yet but it seems to me AMD is detected
(wrong) and for that reason a wrong power management code path
takes place.

Is anybody willing to help me with debugging? I have no
experience in such "low level" programming but at least one
spare machine and some time to waste.

TIA,
Oli


More information about the freebsd-stable mailing list