4

According to documentation vcgencmd get_throttled can inform about 4 states:

  • under-voltage
  • arm frequency capped
  • throttled
  • soft temperature limit active (from my understanding of this: non-existent in RPi 4B)

and their past presence. I decided to test thermals in my Raspberry Pi 4B (4GB). Before tests I do sudo reboot. While running stress-ng --cpu 0 --cpu-method fft (as here) I also run my bash script:

while :
do
  sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
  vcgencmd measure_temp
  vcgencmd get_throttled
  sleep 1
  echo ''
done

Before test I get sth like:

600000
temp=56.0'C
throttled=0x0

Than while I run test I have:

1500000
temp=71.0'C
throttled=0x0
[...]
1500000
temp=82.0'C
throttled=0x20000 [Arm frequency capping has occurred]
[...]
1500000
temp=83.0'C
throttled=0x20002 [Arm frequency capping has occurred, Arm frequency capped]
[...]
1500000
temp=84.0'C
throttled=0x20000  [Arm frequency capping has occurred]

1500000
temp=82.0'C
throttled=0x60002 [Arm frequency capping has occurred, Throttling has occurred, Arm frequency capped]
[...]

The state 0x60002 almost stays the same for the rest of the test. Once I managed to see:

1500000
temp=83.0'C
throttled=0x60006

So here are my questions:

  1. What does it mean that "Arm frequency capped" even though I have full frequency?
  2. What is the difference between throttling and frequency cap? Why the second one appears much earlier?
  3. Why my frequency does not drop at any time of the test even though frequency capped and throttling is reported?
  • 1
    Good question! What was your documentation source on the value in /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq? – Seamus Jun 5 at 19:17
  • @Seamus Ohh right I've just found it somewhere in the internet... While using vcgencmd measure_clock arm I now see that it's caped to ~1 Ghz. Ok so then what's the difference between throttling and cap freq state? And what is measured in /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq? – Maciej Dzieżyc Jun 5 at 19:33
  • I don't know... I assumed you had found that somewhere in the documentation published by The Organization. – Seamus Jun 5 at 21:03
  • 1
    for measuring the cpu clock (which will be the same for all cores) instead of cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq do either cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq or vcgencmd measure_clock arm – Jaromanda X Jun 5 at 23:41
3

Arm frequency capping has occurred means that at some point, since last boot, capping has occurred, but that doesn't mean the cpu is currently capped

i.e. in the one second between the previous reading and the current reading the frequency WAS capped, but is no longer capped (right now) ...

Also, you want to measure /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq rather than /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq

Measuring scaling_cur_freq gives actual cpu clock - not sure about the reason for this scaling_*_freq vs cpuinfo_*_freq entries

see this unix.stackexchange.com post for more info on scaling_*_freq vs cpuinfo_*_freq

a better(? since you don't need sudo) measurement can be made using

vcgencmd measure_clock arm

so, the monitoring script would look like

while :
do
  vcgencmd measure_clock arm
  vcgencmd measure_temp
  vcgencmd get_throttled
  sleep 1
  echo ''
done

As for throttling vs capping. I did read that throttling happens for undervoltage condition vs capping is for overheating

My piB 2 has a poor power supply and always gets an undervoltage condition during boot, hence throttled=0x50000 at boot ... undervoltage + throttled has occurred (since boot)

| improve this answer | |
  • 1
    thx! "throttling happens for undervoltage condition" - so why then udervoltage is not reported (16. bit is 0)? – Maciej Dzieżyc Jun 6 at 9:00
  • yeah, I know ... perhaps other things also cause throttling – Jaromanda X Jun 6 at 9:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.