10

I'm setting up a Puppet instance that will manage a bunch of RPis. This means I cannot overclock them one by one using raspi-config.

Overclocking should be as simple as creating /boot/config.txt:

root@rpi-032113 ~ # file /boot/config.txt 
/boot/config.txt: ASCII text
root@rpi-032113 ~ # cat /boot/config.txt 
gpu_mem=32
arm_freq=950
core_freq=250
sdram_freq=450
over_voltage=6

However, whenever I reboot and stress test it stays at 700MHz:

root@rpi-032113 ~ # nice yes >/dev/null &
[1] 3238
root@rpi-032113 ~ # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
700000

root@rpi-032113 ~ # /opt/vc/bin/vcgencmd get_config int
arm_freq=950
core_freq=250
sdram_freq=450
over_voltage=6
temp_limit=85
force_pwm_open=1

It clearly stays at 700MHz (also after waiting another 15 extra seconds), while it should be at 950MHz.

What am I missing? Is there a sticky bit that has to be set in the CPU before this will work?

Tuinslak
  • 285
  • 1
  • 4
  • 10

2 Answers2

5

The cpu frequency is scaled on demand. You can set the threshold via the `up_threshold' sysctl variable. You can set it via:

sudo sh -c "echo 20 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold"

This will set the threshold to 20% CPU utilization.

The scaling governor can be set to ondemand via:

sudo sh -c "echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"

You can put this in your /etc/rc.local, so it will be executed during boot. You can leave out the sudo sh -c stuff then, because rc.local is run as root anyway.

More documentation on CPU clocking can be found here.

Arne
  • 2,234
  • 2
  • 18
  • 35
0

The overclock only activates if there is a high enough CPU Usage. To change the minimum arm freq do

sudo nano /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

Nano is my favorite command line text editor, but you can use others such as vi or vim. The number in the file is the current arm freq in kHz (Not mHz!). To increase the minimum arm freq just increase the number. For tuinslack's case the number would be 950000.

In the cpufreq folder you can find some other settings, such as the maxiumum arm freq. If you hold shift at boot the overclock will be disabled. Keeping the overclock activated will dramatically increase the temperature of the CPU.

Matthew
  • 979
  • 3
  • 10
  • 20