# RaspberryPi2 clock speed



## Phishfry (Jan 4, 2017)

Figured out how to get RPI2 running at 900mhz at boot versus default 600mhz

To survive reboot I had to add to sysctl.conf and config.txt
`echo hw.cpufreq.turbo=1 >> /etc/sysctl.conf`
`echo force_turbo=1 >> /boot/msdos/config.txt`
`reboot`

```
root@rpi2:~ # dmesg | grep cpufreq
bcm2835_cpufreq0: <CPU Frequency Control> on cpu0
bcm2835_cpufreq0: ARM 900MHz, Core 250MHz, SDRAM 450MHz, Turbo ON
```

Here are the tunables.
https://lists.freebsd.org/pipermail/freebsd-arm/2014-October/009451.html


----------



## Phishfry (Jan 4, 2017)

To underclock to 300mhz, the lowest speed.

`echo hw.cpufreq.arm_freq: 300000000 >> /etc/sysctl.conf`
`echo arm_freq=300 >> /boot/msdos/config.txt`
`reboot`

```
root@rpi2:~ # dmesg | grep cpufreq
bcm2835_cpufreq0: <CPU Frequency Control> on cpu0
bcm2835_cpufreq0: ARM 300MHz, Core 250MHz, SDRAM 400MHz, Turbo OFF
```


----------



## Phishfry (Jan 4, 2017)

My One Wire temperature sensors went offline at 300mhz clockspeed. ow(4) and owc(4) were working.
Not so with ow_temp(4). It showed OID not found

This is at stock 600mhz with my 5 temperature detectors.

```
root@rpi2:~ # sysctl dev.ow_temp
dev.ow_temp.4.parasite: 0
dev.ow_temp.4.reading_interval: 1000
dev.ow_temp.4.badread: 0
dev.ow_temp.4.badcrc: 3
dev.ow_temp.4.temperature: 22.687C
dev.ow_temp.4.%parent: ow5
dev.ow_temp.4.%pnpinfo: romid=28:ee:8b:09:20:16:01:80
dev.ow_temp.4.%location:
dev.ow_temp.4.%driver: ow_temp
dev.ow_temp.4.%desc: Advanced One Wire Temperature
dev.ow_temp.3.parasite: 0
dev.ow_temp.3.reading_interval: 1000
dev.ow_temp.3.badread: 0
dev.ow_temp.3.badcrc: 0
dev.ow_temp.3.temperature: 22.187C
dev.ow_temp.3.%parent: ow4
dev.ow_temp.3.%pnpinfo: romid=28:ee:a3:1c:20:16:01:ff
dev.ow_temp.3.%location:
dev.ow_temp.3.%driver: ow_temp
dev.ow_temp.3.%desc: Advanced One Wire Temperature
dev.ow_temp.2.parasite: 0
dev.ow_temp.2.reading_interval: 1000
dev.ow_temp.2.badread: 0
dev.ow_temp.2.badcrc: 5
dev.ow_temp.2.temperature: 22.812C
dev.ow_temp.2.%parent: ow2
dev.ow_temp.2.%pnpinfo: romid=28:ee:e0:02:1d:16:02:59
dev.ow_temp.2.%location:
dev.ow_temp.2.%driver: ow_temp
dev.ow_temp.2.%desc: Advanced One Wire Temperature
dev.ow_temp.1.parasite: 0
dev.ow_temp.1.reading_interval: 1000
dev.ow_temp.1.badread: 0
dev.ow_temp.1.badcrc: 4
dev.ow_temp.1.temperature: 22.875C
dev.ow_temp.1.%parent: ow1
dev.ow_temp.1.%pnpinfo: romid=28:ee:9e:0a:20:16:01:a6
dev.ow_temp.1.%location:
dev.ow_temp.1.%driver: ow_temp
dev.ow_temp.1.%desc: Advanced One Wire Temperature
dev.ow_temp.0.parasite: 0
dev.ow_temp.0.reading_interval: 1000
dev.ow_temp.0.badread: 0
dev.ow_temp.0.badcrc: 5
dev.ow_temp.0.temperature: 22.562C
dev.ow_temp.0.%parent: ow0
dev.ow_temp.0.%pnpinfo: romid=28:ee:6c:0c:20:16:01:8a
dev.ow_temp.0.%location:
dev.ow_temp.0.%driver: ow_temp
dev.ow_temp.0.%desc: Advanced One Wire Temperature
dev.ow_temp.%parent:
```


----------



## Phishfry (Jan 4, 2017)

I might need to jiggle the knobs some more. Seems 300mhz corrupted my install. Use with caution.



acheron said:


> Why don't you use powerd?


This will be my next angle.
Thank You


----------



## Phishfry (Jan 5, 2017)

Ok I have found that anything below 600mhz is out of spec and I see all kind of subtle irregularities.
Reading on the topic there is not much power savings below 600mhz anyway. The power draw is more about accessories and overhead than cores or clockspeed. The cpu's are efficient.

I do like the fact that I can manually set turbo for a good boost.


----------



## ronaldlees (Jan 8, 2017)

Phishfry said:


> My One Wire temperature sensors went offline at 300mhz clockspeed. ow(4) and owc(4) were working.
> Not so with ow_temp(4). It showed OID not found
> 
> This is at stock 600mhz with my 5 temperature detectors.
> ...



Did you notice a significant drop in power consumption? I suppose that would be  the goal for 300 Mhz?  The reason I ask is that some rpi forum members indicated that other stuff in the SoC eats a substantial fixed share, and that running very low clock speeds didn't amount to enough savings to warrant doing it.


----------



## Phishfry (Jan 8, 2017)

Exactly what I found power wise. It also did not corrupt my install, it was my error.
ow_temp did go offline at 300mhz.

I had originally posted this which wiped all other settings:
`echo arm_freq=300 > /boot/msdos/config.txt`

Instead of this:
`echo arm_freq=300 >> /boot/msdos/config.txt`

Config.txt contains many other critical settings that are needed.


----------

