From: Kirill A. Korinsky Subject: Re: cpu perfpolicy To: "Ted Unangst" Cc: tech@openbsd.org Date: Sun, 01 Jun 2025 22:15:40 +0200 On Sun, 01 Jun 2025 21:57:40 +0200, "Ted Unangst" wrote: > > On 2025-06-01, Kirill A. Korinsky wrote: > > I haven't tried it but after reading the diff I think that after > > > > sysctl hw.perfpolicy=silent,auto > > > > you'll have result of sysctl hw.perfpolicy as: > > - auto on AC > > - unknown on battery > > Without changing the existing code too much, the cpu policy functions > are responsible for altering the string. So it will eat the silent, part. > Look for the memmove. > probably something like this: if (target != ASUS_DEV_PERF && target >= 0 && target < nitems(asus_policies)) allows to keep policy as '\0' and avoid replace it by unknown. -- wbr, Kirill