2.3 and PowerD



  • Prior to 2.3, I've been using powerd with zero problems. After the update, I spotted the following message in the logs:

    rc.bootup: The command '/usr/sbin/powerd -b hadp -a hadp -n hadp' returned exit code '69', the output was 'powerd: no cpufreq(4) support -- aborting: No such file or directory'
    

    A quick search didn't show anyone else with pfSense having this problem. I did find an older post on the FreeBSD forums for 10.2, but unsure how relevant it is to this case: https://forums.freebsd.org/threads/52827/

    dmesg:

    Copyright (c) 1992-2016 The FreeBSD Project.
    Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
    	The Regents of the University of California. All rights reserved.
    FreeBSD is a registered trademark of The FreeBSD Foundation.
    FreeBSD 10.3-RELEASE #5 05adf0a(RELENG_2_3_0): Mon Apr 11 18:56:05 CDT 2016
        root@ce23-i386-builder:/builder/pfsense-230/tmp/obj/builder/pfsense-230/tmp/FreeBSD-src/sys/pfSense i386
    FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
    CPU: Intel(R) Pentium(R) 4 CPU 2.80GHz (2793.06-MHz 686-class CPU)
      Origin="GenuineIntel"  Id=0xf41  Family=0xf  Model=0x4  Stepping=1
      Features=0xbfebfbff <fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,htt,tm,pbe>Features2=0x441d <sse3,dtes64,mon,ds_cpl,cnxt-id,xtpr>TSC: P-state invariant
    real memory  = 1342177280 (1280 MB)
    avail memory = 1279033344 (1219 MB)
    Event timer "LAPIC" quality 400
    ACPI APIC Table: <dell  de051 ="">random: <software, yarrow="">initialized
    ioapic0: Changing APIC ID to 1
    ioapic0 <version 2.0="">irqs 0-23 on motherboard
    wlan: mac acl policy registered
    ipw_bss: You need to read the LICENSE file in /usr/share/doc/legal/intel_ipw/.
    ipw_bss: If you agree with the license, set legal.intel_ipw.license_ack=1 in /boot/loader.conf.
    module_register_init: MOD_LOAD (ipw_bss_fw, 0xc081eb80, 0) error 1
    ipw_ibss: You need to read the LICENSE file in /usr/share/doc/legal/intel_ipw/.
    ipw_ibss: If you agree with the license, set legal.intel_ipw.license_ack=1 in /boot/loader.conf.
    module_register_init: MOD_LOAD (ipw_ibss_fw, 0xc081ec30, 0) error 1
    ipw_monitor: You need to read the LICENSE file in /usr/share/doc/legal/intel_ipw/.
    ipw_monitor: If you agree with the license, set legal.intel_ipw.license_ack=1 in /boot/loader.conf.
    module_register_init: MOD_LOAD (ipw_monitor_fw, 0xc081ece0, 0) error 1
    iwi_bss: You need to read the LICENSE file in /usr/share/doc/legal/intel_iwi/.
    iwi_bss: If you agree with the license, set legal.intel_iwi.license_ack=1 in /boot/loader.conf.
    module_register_init: MOD_LOAD (iwi_bss_fw, 0xc08466d0, 0) error 1
    iwi_ibss: You need to read the LICENSE file in /usr/share/doc/legal/intel_iwi/.
    iwi_ibss: If you agree with the license, set legal.intel_iwi.license_ack=1 in /boot/loader.conf.
    module_register_init: MOD_LOAD (iwi_ibss_fw, 0xc0846780, 0) error 1
    iwi_monitor: You need to read the LICENSE file in /usr/share/doc/legal/intel_iwi/.
    iwi_monitor: If you agree with the license, set legal.intel_iwi.license_ack=1 in /boot/loader.conf.
    module_register_init: MOD_LOAD (iwi_monitor_fw, 0xc0846830, 0) error 1
    netmap: loaded module
    kbd1 at kbdmux0
    cryptosoft0: <software crypto="">on motherboard
    padlock0: No ACE support.
    acpi0: <dell de051 ="">on motherboard
    acpi0: Power Button (fixed)
    cpu0: <acpi cpu="">on acpi0
    atrtc0: <at realtime="" clock="">port 0x70-0x7f irq 8 on acpi0
    Event timer "RTC" frequency 32768 Hz quality 0
    attimer0: <at timer="">port 0x40-0x5f irq 0 on acpi0
    Timecounter "i8254" frequency 1193182 Hz quality 0
    Event timer "i8254" frequency 1193182 Hz quality 100
    Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
    acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
    acpi_button0: <power button="">on acpi0
    pcib0: <acpi host-pci="" bridge="">port 0xcf8-0xcff on acpi0
    pci0: <acpi pci="" bus="">on pcib0
    vgapci0: <vga-compatible display="">port 0xed98-0xed9f mem 0xf0000000-0xf7ffffff,0xfeb80000-0xfebfffff irq 16 at device 2.0 on pci0
    agp0: <intel 82865g="" (865g="" gmch)="" svga="" controller="">on vgapci0
    agp0: aperture size is 128M, detected 892k stolen memory
    vgapci0: Boot video device
    uhci0: <intel 82801eb="" (ich5)="" usb="" controller="" usb-a="">port 0xff80-0xff9f irq 16 at device 29.0 on pci0
    usbus0 on uhci0
    uhci1: <intel 82801eb="" (ich5)="" usb="" controller="" usb-b="">port 0xff60-0xff7f irq 19 at device 29.1 on pci0
    usbus1 on uhci1
    uhci2: <intel 82801eb="" (ich5)="" usb="" controller="" usb-d="">port 0xff20-0xff3f irq 16 at device 29.3 on pci0
    usbus2 on uhci2
    ehci0: <intel 82801eb="" r="" (ich5)="" usb="" 2.0="" controller="">mem 0xffa80800-0xffa80bff irq 23 at device 29.7 on pci0
    usbus3: EHCI version 1.0
    usbus3 on ehci0
    pcib1: <acpi pci-pci="" bridge="">at device 30.0 on pci0
    pci1: <acpi pci="" bus="">on pcib1
    dc0: <admtek 10="" an983="" 100basetx="">port 0xde00-0xdeff mem 0xfe9fec00-0xfe9fefff irq 22 at device 1.0 on pci1
    miibus0: <mii bus="">on dc0
    ukphy0: <generic ieee="" 802.3u="" media="" interface="">PHY 1 on miibus0
    ukphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
    dc0: Ethernet address: 00:04:5a:72:43:e0
    fxp0: <intel 100="" 82801ba="" (d865)="" pro="" ve="" ethernet="">port 0xddc0-0xddff mem 0xfe9ff000-0xfe9fffff irq 20 at device 8.0 on pci1
    miibus1: <mii bus="">on fxp0
    inphy0: <i82562et 10="" 100="" media="" interface="">PHY 1 on miibus1
    inphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow
    fxp0: Ethernet address: 00:16:76:2b:b5:0b
    isab0: <pci-isa bridge="">at device 31.0 on pci0
    isa0: <isa bus="">on isab0
    atapci0: <intel ich5="" udma100="" controller="">port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf mem 0xfeb7fc00-0xfeb7ffff irq 18 at device 31.1 on pci0
    ata0: <ata channel="">at channel 0 on atapci0
    ata1: <ata channel="">at channel 1 on atapci0
    pcm0: <intel ich5="" (82801eb)="">port 0xee00-0xeeff,0xedc0-0xedff mem 0xfeb7fa00-0xfeb7fbff,0xfeb7f900-0xfeb7f9ff irq 17 at device 31.5 on pci0
    pcm0: primary codec not ready!
    pcm0: <analog devices="" ad1980="" ac97="" codec="">uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
    ppc0: <parallel port="">port 0x378-0x37f,0x778-0x77f irq 7 on acpi0
    ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
    ppc0: FIFO with 16/16/8 bytes threshold
    ppbus0: <parallel port="" bus="">on ppc0
    lpt0: <printer>on ppbus0
    lpt0: Interrupt-driven port
    ppi0: <parallel i="" o="">on ppbus0
    pmtimer0 on isa0
    orm0: <isa option="" roms="">at iomem 0xc0000-0xca7ff,0xca800-0xcbfff pnpid ORM0000 on isa0
    sc0: <system console="">at flags 0x100 on isa0
    sc0: VGA <16 virtual consoles, flags=0x300>
    vga0: <generic isa="" vga="">at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
    atkbdc0: <keyboard controller="" (i8042)="">at port 0x60,0x64 on isa0
    atkbd0: <at keyboard="">irq 1 on atkbdc0
    kbd0 at atkbd0
    atkbd0: [GIANT-LOCKED]
    random: unblocking device.
    usbus0: 12Mbps Full Speed USB v1.0
    Timecounters tick every 1.000 msec
    IPsec: Initialized Security Association Processing.
    usbus1: 12Mbps Full Speed USB v1.0
    usbus2: 12Mbps Full Speed USB v1.0
    usbus3: 480Mbps High Speed USB v2.0
    ugen1.1: <intel>at usbus1
    uhub0: <intel 1="" 9="" uhci="" root="" hub,="" class="" 0,="" rev="" 1.00="" 1.00,="" addr="">on usbus1
    ugen0.1: <intel>at usbus0
    uhub1: <intel 1="" 9="" uhci="" root="" hub,="" class="" 0,="" rev="" 1.00="" 1.00,="" addr="">on usbus0
    ugen3.1: <intel>at usbus3
    uhub2: <intel 1="" 9="" ehci="" root="" hub,="" class="" 0,="" rev="" 2.00="" 1.00,="" addr="">on usbus3
    ugen2.1: <intel>at usbus2
    uhub3: <intel 1="" 9="" uhci="" root="" hub,="" class="" 0,="" rev="" 1.00="" 1.00,="" addr="">on usbus2
    ata0: DMA limited to UDMA33, controller found non-ATA66 cable
    ada0 at ata0 bus 0 scbus0 target 0 lun 0
    ada0: <wdc wd1600jb-75gvc0="" 08.02d08="">ATA-6 device
    ada0: Serial Number WD-WCAL98539008
    ada0: 33.300MB/s transfers (UDMA2, PIO 8192bytes)
    ada0: 152587MB (312500000 512 byte sectors)
    ada0: Previously was known as ad0
    Timecounter "TSC-low" frequency 1396527615 Hz quality 1000
    Root mount waiting for: usbus3 usbus2 usbus1 usbus0
    uhub0: 2 ports with 2 removable, self powered
    uhub1: 2 ports with 2 removable, self powered
    uhub3: 2 ports with 2 removable, self powered
    Root mount waiting for: usbus3
    Root mount waiting for: usbus3
    Root mount waiting for: usbus3
    uhub2: 8 ports with 8 removable, self powered
    Trying to mount root from ufs:/dev/ad0s1a [rw]...
    fxp0: link state changed to DOWN
    fxp0: link state changed to UP
    dc0: link state changed to UP
    pflog0: promiscuous mode enabled
    DUMMYNET 0 with IPv6 initialized (100409)
    load_dn_sched dn_sched FIFO loaded
    load_dn_sched dn_sched QFQ loaded
    load_dn_sched dn_sched RR loaded
    load_dn_sched dn_sched WF2Q+ loaded
    load_dn_sched dn_sched PRIO loaded
    fxp0: promiscuous mode enabled
    dc0: promiscuous mode enabled
    Accounting enabled</wdc></intel></intel></intel></intel></intel></intel></intel></intel></at></keyboard></generic></system></isa></parallel></printer></parallel></parallel></analog></intel></ata></ata></intel></isa></pci-isa></i82562et></mii></intel></generic></mii></admtek></acpi></acpi></intel></intel></intel></intel></intel></vga-compatible></acpi></acpi></power></at></at></acpi></dell></software></version></software,></dell ></sse3,dtes64,mon,ds_cpl,cnxt-id,xtpr></fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,htt,tm,pbe> 
    

    Thanks for any and all help in advance!



  • I believe that there are some Pentium4 2.80 Ghz CPUs that support intel Enhanced Speed Step that are in a LGA775 package but I don't think the earlier designs did. I'm not certain if they all supported thermal monitoring either.

    If your cpu has Enhanced SpeedStep and thermal monitoring you should have these lines in the dmesg output:

    est0: <enhanced speedstep="" frequency="" control=""> on cpu0
    p4tcc0: <cpu frequency="" thermal="" control=""> on cpu0</cpu></enhanced>
    

    I can't remember what the prior cpu frequency scaling system was called, perhaps it was just SpeedStep. Manufacturers did things differently and BIOS was often cludged to get it working in Windows and nothing else. If you haven't recently ruined your working ACPI with a BIOS update that contains a broken DSDT (Differentiated System Description Table) or SSDT (Secondary Description Table), I think that it is probably a kernel, kernel module, or module config problem.

    To list the kernel modules on your system use:

    ls /boot/kernel | grep -v kernel
    

    Some additional reading that may help:
    https://forums.freebsd.org/threads/172/



  • For future reference, I found the answer, apparently in 10.3,  device.hints automatically disabled the options to enable powerd on this cpu platform. The way  to turn it back on is to change the following options in /boot/device.hints:

    hint.acpi_throttle.0.disabled="0"
    hint.p4tcc.0.disabled="0"

    but after reading https://groups.google.com/forum/#!topic/fa.freebsd.stable/1eY514QprJY, it seems like it might be a moot point in running powerd at all, as far as power  consumption goes.



  • I've got a PC Engines APU with an AMD G-T40E embedded CPU which also lost cpufreq/powerd functionality by default. I also noticed that the CPU never enters a lower C-state than C1 (don't know if it ever did before 2.3).

    So I added hint.acpi_throttle.0.disabled="0" to /boot/loader.conf.local and set hw.acpi.cpu.cx_lowest to C2 in System / Advanced / System Tunables.

    Now I get dev.cpu.0.freq_levels again, and dev.cpu.0.freq shows the powerd HiAdaptive throttling and dev.cpu.0.cx_usage tells me about half of the time is spent in C2.

    
    : sysctl dev.cpu.0
    dev.cpu.0.temperature: 59.5C
    dev.cpu.0.cx_usage: 48.33% 51.66% last 204us
    dev.cpu.0.cx_lowest: C2
    dev.cpu.0.cx_supported: C1/1/0 C2/2/100
    dev.cpu.0.freq_levels: 1000/-1 875/-1 750/-1 625/-1 500/-1 375/-1 250/-1 125/-1
    dev.cpu.0.freq: 125
    
    

    But the CPU temperature is about the same so I suspect I'm trading latency for nothing in return.



  • ACPI throttling / P4TCC don't actually reduce the clock frequency; instead, they just insert idle cycles into the pipeline. This limits peak power, but usually increases average power, as it keeps the CPU awake for longer. You should remove the hint.acpi_throttle.0.disable line and just use hw.acpi.cx_lowest=C2.


Log in to reply