Did I just overclocked my apu2c4 (AMD GX-412TC SOC)?
-
Hi Folks,
while trying to fix "hwpstate0: set freq failed, err 6" caused by powerd in hiAdaptive mode I endup overclocking the CPU to 1400MHz.
hint.p4tcc.0.disabled=1 hint.acpi_throttle.0.disabled=1
# sysctl dev.cpu.0 dev.cpu.0.temperature: 65.7C dev.cpu.0.cx_method: C1/hlt C2/io dev.cpu.0.cx_usage_counters: 4424 0 dev.cpu.0.cx_usage: 100.00% 0.00% last 4116us dev.cpu.0.cx_lowest: C1 dev.cpu.0.cx_supported: C1/1/0 C2/2/400 dev.cpu.0.freq_levels: 1000/924 800/760 600/571 dev.cpu.0.freq: 1000 dev.cpu.0.%parent: acpi0 dev.cpu.0.%pnpinfo: _HID=none _UID=0 dev.cpu.0.%location: handle=\_PR_.P000 dev.cpu.0.%driver: cpu dev.cpu.0.%desc: ACPI CPU
Then to the above tweaks I added:
hint.acpi_perf.0.disabled=1
and this is the result
dev.cpu.0.temperature: 65.6C dev.cpu.0.cx_method: C1/hlt C2/io dev.cpu.0.cx_usage_counters: 6037 0 dev.cpu.0.cx_usage: 100.00% 0.00% last 125us dev.cpu.0.cx_lowest: C1 dev.cpu.0.cx_supported: C1/1/0 C2/2/400 dev.cpu.0.freq_levels: 1400/-1 1200/-1 1000/-1 dev.cpu.0.freq: 1400 dev.cpu.0.%parent: acpi0 dev.cpu.0.%pnpinfo: _HID=none _UID=0 dev.cpu.0.%location: handle=\_PR_.P000 dev.cpu.0.%driver: cpu dev.cpu.0.%desc: ACPI CPU
Temperature is the same and I hope I get hwpstate fixed!
Cheers
-
can you specify which version you are on?
2.4.3-RELEASE-p1 (amd64) i add
hint.p4tcc.0.disabled=1
hint.acpi_throttle.0.disabled=1
hint.acpi_perf.0.disabled=1sysctl dev.cpu.0
dev.cpu.0.temperature: 77.0C
dev.cpu.0.cx_method: C1/hlt C2/io
dev.cpu.0.cx_usage_counters: 35229 0
dev.cpu.0.cx_usage: 100.00% 0.00% last 320us
dev.cpu.0.cx_lowest: C1
dev.cpu.0.cx_supported: C1/1/0 C2/2/400
dev.cpu.0.freq_levels: 1000/924 800/760 600/571
dev.cpu.0.freq: 1000
dev.cpu.0.%parent: acpi0
dev.cpu.0.%pnpinfo: _HID=none UID=0
dev.cpu.0.%location: handle=_PR.P000
dev.cpu.0.%driver: cpu
dev.cpu.0.%desc: ACPI CPU -
I doubt that when you overclock a CPU by 40% it
- stays at the same temperature (maybe in idle state?)
- it works long-term stable
If it would be that simple and without complications AMD would have sold the CPU with higher specs at a higher price, right?
-
@amassi if you have rebooted and the frequency didn't raised is probably because I'm on coreboot v4.8.0.2 but I do not suggest you to upgrade yet as "sometimes" I have issues with reboots.
@jahonix CPU specs says 1000/1200/1400 and it was sold underclocked to max 1000, that makes this thread's title obsolete because I didn't overcloked, but simply unlocked. I'll stress benchmark the CPU and get back to you, but consider ambient temperature, at midnight, is about 25 C°.
-
ab -c 4 -n 5000 https
time taken 250 seconds
complete request 5000, failed 0
load up to 6.23
temperature start at 65°C
temperature max 66.7°C -
ab -c 4 -n 50000
time taken 2472.722 seconds
load up to 11 (system in use, backups over ssh and a couple of stunnel connections) when the system was quieter the load was ~5.5temperature
- ambient 21 °C
- start 65.1 °C
- max 68 °C
up to 20000 requests temperature was ~66.7 with picks of 67.5 °C
after that temperature was ~67.5 °C with picks of 68 °CBox is squeezed inside a rack on a shelf with no fans around, temporary with no sides and back door.
-
forget too tell that i have before change :
sysctl dev.cpu.0
dev.cpu.0.temperature: 77.6C
dev.cpu.0.cx_method: C1/hlt C2/io
dev.cpu.0.cx_usage_counters: 46054936 0
dev.cpu.0.cx_usage: 100.00% 0.00% last 422us
dev.cpu.0.cx_lowest: C1
dev.cpu.0.cx_supported: C1/1/0 C2/2/400
dev.cpu.0.freq_levels: 1000/924 800/760 600/571
dev.cpu.0.freq: 600
dev.cpu.0.%parent: acpi0
dev.cpu.0.%pnpinfo: _HID=none UID=0
dev.cpu.0.%location: handle=_PR.P000
dev.cpu.0.%driver: cpu
dev.cpu.0.%desc: ACPI CPU -
@amassi then it must be the different coreboot version, cheers.
-
So I decided to give @MarcoP changes a try on my APU2C4 and hats off to him I had the same results. So far I'm not seeing any significant increase in heat nor degraded performance. I'm not a FreeBSD power user by any means, so I'm not sure what effects you should expect from overriding the acpi_perf setting would be... initial googling says this should just results in a higher power draw, but I would say that a 40% increase of quad core CPU would be worth the extra 1-2 watt draw. Thoughts?
Setup:
I'm running PFSense 2.4.3-1 with APU2C4 coreboot v4.8.0.2, temperature averages about 55.6C to 58.6C based on load before and after change.Lines added to /boot/loader.conf
hint.p4tcc.0.disabled="1"
hint.acpi_throttle.0.disabled="1"
hint.acpi_perf.0.disabled="1"Post reboot results from "sysctl dev.cpu"
dev.cpu.3.temperature: 56.0C
dev.cpu.3.cx_method: C1/hlt
dev.cpu.3.cx_usage_counters: 2370289
dev.cpu.3.cx_usage: 100.00% last 1225us
dev.cpu.3.cx_lowest: C1
dev.cpu.3.cx_supported: C1/1/0
dev.cpu.3.%parent: acpi0
dev.cpu.3.%pnpinfo: _HID=none UID=0
dev.cpu.3.%location: handle=_PR.P003
dev.cpu.3.%driver: cpu
dev.cpu.3.%desc: ACPI CPU
dev.cpu.2.temperature: 56.0C
dev.cpu.2.cx_method: C1/hlt
dev.cpu.2.cx_usage_counters: 2290184
dev.cpu.2.cx_usage: 100.00% last 17531us
dev.cpu.2.cx_lowest: C1
dev.cpu.2.cx_supported: C1/1/0
dev.cpu.2.%parent: acpi0
dev.cpu.2.%pnpinfo: _HID=none UID=0
dev.cpu.2.%location: handle=_PR.P002
dev.cpu.2.%driver: cpu
dev.cpu.2.%desc: ACPI CPU
dev.cpu.1.temperature: 56.0C
dev.cpu.1.cx_method: C1/hlt
dev.cpu.1.cx_usage_counters: 2285148
dev.cpu.1.cx_usage: 100.00% last 761us
dev.cpu.1.cx_lowest: C1
dev.cpu.1.cx_supported: C1/1/0
dev.cpu.1.%parent: acpi0
dev.cpu.1.%pnpinfo: _HID=none UID=0
dev.cpu.1.%location: handle=_PR.P001
dev.cpu.1.%driver: cpu
dev.cpu.1.%desc: ACPI CPU
dev.cpu.0.temperature: 56.0C
dev.cpu.0.cx_method: C1/hlt C2/io
dev.cpu.0.cx_usage_counters: 2419029 0
dev.cpu.0.cx_usage: 100.00% 0.00% last 1359us
dev.cpu.0.cx_lowest: C1
dev.cpu.0.cx_supported: C1/1/0 C2/2/400
dev.cpu.0.freq_levels: 1400/-1 1200/-1 1000/-1
dev.cpu.0.freq: 1400
dev.cpu.0.%parent: acpi0
dev.cpu.0.%pnpinfo: _HID=none UID=0
dev.cpu.0.%location: handle=_PR.P000
dev.cpu.0.%driver: cpu
dev.cpu.0.%desc: ACPI CPU
dev.cpu.%parent: -
upgrade bios done
BIOS Vendor: coreboot
Version: v4.8.0.2
Release Date: Thu Jul 5 2018dev.cpu.0.temperature: 72.0C
dev.cpu.0.cx_method: C1/hlt C2/io
dev.cpu.0.cx_usage_counters: 302458 0
dev.cpu.0.cx_usage: 100.00% 0.00% last 583us
dev.cpu.0.cx_lowest: C1
dev.cpu.0.cx_supported: C1/1/0 C2/2/400
dev.cpu.0.freq_levels: 1400/-1 1200/-1 1000/-1
dev.cpu.0.freq: 1400
dev.cpu.0.%parent: acpi0
dev.cpu.0.%pnpinfo: _HID=none UID=0
dev.cpu.0.%location: handle=_PR.P000
dev.cpu.0.%driver: cpu
dev.cpu.0.%desc: ACPI CPUbut in fact i don't find i have any perf better
-
@amassi said in Did I just overclocked my apu2c4 (AMD GX-412TC SOC)?:
upgrade bios done
BIOS Vendor: coreboot
Version: v4.8.0.2
Release Date: Thu Jul 5 2018dev.cpu.0.temperature: 72.0C
dev.cpu.0.cx_method: C1/hlt C2/io
dev.cpu.0.cx_usage_counters: 302458 0
dev.cpu.0.cx_usage: 100.00% 0.00% last 583us
dev.cpu.0.cx_lowest: C1
dev.cpu.0.cx_supported: C1/1/0 C2/2/400
dev.cpu.0.freq_levels: 1400/-1 1200/-1 1000/-1
dev.cpu.0.freq: 1400
dev.cpu.0.%parent: acpi0
dev.cpu.0.%pnpinfo: _HID=none UID=0
dev.cpu.0.%location: handle=_PR.P000
dev.cpu.0.%driver: cpu
dev.cpu.0.%desc: ACPI CPUbut in fact i don't find i have any perf better
Sorry, this is a bit off-topic and I don't want to hijack the post, but is this a modified version of bios v4.8.0.2, I would like to know your experience with this version as PC Engines advises the legacy versions instead of the Mainline releases?
btw I am still on v4.0.7 Legacy release
http://pcengines.ch/howto.htm#bios
https://pcengines.github.io/ -
@qinn If you boot from mSATA I would give the last 4.6 a try where this issue is fixed, otherwise 4.8 seems stable enough.
Issue on 4.8 is on warm reboots, but you could shutdown and WOL instead I guess. Be aware, it seems WOL only works on igb2.
-
@marcop Yes I boot from a 16gb mSATA, but I have no issues and that's the reason I am still on Legacy version bios, Vendor: coreboot Version: 4.0.7.
You advise to install the 4.6 version, but that's a Mainline version and not a Legacy version, PC Engines advises the Legacy ones, as in this link ( http://pcengines.ch/howto.htm#bios ) for all pfSense users, could you explain me the benefits and why you are on a Mainline version?Cheers Qinn
-
Spent the past day trying to determine if this actually increased the CPU frequency or not... Many googles later, I'm still not sure how you coudl provide this. The dmidecode command should give more detailed info regarding the CPU and it's current speed, but it just returns unknown for Max Speed and Current Speed. Checking dmesg.boot looks like at boot the system is seeing it as a 998.15-MHz CPU, which would support @amassi observation of not gaining any additional performance.
My guess is that the system is still running at 1Ghz but the changes @MarcoP did affected how sysctl reports the CPU information. If anyone has additional thought I would love to hear them, I've been enjoying the APU2C4 as is but having a extra CPU power would be awesome.
Command Results:
dmidecode:
Handle 0x0004, DMI type 4, 42 bytes
Processor Information
Socket Designation: Not Specified
Type: Central Processor
Family: Pentium Pro
Manufacturer: AuthenticAMD
ID: 01 0F 73 00 FF FB 8B 17
Signature: Type 0, Family 22, Model 48, Stepping 1
Flags:
FPU (Floating-point unit on-chip)
VME (Virtual mode extension)
DE (Debugging extension)
PSE (Page size extension)
TSC (Time stamp counter)
MSR (Model specific registers)
PAE (Physical address extension)
MCE (Machine check exception)
CX8 (CMPXCHG8 instruction supported)
APIC (On-chip APIC hardware supported)
SEP (Fast system call)
MTRR (Memory type range registers)
PGE (Page global enable)
MCA (Machine check architecture)
CMOV (Conditional move instruction supported)
PAT (Page attribute table)
PSE-36 (36-bit page size extension)
CLFSH (CLFLUSH instruction supported)
MMX (MMX technology supported)
FXSR (FXSAVE and FXSTOR instructions supported)
SSE (Streaming SIMD extensions)
SSE2 (Streaming SIMD extensions 2)
HTT (Multi-threading)
Version: AMD GX-412TC SOC
Voltage: Unknown
External Clock: Unknown
Max Speed: Unknown
Current Speed: Unknown
Status: Unpopulated
Upgrade: Other
L1 Cache Handle: Not Provided
L2 Cache Handle: Not Provided
L3 Cache Handle: Not Provided
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: Not Specified
Core Count: 4
Characteristics: Nonegrep -i cpu /var/run/dmesg.boot
CPU: AMD GX-412TC SOC (998.15-MHz K8-class CPU)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
SMP: AP CPU #2 Launched!
SMP: AP CPU #1 Launched!
SMP: AP CPU #3 Launched!
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
cpu2: <ACPI CPU> on acpi0
cpu3: <ACPI CPU> on acpi0
igb0: Bound queue 0 to cpu 0
igb0: Bound queue 1 to cpu 1
igb0: Bound queue 2 to cpu 2
igb0: Bound queue 3 to cpu 3
igb1: Bound queue 0 to cpu 0
igb1: Bound queue 1 to cpu 1
igb1: Bound queue 2 to cpu 2
igb1: Bound queue 3 to cpu 3
igb2: Bound queue 0 to cpu 0
igb2: Bound queue 1 to cpu 1
igb2: Bound queue 2 to cpu 2
igb2: Bound queue 3 to cpu 3
hwpstate0: <Cool`n'Quiet 2.0> on cpu0
CPU: AMD GX-412TC SOC (998.15-MHz K8-class CPU) -
As I said before: there is no free lunch.
Neither would AMD sell a 1400MHz capable CPU as 1000MHz device and get paid less than achievable from the same chip.
Nor would power consumption and thus heat dissipation not increase. And since this is not a linear function expect something like double the heat being generated. If core temperature stays the same then clock speed hasn't changed. Simple as that.Let me repeat: there is no free lunch when it comes to physics.
-
@shiftyjoe said in Did I just overclocked my apu2c4 (AMD GX-412TC SOC)?:
GX-412TC SOC
I agree 100% with the heat comment, I doubted that I was getting the increased CPU speed after seeing no additional heat. As far as the marketing, I think that's where the confusion comes in. It seems like there is a number of mixed messages regarding the speed available on the GX-412TC which lead to @MarcoP comment that he might have unlocked the higher speeds that are by default disabled on APU2C4. Personally I'm going to keep poking at this to see if there is anything "extra" that can be eked out of the CPU without impacting the system too much, so any suggestions or insights would be appreciated.
Reported Speeds of GX-412TC SOC
https://www.amd.com/Documents/AMDGSeriesSOCProductBrief.pdf => Says 1.0/1.4GHZhttp://www.cpu-world.com/CPUs/Puma/AMD-G-Series%20GX-412TC.html => Says 1.2GHZ
http://www.pcengines.info/forums/?page=post&id=7D3ECCD1-AFFB-441C-9527-78A0B0E53074&fid=DF5ACB70-99C4-4C61-AFA6-4C0E0DB05B2A => Even on pcengines there are talks about how the CPU specs should be 1.2GHZ vs the 1.0GHZ
-
After few days of tests I came to the conclusion that it is still running at 1GHz.
Despite dev.cpu reports supported CPU speeds of 1.4/1.2/1.0GHz, the CPU still runs at 0.6/0.8/1.0GHz.
From my understanding hwpstate sets the P-state by ID via MSR, at OS level ID P-state 0 correspond to 1.4GHz, while at CPU level is 1.0GHz. So communications are by IDs, and in fact, now, I can clearly see frequencies running at 600/800/1000MHz despite sysctl reporting 1.0/1.2/1.4GHz.
A comment in cpuspeed manual says the CPU frequency cannot be changed if TSC is used as Clock, as a matter of fact it uses TSC (1000 quality) and I will try using HPET (950 confidence) and report later.
That would explain temperature not raising, and in fact I was very, very, surprised by this and as a consequence I started investigating.
@Qinn I went to mainline because after few hours of activity, or if using powerd after an high load event, the box started to be slightly sluggish and slower, was just an impression.
Today I can clearly see the CPU stuck at 600MHz after few hours of activity, or if using powerd even while there it was high load the frequency was suddenly dropped and nothing would bring frequency up again apart a reboot. I've tried cooling, waiting, sysctl, ACAD 0x01 to acpi_ac and anything I could come up with.I now believe this was also happening on legacy, making the box slower, justifying my suspects. If so it wasn't a firmware issue, otherwise it's a cpufreq driver issue or a combination between both.
The way I can now clearly see the running frequency is only by using turbostat, under Bzy_MHz column.
pkg add http://pkg0.isc.freebsd.org/FreeBSD:11:amd64/latest/All/turbostat-4.17_1.txz rehash turbostat --interval 3 Core CPU Avg_MHz Busy% Bzy_MHz TSC_MHz IRQ - - 599 100.00 599 998 0 0 0 599 100.00 599 998 0 1 1 599 100.00 599 998 0 2 2 599 100.00 599 998 0 3 3 599 100.00 599 998 0
-
@marcop Its very disturbing that such a simple thing, as "how much is the damn clockrate of a well-known and aging SoC really is", that cannot be reliably and easily figured out! AMD is keeping the authentic tech docs in secret? (as a quick googling around, there seems to be no technical sheet with credible information about this SoC anywhere on the internet).
Vendors who sell the 412TC clocked @ 1 Ghz instead of 1.2 or 1.4 Ghz are selling semi-defect junk purchased cheap from AMD, or there is something going behind the scenes?
-
@soder I have no idea, but I guess is due to thermal issues.
It is sold as fanless, there are no alternatives for active or passive heatsink so I'm positive is to protect the CPU from overheating as in fact temp is generally on the high side already.
These docs aren't that secret, vendors and such can have it.
I did however recently made my own alpha-cooling-option (rough and slightly sharp edges still) and temperature is stable between 52 and 58 degrees Celsius, over 10 degrees cooler and there is room to improve.
-
@marcop Nice job on that!
On the other hand, quote from the only available document, that I found for this Soc:https://www.amd.com/Documents/AMDGSeriesSOCProductBrief.pdf
"AMD G-Series SOC enables fan-less design that further helps drive down system cost and enhance system reliability by eliminating moving parts"
--> GX-412TC is the lowest clock-rate member of the family, its TDP is only 6W (if that value in the document is reliable at all!). If the slowest chip cannot survive passive-cooled usage, the whole sentence is a pure lie. So Pcengines or any other vendor shouldn't have downclocked the CPU in order to prevent it from melting.
When did technical sheets of this AMD CPU became trade secret, only available to contracted partners, and not available publically to the internet?