Control CPU frequency on Raspberry Pi with FreeBSD 10.2

FreeBSD 10.2-RELEASE became available at 13 August 2015.
One of the added features is the bcm2835_cpufreq driver, which supports CPU frequency and voltage control on the Raspberry Pi.

Let’s check how it works.

First, we will load new image and check new driver in the systems messages.

dmesg

We see the bcm2835_cpufreq0 device.

Next, we will check the kernel’s value for control CPU.

sysctl1sysctl2

User-level interface for changing CPU frequency is the cpufreq(4) driver.

Let’s check that this driver is loaded.

kld

It’s time now to try it.

freq1freq2

It’s work.

Control CPU frequency automatically

We can change CPU frequency automatically using powerd(8) utility.
The powerd(8) utility monitors the system state and sets various power control options accordingly.

powerd

Option “-a hadp” turn on hiadaptive mode. This mode attempts to strike a balance by degrading performance when the system appears idle and increasing it when the system is busy, but tuned for systems where performance and interactivity are more important than power consumption.

To turn on this control permanently we should add options for powerd(8) to the /etc/rc.conf(5)

rcconf

After reboot we can check it.

powerdv

That’s all folks!

Advertisements

2 thoughts on “Control CPU frequency on Raspberry Pi with FreeBSD 10.2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s