Created attachment 218258 [details] dmesg CPU info Hello everyone, It would seems that FreeBSD amdtemp driver does not yet recognize AMD Ryzen 9 4900H processor. When doing a sysctl dev.cpu.0 on a FreeBSD current at svn revision r365451 it shows : dev.cpu.0.cx_method: C1/hlt C2/io C3/io dev.cpu.0.cx_usage_counters: 817664 0 0 dev.cpu.0.cx_usage: 100.00% 0.00% 0.00% last 433us dev.cpu.0.cx_lowest: C1 dev.cpu.0.cx_supported: C1/1/1 C2/2/400 C3/3/350 dev.cpu.0.freq_levels: 3300/4021 1700/1615 1400/1277 dev.cpu.0.freq: 3300 dev.cpu.0.%parent: acpi0 dev.cpu.0.%pnpinfo: _HID=ACPI0007 _UID=1 _CID=none dev.cpu.0.%location: handle=\_SB_.PLTF.P000 dev.cpu.0.%driver: cpu dev.cpu.0.%desc: ACPI CPU There is no temperature reported, No dev.cpu.*.temperature sysctl are present while amdtemp is loaded. I assume all 3rd gen Ryzen processors are in the same boat. This is on a Asus TUF A17 Notebook.
Created attachment 218259 [details] devinfo -v output
Created attachment 218260 [details] pciconf -lv output
Please try this patch and see if it attaches on your system. We support desktop Zen 2 (3rd gen ryzen), but Renoir (APU form) is a bit different. https://people.freebsd.org/~cem/amdtemp-renoir.0.patch
I can confirm that after applying your patch temperature is available : laptop# sysctl dev.cpu | grep temperature dev.cpu.15.temperature: 55.0C dev.cpu.14.temperature: 55.0C dev.cpu.13.temperature: 55.0C dev.cpu.12.temperature: 55.0C dev.cpu.11.temperature: 55.0C dev.cpu.10.temperature: 55.0C dev.cpu.9.temperature: 55.0C dev.cpu.8.temperature: 55.0C dev.cpu.7.temperature: 55.0C dev.cpu.6.temperature: 55.0C dev.cpu.5.temperature: 55.0C dev.cpu.4.temperature: 55.0C dev.cpu.3.temperature: 55.0C dev.cpu.2.temperature: 55.0C dev.cpu.1.temperature: 55.0C dev.cpu.0.temperature: 55.0C laptop# Thank you for the very quick answer !
No problem, thanks for trying it out!
A commit references this bug: Author: cem Date: Fri Sep 25 04:16:29 UTC 2020 New revision: 366136 URL: https://svnweb.freebsd.org/changeset/base/366136 Log: amdtemp(4), amdsmn(4): Attach to Ryzen 4000 APU (Zen 2, "Renoir") PR: 249864 Reported by: Florian Millet <florian.millet AT laposte.net> Tested by: Florian Millet Changes: head/sys/dev/amdsmn/amdsmn.c head/sys/dev/amdtemp/amdtemp.c
A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=89f349bab6d6e6176704b83bd0ec358f9689a6cf commit 89f349bab6d6e6176704b83bd0ec358f9689a6cf Author: Conrad Meyer <cem@FreeBSD.org> AuthorDate: 2020-09-25 04:16:28 +0000 Commit: Alexander Motin <mav@FreeBSD.org> CommitDate: 2021-03-04 15:10:39 +0000 amdtemp(4), amdsmn(4): Attach to Ryzen 4000 APU (Zen 2, "Renoir") PR: 249864 Reported by: Florian Millet <florian.millet AT laposte.net> Tested by: Florian Millet (cherry picked from commit 5b505170794dfaae633294aaf178bd797b7a1b11) sys/dev/amdsmn/amdsmn.c | 9 ++++++++- sys/dev/amdtemp/amdtemp.c | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-)