1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

AMD FX, powerd, hwpstate

Discussion in 'System Hardware' started by vans9, Apr 18, 2012.

  1. vans9

    vans9 New Member

    Messages:
    7
    Likes Received:
    0
    Hi.

    I've got AMD FX-4100, ASUS M5A97 with the AMD 970, FreeBSD 9.0-RELEASE amd64 GENERIC.

    I've got
    Code:
    hint.acpi_throttle.0.disabled="1"
    debug.hwpstate_verbose="1"
    
    to eliminate acpi_throttle issues.

    If I try to enable powerd (via rc.conf) I get:

    Code:
    Copyright (c) 1992-2012 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 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012
        root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
    CPU: AMD FX(tm)-4100 Quad-Core Processor             (3612.16-MHz K8-class CPU)
      Origin = "AuthenticAMD"  Id = 0x600f12  Family = 15  Model = 1  Stepping = 2
      Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
      Features2=0x1698220b<SSE3,PCLMULQDQ,MON,SSSE3,CX16,SSE4.1,SSE4.2,POPCNT,AESNI,XSAVE,AVX>
      AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
      AMD Features2=0x1c9bfff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,XOP,SKINIT,WDT,LWP,FMA4,NodeId,Topology,<b23>,<b24>>
      TSC: P-state invariant, performance statistics
    real memory  = 8589934592 (8192 MB)
    avail memory = 8158220288 (7780 MB)
    Event timer "LAPIC" quality 400
    ACPI APIC Table: <ALASKA A M I>
    FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
    FreeBSD/SMP: 1 package(s) x 4 core(s)
     cpu0 (BSP): APIC ID: 16
     cpu1 (AP): APIC ID: 17
     cpu2 (AP): APIC ID: 18
     cpu3 (AP): APIC ID: 19
    ACPI Warning: Optional field Pm2ControlBlock has zero address or length: 0x0000000000000000/0x1 (20110527/tbfadt-586)
    ioapic0 <Version 2.1> irqs 0-23 on motherboard
    ioapic1 <Version 2.1> irqs 24-55 on motherboard
    kbd1 at kbdmux0
    cryptosoft0: <software crypto> on motherboard
    aesni0: <AES-CBC,AES-XTS> on motherboard
    acpi0: <ALASKA A M I> on motherboard
    ACPI Error: [RAMB] Namespace lookup failure, AE_NOT_FOUND (20110527/psargs-392)
    ACPI Exception: AE_NOT_FOUND, Could not execute arguments for [RAMW] (Region) (20110527/nsinit-380)
    acpi0: Power Button (fixed)
    Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
    acpi_timer0: <32-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
    cpu0: <ACPI CPU> on acpi0
    cpu1: <ACPI CPU> on acpi0
    cpu2: <ACPI CPU> on acpi0
    cpu3: <ACPI CPU> on acpi0
    acpi_ec0: <Embedded Controller: GPE 0xa> port 0x62,0x66 on acpi0
    hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
    Timecounter "HPET" frequency 14318180 Hz quality 950
    Event timer "HPET" frequency 14318180 Hz quality 450
    Event timer "HPET1" frequency 14318180 Hz quality 450
    Event timer "HPET2" frequency 14318180 Hz quality 450
    ...
    attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0
    Timecounter "i8254" frequency 1193182 Hz quality 0
    Event timer "i8254" frequency 1193182 Hz quality 100
    atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0
    Event timer "RTC" frequency 32768 Hz quality 0
    atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
    atkbd0: <AT Keyboard> irq 1 on atkbdc0
    kbd0 at atkbd0
    atkbd0: [GIANT-LOCKED]
    uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
    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
    ppc0: cannot reserve I/O port range
    hwpstate0: going to fetch info from acpi_perf
    hwpstate0: <Cool`n'Quiet 2.0> on cpu0
    Timecounters tick every 1.000 msec
    ...
    Configuring syscons: keymap blanktime.
    Starting cron.
    Starting inetd.
    
    ...
    hwpstate0: setting P1-state on cpu0
    hwpstate0: result  P0-state on cpu0
    hwpstate0: error: loop is not enough.
    hwpstate0: setting P1-state on cpu1
    hwpstate0: result  P1-state on cpu1
    hwpstate0: setting P1-state on cpu2
    hwpstate0: result  P1-state on cpu2
    hwpstate0: setting P1-state on cpu3
    hwpstate0: result  P1-state on cpu3
    hwpstate0: set freq failed, err 6
    hwpstate0: setting P1-state on cpu0
    hwpstate0: result  P1-state on cpu0
    hwpstate0: setting P1-state on cpu1
    hwpstate0: result  P1-state on cpu1
    hwpstate0: setting P1-state on cpu2
    hwpstate0: result  P1-state on cpu2
    hwpstate0: setting P1-state on cpu3
    hwpstate0: result  P1-state on cpu3
    hwpstate0: setting P2-state on cpu0
    hwpstate0: result  P1-state on cpu0
    hwpstate0: error: loop is not enough.
    hwpstate0: setting P2-state on cpu1
    hwpstate0: result  P2-state on cpu1
    hwpstate0: setting P2-state on cpu2
    hwpstate0: result  P2-state on cpu2
    hwpstate0: setting P2-state on cpu3
    hwpstate0: result  P2-state on cpu3
    hwpstate0: set freq failed, err 6
    hwpstate0: setting P2-state on cpu0
    hwpstate0: result  P2-state on cpu0
    hwpstate0: setting P2-state on cpu1
    hwpstate0: result  P2-state on cpu1
    hwpstate0: setting P2-state on cpu2
    hwpstate0: result  P2-state on cpu2
    hwpstate0: setting P2-state on cpu3
    hwpstate0: result  P2-state on cpu3
    hwpstate0: setting P0-state on cpu0
    hwpstate0: result  P0-state on cpu0
    hwpstate0: setting P0-state on cpu1
    hwpstate0: result  P0-state on cpu1
    hwpstate0: setting P0-state on cpu2
    hwpstate0: result  P0-state on cpu2
    hwpstate0: setting P0-state on cpu3
    hwpstate0: result  P0-state on cpu3
    
    Or if I launch powerd in console:
    Code:
    sf1# powerd -v -n hadp
    powerd: unable to determine AC line status
    load  76%, current freq 3600 MHz ( 0), wanted freq 7200 MHz
    load  32%, current freq 3600 MHz ( 0), wanted freq 7200 MHz
    load  43%, current freq 3600 MHz ( 0), wanted freq 7200 MHz
    load  38%, current freq 3600 MHz ( 0), wanted freq 7200 MHz
    load  39%, current freq 3600 MHz ( 0), wanted freq 7200 MHz
    load  39%, current freq 3600 MHz ( 0), wanted freq 7200 MHz
    load  37%, current freq 3600 MHz ( 0), wanted freq 7200 MHz
    load  20%, current freq 3600 MHz ( 0), wanted freq 6975 MHz
    load  63%, current freq 3600 MHz ( 0), wanted freq 7200 MHz
    ^Ctotal joules used: 47.205
    
    So, my question is: is it a hardware issue (and possibly I have to turn on/off something in BIOS), or do I have to tune something here, in FreeBSD?
     
  2. mav@

    mav@ Member Developer

    Messages:
    615
    Likes Received:
    2
    Sorry, what issue exactly are you talking about?
     
  3. vans9

    vans9 New Member

    Messages:
    7
    Likes Received:
    0
    I mean that the frequency couldn't be set.
     
  4. vans9

    vans9 New Member

    Messages:
    7
    Likes Received:
    0
    Also if I try setting the frequency via sysctl, I get an error too.
     
  5. cydnub

    cydnub New Member

    Messages:
    2
    Likes Received:
    0
    I too am apparently having the same issue, new freebsd FreeBSD 9 release install, AMD Opteron 6212, Supermicro H8SGL-F board. Same error:

    Code:
      hwpstate0: set freq failed err 6
    and I too have in my loader.conf

    Code:
      hint.acpi_throttle.0.disabled="1"
    which has been said to be a workaround, but does not seem to make a difference for me.
     
  6. ikbendeman

    ikbendeman Member

    Messages:
    257
    Likes Received:
    0
    I'm getting the same error message too but without the sysctl hint. Question, why load powerd if you want to disable throttling? Isn't that the point?

    AMD FX 4.0 Ghz 8-core black edition (unlocked)
    Gigabyte 990FX-UD3 (I'll have to double check my mainboard model. But it appears that this bug isn't related to any particular mainboard).

    Kernel hackers: what exactly could be going on here?


    Apologies for bad formatting I'm on my Galaxy S3.
     
  7. ikbendeman

    ikbendeman Member

    Messages:
    257
    Likes Received:
    0
    I mean I'm getting the
    Code:
    hwpstate0: set freq failed err 6
     
  8. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,416
    Likes Received:
    13
    Also with 9.0? Please be advised that FreeBSD 9.0 is End-of-Life. Please upgrade to 9.1.
     
  9. ikbendeman

    ikbendeman Member

    Messages:
    257
    Likes Received:
    0
    No...

    Sorry, no... I should have included this in my original post:

    Code:
    nicholas@******:~ % uname -a
    FreeBSD fbsd.fallout 9.2-RC3 FreeBSD 9.2-RC3 #0 r254795: Sat Aug 24 20:25:04 UTC 2013     root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
    
     
  10. mrhe

    mrhe New Member

    Messages:
    9
    Likes Received:
    0
    Hello, I have the same info in dmesg:
    Code:
    hwpstate0: set freq failed, err 6
    hwpstate0: set freq failed, err 6
    hwpstate0: set freq failed, err 6
    hwpstate0: set freq failed, err 6
    hwpstate0: set freq failed, err 6
    Code:
    root@bacup:/ # sysctl -a | grep cpu
    cpu     HAMMER
    device  cpufreq
    kern.ccpu: 0
    kern.sched.cpusetsize: 8
      <cpu count="6" mask="3f">0, 1, 2, 3, 4, 5</cpu>
        <cpu count="6" mask="3f">0, 1, 2, 3, 4, 5</cpu>
    kern.smp.cpus: 6
    kern.smp.maxcpus: 64
    net.inet.tcp.per_cpu_timers: 0
    debug.acpi.cpu_unordered: 0
    debug.cpufreq.verbose: 0
    debug.cpufreq.lowest: 0
    hw.ncpu: 6
    hw.acpi.cpu.cx_lowest: C1
    security.jail.param.cpuset.id: 0
    dev.cpu.0.%desc: ACPI CPU
    dev.cpu.0.%driver: cpu
    dev.cpu.0.%location: handle=\_PR_.C000
    dev.cpu.0.%pnpinfo: _HID=none _UID=0
    dev.cpu.0.%parent: acpi0
    dev.cpu.0.freq: 3300
    dev.cpu.0.freq_levels: 3300/14445 3000/11500 2400/7848 1800/4800 1400/3330
    dev.cpu.0.cx_supported: C1/0 C2/100
    dev.cpu.0.cx_lowest: C1
    dev.cpu.0.cx_usage: 100.00% 0.00% last 913us
    dev.cpu.1.%desc: ACPI CPU
    dev.cpu.1.%driver: cpu
    dev.cpu.1.%location: handle=\_PR_.C001
    dev.cpu.1.%pnpinfo: _HID=none _UID=0
    dev.cpu.1.%parent: acpi0
    dev.cpu.1.cx_supported: C1/0 C2/100
    dev.cpu.1.cx_lowest: C1
    dev.cpu.1.cx_usage: 100.00% 0.00% last 222us
    dev.cpu.2.%desc: ACPI CPU
    dev.cpu.2.%driver: cpu
    dev.cpu.2.%location: handle=\_PR_.C002
    dev.cpu.2.%pnpinfo: _HID=none _UID=0
    dev.cpu.2.%parent: acpi0
    dev.cpu.2.cx_supported: C1/0 C2/100
    dev.cpu.2.cx_lowest: C1
    dev.cpu.2.cx_usage: 100.00% 0.00% last 984us
    dev.cpu.3.%desc: ACPI CPU
    dev.cpu.3.%driver: cpu
    dev.cpu.3.%location: handle=\_PR_.C003
    dev.cpu.3.%pnpinfo: _HID=none _UID=0
    dev.cpu.3.%parent: acpi0
    dev.cpu.3.cx_supported: C1/0 C2/100
    dev.cpu.3.cx_lowest: C1
    dev.cpu.3.cx_usage: 100.00% 0.00% last 712us
    dev.cpu.4.%desc: ACPI CPU
    dev.cpu.4.%driver: cpu
    dev.cpu.4.%location: handle=\_PR_.C004
    dev.cpu.4.%pnpinfo: _HID=none _UID=0
    dev.cpu.4.%parent: acpi0
    dev.cpu.4.cx_supported: C1/0 C2/100
    dev.cpu.4.cx_lowest: C1
    dev.cpu.4.cx_usage: 100.00% 0.00% last 416us
    dev.cpu.5.%desc: ACPI CPU
    dev.cpu.5.%driver: cpu
    dev.cpu.5.%location: handle=\_PR_.C005
    dev.cpu.5.%pnpinfo: _HID=none _UID=0
    dev.cpu.5.%parent: acpi0
    dev.cpu.5.cx_supported: C1/0 C2/100
    dev.cpu.5.cx_lowest: C1
    dev.cpu.5.cx_usage: 100.00% 0.00% last 708us
    dev.acpi_perf.0.%parent: cpu0
    dev.acpi_perf.1.%parent: cpu1
    dev.acpi_perf.2.%parent: cpu2
    dev.acpi_perf.3.%parent: cpu3
    dev.acpi_perf.4.%parent: cpu4
    dev.acpi_perf.5.%parent: cpu5
    dev.hwpstate.0.%parent: cpu0
    dev.cpufreq.0.%driver: cpufreq
    dev.cpufreq.0.%parent: cpu0
    Code:
    root@backup:/ # uname -a
    FreeBSD mpbk1 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10 UTC 2012     [email]root@farrell.cse.buffalo.edu[/email]:/usr/obj/usr/src/sys/GENERIC  amd64
    
     
  11. vans9

    vans9 New Member

    Messages:
    7
    Likes Received:
    0
    Hello.

    I've upgraded 9.0 -> 9.1 and 9.1 -> 9.2. I confirm these for 9.2 too.
     
  12. gpeskens

    gpeskens New Member

    Messages:
    11
    Likes Received:
    0
    Confirmed also for 10-BETA2.
     
  13. ikbendeman

    ikbendeman Member

    Messages:
    257
    Likes Received:
    0
    I'm on 9.2-STABLE and I get a
    Code:
    WARNING: hint.acpi_throttle.disabled sysctl does not exist
    or some such error.
     
  14. ikbendeman

    ikbendeman Member

    Messages:
    257
    Likes Received:
    0
    Suppress the message?

    Can anyone help me with this? And is there anyway to suppress the following from filling up my dmesg?
    Code:
    hwpstate0: set freq failed, err 6
    hwpstate0: set freq failed, err 6
    hwpstate0: set freq failed, err 6
    hwpstate0: set freq failed, err 6
    hwpstate0: set freq failed, err 6
    hwpstate0: set freq failed, err 6
    hwpstate0: set freq failed, err 6
    hwpstate0: set freq failed, err 6
    hwpstate0: set freq failed, err 6
    hwpstate0: set freq failed, err 6
    hwpstate0: set freq failed, err 6
    
    It happens every few seconds, so no more running -STABLE; I can't use dmesg for a single stinking thing.
     
  15. raul321

    raul321 New Member

    Messages:
    2
    Likes Received:
    0
    Hello,

    I have the same problem:

    Code:
    freebsd#  sysctl -a | egrep -i 'hw.machine|hw.model|hw.ncpu'
    hw.machine: amd64
    hw.model: AMD FX(tm)-6100 Six-Core Processor
    hw.ncpu: 6
    hw.machine_arch: amd64
    In dmsg I have:
    Code:
    hwpstate0: set freq failed, err 6
    Then I've changed in loader.conf:

    Code:
    freebsd# cat loader.conf
    ########### hwpstate0: set freq failed, err 6 ##############
    debug.hwpstate_verbose="1"
    hint.acpi_throttle.0.disabled="1"
    
    Now in dmesg:
    Code:
    hwpstate0: setting P0-state on cpu0
    hwpstate0: result  P0-state on cpu0
    hwpstate0: setting P0-state on cpu1
    hwpstate0: result  P0-state on cpu1
    hwpstate0: setting P0-state on cpu2
    hwpstate0: result  P0-state on cpu2
    hwpstate0: setting P0-state on cpu3
    hwpstate0: result  P0-state on cpu3
    hwpstate0: setting P0-state on cpu4
    hwpstate0: result  P0-state on cpu4
    hwpstate0: setting P0-state on cpu5
    hwpstate0: result  P0-state on cpu5
    
    I have FreeBSD freebsd 9.1-RELEASE.
     
  16. raul321

    raul321 New Member

    Messages:
    2
    Likes Received:
    0
    Code:
    freebsd# powerd -v
    powerd: unable to determine AC line status
    load 127%, current freq 3300 MHz ( 0), wanted freq 6600 MHz
    load 124%, current freq 3300 MHz ( 0), wanted freq 6600 MHz
    load 227%, current freq 3300 MHz ( 0), wanted freq 6600 MHz
    load 227%, current freq 3300 MHz ( 0), wanted freq 6600 MHz
    load 241%, current freq 3300 MHz ( 0), wanted freq 6600 MHz
    load 209%, current freq 3300 MHz ( 0), wanted freq 6600 MHz
    load 212%, current freq 3300 MHz ( 0), wanted freq 6600 MHz
    load 243%, current freq 3300 MHz ( 0), wanted freq 6600 MHz
    load 176%, current freq 3300 MHz ( 0), wanted freq 6600 MHz
    load 287%, current freq 3300 MHz ( 0), wanted freq 6600 MHz
    load 268%, current freq 3300 MHz ( 0), wanted freq 6600 MHz
    
     
  17. clod89

    clod89 New Member

    Messages:
    5
    Likes Received:
    0
  18. TeoLinuX

    TeoLinuX New Member

    Messages:
    1
    Likes Received:
    0
    I confirm, same problem here.

    Code:
    uname -a
    FreeBSD mynas4free.local 9.1-RELEASE-p5 FreeBSD 9.1-RELEASE-p5
    I'm running FreeBSD 9.1 on Nas4Free NAS.

    On this system:
    Code:
    sysctl -a | egrep -i 'hw.machine|hw.model|hw.ncpu'
    hw.machine: amd64
    hw.model: AMD A4-4000 APU with Radeon(tm) HD Graphics    
    hw.ncpu: 2
    hw.machine_arch: amd64
    ASRock FM2A75M-DGS motherboard; BIOS is updated and Cool'n'quiet active.

    I must use
    Code:
    hint.acpi_throttle.0.disabled="1"
    in order to disable the error flooding my log.

    BTW: I can't read CPU temperature, is it normal?
    Any help is appreciated.
     
  19. Shoikan

    Shoikan New Member

    Messages:
    1
    Likes Received:
    0
    I've run into this too, and this appears to be a quirk of the CPU. If I recall correctly the cause is that cpufreq somehow tries to set the speed of all cores separately, when it can actually only set it for one. This causes the message to be displayed. And these CPUs also have some weirdness with their temperature sensor, which doesn't report absolute temperatures anymore, but an offset from the set 'max temp' in BIOS. Note that this comes from memory, so may be a bit garbled. It was a while back that I investigated it myself.
     
  20. phoenix

    phoenix Moderator Staff Member Moderator

    Messages:
    3,408
    Likes Received:
    2
    Just a quick aside, you don't need to use -a or pipe the result through grep, just list the sysctl nodes you want to display:
    Code:
    [fcash@alphadrive  ~]$ sysctl hw.machine hw.model hw.ncpu
    hw.machine: amd64
    hw.model: AMD Opteron(tm) Processor 6128
    hw.ncpu: 8