You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently updated a Raspberry Pi 3 to a recent LEDE git master build: Reboot (SNAPSHOT, r4576-9fe9175)
The kernel keeps logging the following errors:
[ 103.041158] bcm2835-cpufreq:bcm2835_cpufreq_set_clock:84: Failed to set clock: 600000 (-12)
[ 103.044492] bcm2835-cpufreq:bcm2835_cpufreq_driver_target_index:183: Error occurred setting a new frequency (600000)
[ 103.047857] cpufreq: __target_index: Failed to change cpu frequency: -22
[ 103.401167] bcm2835-cpufreq:bcm2835_cpufreq_set_clock:84: Failed to set clock: 600000 (-12)
[ 103.404517] bcm2835-cpufreq:bcm2835_cpufreq_driver_target_index:183: Error occurred setting a new frequency (600000)
[ 103.407890] cpufreq: __target_index: Failed to change cpu frequency: -22
[ 103.761155] bcm2835-cpufreq:bcm2835_cpufreq_set_clock:84: Failed to set clock: 600000 (-12)
[ 103.764491] bcm2835-cpufreq:bcm2835_cpufreq_driver_target_index:183: Error occurred setting a new frequency (600000)
[ 103.767870] cpufreq: __target_index: Failed to change cpu frequency: -22
I am seeing ~10ms latency spikes for traffic through the device and I believe these errors are the reason. If I force the scheduler to only run the CPU at its maximum speed with the command below then then errors cease and the latency spikes disappear:
I looked into the kernel sources and the messages above appear to be saying that there was an error when asking the Pi firmware to change the CPU speed.
I know there is a HW quirk in the RPi3 which means the UART is effected by the CPU speed. I wonder whether this has anything to do with the firmware rejecting the speed change: RPi-Distro/repo#22
The text was updated successfully, but these errors were encountered:
Digging up this older bug report to leave a partial solution that may be useful to others, but this is still an active issue for me with Raspberry Pi 3 Model B Rev 1.2 running GoldenOrb_2020-05-16 (OpenWrt 18.06.7).
I've seen in other places on Raspberry Pi references that this tends to be tied to something related to USB. For whatever reason, eliminating CPU frequency switching by any of several possible means does solve the problem. You can either set the frequency manually to a single frequency in /boot/config.txt, or (as I've chosen to do) you can change the governor after boot using /etc/rc.local to one of the two governors that only uses a single frequency (either performance or powersave). In my case, I've locked mine to powersave, since my Pi is rarely heavily loaded.
In /etc/rc.local, add the line:
echo powersave > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
Or, of course, use performance if you need full speed.
If you need something in between, it's relatively easy to set a fixed frequency anywhere from 100 to 1200 (on the 3B) in config.txt, as well, and there is ample info on how to do that on the Pi forums (including tons of fairly advanced info in the Advanced users > Overclocking thread, which is 46 pages long and includes participation from one of the main board engineers for the Pi).
jburgess777:
I recently updated a Raspberry Pi 3 to a recent LEDE git master build: Reboot (SNAPSHOT, r4576-9fe9175)
The kernel keeps logging the following errors:
[ 103.041158] bcm2835-cpufreq:bcm2835_cpufreq_set_clock:84: Failed to set clock: 600000 (-12)
[ 103.044492] bcm2835-cpufreq:bcm2835_cpufreq_driver_target_index:183: Error occurred setting a new frequency (600000)
[ 103.047857] cpufreq: __target_index: Failed to change cpu frequency: -22
[ 103.401167] bcm2835-cpufreq:bcm2835_cpufreq_set_clock:84: Failed to set clock: 600000 (-12)
[ 103.404517] bcm2835-cpufreq:bcm2835_cpufreq_driver_target_index:183: Error occurred setting a new frequency (600000)
[ 103.407890] cpufreq: __target_index: Failed to change cpu frequency: -22
[ 103.761155] bcm2835-cpufreq:bcm2835_cpufreq_set_clock:84: Failed to set clock: 600000 (-12)
[ 103.764491] bcm2835-cpufreq:bcm2835_cpufreq_driver_target_index:183: Error occurred setting a new frequency (600000)
[ 103.767870] cpufreq: __target_index: Failed to change cpu frequency: -22
I am seeing ~10ms latency spikes for traffic through the device and I believe these errors are the reason. If I force the scheduler to only run the CPU at its maximum speed with the command below then then errors cease and the latency spikes disappear:
echo 1200000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
I looked into the kernel sources and the messages above appear to be saying that there was an error when asking the Pi firmware to change the CPU speed.
I know there is a HW quirk in the RPi3 which means the UART is effected by the CPU speed. I wonder whether this has anything to do with the firmware rejecting the speed change:
RPi-Distro/repo#22
The text was updated successfully, but these errors were encountered: