Index | Thread | Search

From:
Ron Manosuthi <rman401@proton.me>
Subject:
Re: Initial Raspberry Pi CPU frequency driver (apm -A)
To:
Jan Stary <hans@stare.cz>
Cc:
"tech@openbsd.org" <tech@openbsd.org>
Date:
Tue, 13 Jan 2026 01:17:22 +0000

Download raw body.

Thread
Hi Jan,

Thanks for testing.

> > just obeys whatever level cpu_setperf feeds it.
> 
> 
> $ doas sysctl hw.setperf=0
> doas (hans@rpi.stare.cz) password:
> sysctl: hw.setperf: Operation not permitted
> 
> Is that supposed to work?

I was referring to the kernel function cpu_setperf(9) which passes 0-100 to rpicpu_setperf(9).
But as Crystal said

sysctl hw.perfpolicy=manual
sysctl hw.setperf=<percentage>

would also let you test it.

> > Remember to unset force_turbo.
> 
> 
> Does that go into the config.txt file in the DOS partition?
> Looking at
> https://www.raspberrypi.com/documentation/computers/config_txt.html#overclocking-options
> does force_turbo=1 force the RPI4 to always run with max frequency?
> I don't have any force_turbo in the config.txt file.

Right, I don't think it's set by default on OpenBSD. The option forces the Pi to always
run at max frequency even without the driver. I had it set because compilation was awfully slow otherwise.

By setting it, sc_min_clk_hz == sc_max_clk_hz making the driver useless. Like this:

rpicpu0 at simplebus0: 1800-1800 MHz

There's another relevant config.txt option: initial_turbo=<seconds> max value 60.
According to the link it's set by default to 60 as of Nov 2024.
No observed ill effects, reports min and max clocks correctly, auto and manual adjustment works.

- Ron