Solved AMD ZEN5 CPU --> unknown oid dev.cpu.temp

I installed a new CPU AMD Ryzen 9 9950X, replacing a Ryzen 7 7800X3D.

CPU temperature, however, seems to have gone away:

/boot/device.hints:
Code:
hint.acpi_throttle.0.disabled="1"
hint.p4tcc.0.disabled="1"

/boot/loader.conf has
Code:
amdtemp_load="YES"

freebsd-version -kru
14.2-RELEASE-p1
14.2-RELEASE-p1
14.2-RELEASE-p3


Code:
> sysctl hw.acpi     
hw.acpi.cpu.cx_lowest: C1
hw.acpi.cpu.cppc_notify: 1
hw.acpi.reset_video: 0
hw.acpi.override_isa_irq_polarity: 0
hw.acpi.handle_reboot: 1
hw.acpi.disable_on_reboot: 0
hw.acpi.verbose: 0
hw.acpi.s4bios: 0
hw.acpi.sleep_delay: 1
hw.acpi.suspend_state: S3
hw.acpi.standby_state: NONE
hw.acpi.lid_switch_state: NONE
hw.acpi.sleep_button_state: S3
hw.acpi.power_button_state: S5
hw.acpi.supported_sleep_state: S3 S4 S5

What am I missing?
 
Oh, I guess I'm off to recompile the kernel then? I'll post be back with the results when done.
 
Hmm, still nothing.

I applied the patch at the root level /usr/src:

Code:
❱ sudo patch -C < amdsn.patch
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|commit b09861bdce705a73a190399266d96d39d2acd6cd
|Author: Simon Wells <swel024@gmail.com>
|Date:   Sun Jan 12 16:33:21 2025 +1300
|
|    amdsmn(4), amdtemp(4): add support for Zen 5
|
|    Zen 5 support, tested on Ryzen 7 9700X
|
|diff --git a/sys/dev/amdsmn/amdsmn.c b/sys/dev/amdsmn/amdsmn.c
|index 9f5c55b1abd6..1fc93a68fbf3 100644
|--- a/sys/dev/amdsmn/amdsmn.c
|+++ b/sys/dev/amdsmn/amdsmn.c
--------------------------
Patching file sys/dev/amdsmn/amdsmn.c using Plan A...
Hunk #1 succeeded at 61 with fuzz 1 (offset 1 line).
Hunk #2 succeeded at 212 (offset 1 line).
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/sys/dev/amdtemp/amdtemp.c b/sys/dev/amdtemp/amdtemp.c
|index 0c423e0b2502..19ec3c8e2032 100644
|--- a/sys/dev/amdtemp/amdtemp.c
|+++ b/sys/dev/amdtemp/amdtemp.c
--------------------------
Patching file sys/dev/amdtemp/amdtemp.c using Plan A...
Hunk #1 succeeded at 116 with fuzz 1 (offset 1 line).
Hunk #2 succeeded at 318 (offset 1 line).
Hunk #3 succeeded at 478 (offset 1 line).
Hunk #4 succeeded at 542 (offset 1 line).
Hunk #5 succeeded at 895 (offset -1 lines).
Hmm...  Ignoring the trailing garbage.
done

I've followed 10.5. Building and Installing a Custom Kernel handbook and built the kernel with success:
Code:
> uname -a
14.2-RELEASE-p3 FreeBSD 14.2-RELEASE-p3 releng/14.2-n269524-1eb03b059e56 ZEN5 amd64
Module is loaded, but still not temperature available:

❱ sudo sysctl dev.cpu.0
dev.cpu.0.cx_method: C1/hlt C2/io C3/io
dev.cpu.0.cx_usage_counters: 155405 0 0
dev.cpu.0.cx_usage: 100.00% 0.00% 0.00% last 5us
dev.cpu.0.cx_lowest: C1
dev.cpu.0.cx_supported: C1/1/1 C2/2/18 C3/3/350
dev.cpu.0.freq_levels: 4300/5250 3000/2550
dev.cpu.0.freq: 4300
dev.cpu.0.%iommu:
dev.cpu.0.%parent: acpi0
dev.cpu.0.%pnpinfo: _HID=ACPI0007 _UID=0 _CID=none
dev.cpu.0.%location: handle=\_SB_.PLTF.C000
dev.cpu.0.%driver: cpu
dev.cpu.0.%desc: ACPI CPU


Did I forget something? Do I have to
Code:
buildworld
as well?
 
14.3 BETA builds are available, I have never used a beta, but maybe you can try the dvd or memstick image to boot and see if it works there.
 
Back
Top