NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/59932: Setting CPU frequencies on Zen 3 systems is problematic
The following reply was made to PR kern/59932; it has been noted by GNATS.
From: Emmanuel Nyarko <emmankoko519%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: kern-bug-people%netbsd.org@localhost,
gnats-admin%netbsd.org@localhost,
netbsd-bugs%netbsd.org@localhost
Subject: Re: kern/59932: Setting CPU frequencies on Zen 3 systems is
problematic
Date: Tue, 20 Jan 2026 14:35:43 +0000
Hi,
> On multiple Zen 3 systems (Ryzen 5500, 5700X):
>=20
> sysctl -a | grep freq
> machdep.dmi.processor-frequency =3D 3400 MHz
> machdep.tsc_freq =3D 3393633000
> machdep.cpu.frequency.target =3D 3400
> machdep.cpu.frequency.current =3D 3400
> machdep.cpu.frequency.available =3D 3400 2800 2200
>=20
> Changing the frequency works. However, after setting frequency.target =
to 3401 (which is 3400, with turbo clocking enabled, IIRC), all future =
attempts to set the clock fail:
>=20
> sysctl -w machdep.cpu.frequency.target=3D3400
> sysctl: machdep.cpu.frequency.target: Device not configured
> sysctl -w machdep.cpu.frequency.target=3D2200
> sysctl: machdep.cpu.frequency.target: Device not configured
>=20
> On each attempt to change CPU frequency, the kernel prints:
>=20
> [ 2823136.558871] acpicpu0: autoconfiguration error: failed to get =
frequency (err 22)
> [ 2823141.718910] acpicpu1: autoconfiguration error: failed to get =
frequency (err 22)
from source inspection, returning an EINVAL seems like this particular =
machine uses a=20
Fixed Hardware address space ACPI type and has no support for AMD =
=E2=80=9CVID/FID=E2=80=9D algorithm=20
for intermediate dynamic adjustments of Pstates. so it matches to an =
invalid status address (0) for the unknown=20
Pstate that you are trying to change to (3401).=20
https://www.netbsd.org/docs/guide/en/chap-power.html
you can =E2=80=9Cusually" verify that if your reported frequencies end =
in 1. looks like this man page reveals a=20
software layer aid to that but seems to be inneficient as compared to =
hardware support.=20
can you check dmesg to see if P state FIDVID flag is seen on acpicpu ? =
and maybe compare to the other machines ?
If it lacks the support, maybe you simply can=E2=80=99t do that due to =
hardware limitation.
NB: this is just by source inspection. hope it helps.
Emmanuel
Home |
Main Index |
Thread Index |
Old Index