AMD FX, powerd, hwpstate

Internal storage, motherboards, PCI cards, stuff inside the case.

AMD FX, powerd, hwpstate

Postby vans9 » 18 Apr 2012, 09:49

Hi.

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

I've got
Code: Select all
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: Select all
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: Select all
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?
vans9
Junior Member
 
Posts: 7
Joined: 29 Nov 2011, 09:32

Postby mav@ » 20 Apr 2012, 19:44

Sorry, what issue exactly are you talking about?
mav@
Member
 
Posts: 604
Joined: 20 Feb 2008, 22:44
Location: Dnepropetrovsk, Ukraine

Postby vans9 » 21 Apr 2012, 07:31

I mean that the frequency couldn't be set.
vans9
Junior Member
 
Posts: 7
Joined: 29 Nov 2011, 09:32

Postby vans9 » 21 Apr 2012, 19:11

Also if I try setting the frequency via sysctl, I get an error too.
vans9
Junior Member
 
Posts: 7
Joined: 29 Nov 2011, 09:32

Postby cydnub » 16 May 2012, 01:07

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

Code: Select all
  hwpstate0: set freq failed err 6


and I too have in my loader.conf

Code: Select all
  hint.acpi_throttle.0.disabled="1"


which has been said to be a workaround, but does not seem to make a difference for me.
cydnub
Junior Member
 
Posts: 2
Joined: 16 May 2012, 00:49

Postby ikbendeman » 24 Sep 2013, 15:30

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.
User avatar
ikbendeman
Member
 
Posts: 229
Joined: 01 Dec 2009, 17:05
Location: California, US

Postby ikbendeman » 24 Sep 2013, 15:33

I mean I'm getting the
Code: Select all
hwpstate0: set freq failed err 6
User avatar
ikbendeman
Member
 
Posts: 229
Joined: 01 Dec 2009, 17:05
Location: California, US

Postby SirDice » 24 Sep 2013, 15:35

Also with 9.0? Please be advised that FreeBSD 9.0 is End-of-Life. Please upgrade to 9.1.
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
User avatar
SirDice
Old Fart
 
Posts: 16131
Joined: 17 Nov 2008, 16:50
Location: Rotterdam, Netherlands

No...

Postby ikbendeman » 28 Sep 2013, 11:14

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

Code: Select all
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
User avatar
ikbendeman
Member
 
Posts: 229
Joined: 01 Dec 2009, 17:05
Location: California, US

Postby mrhe » 04 Oct 2013, 09:39

Hello, I have the same info in [FILE]dmesg[/FILE]:
Code: Select all
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: Select all
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: Select all
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
mrhe
Junior Member
 
Posts: 9
Joined: 06 Nov 2012, 15:33
Location: Kraków, Poland

Postby vans9 » 07 Oct 2013, 06:14

Hello.

I've upgraded 9.0 -> 9.1 and 9.1 -> 9.2. I confirm these for 9.2 too.
vans9
Junior Member
 
Posts: 7
Joined: 29 Nov 2011, 09:32

Postby gpeskens » 02 Nov 2013, 14:43

Confirmed also for 10-BETA2.
gpeskens
Junior Member
 
Posts: 11
Joined: 20 Aug 2012, 20:08

Postby ikbendeman » 23 Nov 2013, 04:49

I'm on 9.2-STABLE and I get a
Code: Select all
WARNING: hint.acpi_throttle.disabled sysctl does not exist
or some such error.
User avatar
ikbendeman
Member
 
Posts: 229
Joined: 01 Dec 2009, 17:05
Location: California, US

Suppress the message?

Postby ikbendeman » 01 Dec 2013, 12:44

ikbendeman wrote:I'm on 9.2-STABLE and I get a
Code: Select all
WARNING: hint.acpi_throttle.disabled sysctl does not exist
or some such error.

Can anyone help me with this? And is there anyway to suppress the following from filling up my dmesg?
Code: Select all
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.
User avatar
ikbendeman
Member
 
Posts: 229
Joined: 01 Dec 2009, 17:05
Location: California, US

Re: AMD FX, powerd, hwpstate

Postby raul321 » 02 Dec 2013, 08:19

Hello,

I have the same problem:

Code: Select all
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: Select all
hwpstate0: set freq failed, err 6


Then I've changed in loader.conf:

Code: Select all
freebsd# cat loader.conf
########### hwpstate0: set freq failed, err 6 ##############
debug.hwpstate_verbose="1"
hint.acpi_throttle.0.disabled="1"


Now in dmesg:
Code: Select all
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.
Last edited by fonz on 04 Dec 2013, 20:02, edited 3 times in total.
Reason: Formatting & style. That was not great. // I is good, i is very very bad!
User avatar
raul321
Junior Member
 
Posts: 2
Joined: 02 Dec 2013, 08:06
Location: EPKK

Re: AMD FX, powerd, hwpstate

Postby raul321 » 02 Dec 2013, 08:45

Code: Select all
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
User avatar
raul321
Junior Member
 
Posts: 2
Joined: 02 Dec 2013, 08:06
Location: EPKK

Re: AMD FX, powerd, hwpstate

Postby clod89 » 08 Dec 2013, 11:34

It should be fixed now in 10.0. Just wait for RC1 or use a recent snapshot.

http://www.freebsd.org/cgi/query-pr.cgi?pr=167018
clod89
Junior Member
 
Posts: 4
Joined: 28 Aug 2012, 23:47

Re: AMD FX, powerd, hwpstate

Postby TeoLinuX » 28 Dec 2013, 23:00

I confirm, same problem here.

Code: Select all
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: Select all
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: Select all
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.
FreeBSD 9.1-RELEASE-p5 Nas4Free with APU AMD A4-4000 on ASRock FM2A75M-DGS mobo + 16GB RAM + 3x 2TB in ZFS raidz
TeoLinuX
Junior Member
 
Posts: 1
Joined: 28 Dec 2013, 22:50
Location: Milan

Re: AMD FX, powerd, hwpstate

Postby Shoikan » 10 Jan 2014, 14:53

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.
Shoikan
Junior Member
 
Posts: 1
Joined: 10 Jan 2014, 14:46

Re: AMD FX, powerd, hwpstate

Postby phoenix » 10 Jan 2014, 17:42

TeoLinuX wrote:On this system:
Code: Select all
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


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: Select all
[fcash@alphadrive  ~]$ sysctl hw.machine hw.model hw.ncpu
hw.machine: amd64
hw.model: AMD Opteron(tm) Processor 6128
hw.ncpu: 8
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
User avatar
phoenix
MFC'd
 
Posts: 3349
Joined: 17 Nov 2008, 05:43
Location: Kamloops, BC, Canada


Return to System Hardware

Who is online

Users browsing this forum: No registered users and 0 guests