From b9e20efefbec9d5cda6c1963629ab8b240082d78 Mon Sep 17 00:00:00 2001 From: WizardTim <43670403+WizardTim@users.noreply.github.com> Date: Thu, 20 May 2021 12:58:04 +1000 Subject: [PATCH 1/7] Add more information about DVFS Information added in this commit is from - Own experimentation - Forum post https://www.raspberrypi.org/forums/viewtopic.php?p=1804133#p1804133 --- hardware/raspberrypi/frequency-management.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/hardware/raspberrypi/frequency-management.md b/hardware/raspberrypi/frequency-management.md index 4ae9d942fd..4f27e0007b 100644 --- a/hardware/raspberrypi/frequency-management.md +++ b/hardware/raspberrypi/frequency-management.md @@ -8,14 +8,27 @@ For Raspberry Pi 3 Model B+, the PCB technology has been changed to provide bett The Raspberry Pi 4 Model B continues with the same PCB technology as the Raspberry Pi 3B+ to help dissipate excess heat. There is currently no soft limit defined. -### DVFS on the Raspberry Pi 4B +### DVFS on the Raspberry Pi 4, 400 and CM4 -On Raspberry Pi 4 Model B, firmware from late November 2019 onwards implements Dynamic Voltage and Frequency Scaling. This technique (outlined on Wikipedia [here](https://en.wikipedia.org/wiki/Dynamic_voltage_scaling)) allows Raspberry Pi 4B to run at lower temperatures whilst still providing the same performance. +On Raspberry Pi 4 Model B, firmware from late November 2019 onwards implements Dynamic Voltage and Frequency Scaling (DVFS). This technique (outlined on Wikipedia [here](https://en.wikipedia.org/wiki/Dynamic_voltage_scaling)) allows Raspberry Pi 4B to run at lower temperatures whilst still providing the same performance. Various clocks (e.g. ARM, Core, V3D, ISP, H264, HEVC) inside the SoC are monitored by the firmware, and whenever they are not running at full speed, the voltage supplied to the particular part of the chip driven by the clock is reduced relative to the reduction from full speed. In effect, only enough voltage is supplied to keep the block running correctly at the specific speed at which it is running. This can result in significant reductions in power used by the SoC, and therefore in the overall heat being produced. +Due to possible system stability problems involved with running an undervoltage, especially when using undervoltaged fixed clock peripherals (eg. PCIe), two DVFS modes are available and can be configured in `/boot/config.txt` with the below properties. GUI desktop systems should use `dvfs=2`, headless systems may benefit from `dvfs=1` provided peripheral use is managed. + +| property=value | Description | +|----------------|---------------------| +| dvfs=1 | allow under-voltage | +| dvfs=2 | no under-voltage | + In addition, a more stepped CPU governor is also used to produce finer-grained control of ARM core frequencies, which means the DVFS is more effective. The steps are now 1500MHz, 1000MHz, 750MHz, and 600MHz. These steps can also help when the SoC is being throttled, and mean that throttling all the way back to 600MHz is much less likely, giving an overall increase in fully loaded performance. +The default CPU governor is `ondemand`, the governer can be manually changed for example with `sudo cpufreq-set -g powersave` to reduce idle power consumption. + +DVFS is supported on Raspberry Pi 4B, 400 and CM4 devices with supporting firmware. + + + ### Heatsinks Whilst heatsinks are not necessary to prevent overheating damage to the SoC (the thermal throttling mechanism handles that), a heatsink or small fan will help if you wish to reduce the amount of thermal throttling that takes place. Depending on the exact circumstances, mounting the Pi vertically can also help with heat dissipation, as doing so can improve air flow. From 1bd25d2ecbb10e896fa366ff3b1e3003ddb488a8 Mon Sep 17 00:00:00 2001 From: WizardTim <43670403+WizardTim@users.noreply.github.com> Date: Thu, 20 May 2021 13:06:53 +1000 Subject: [PATCH 2/7] Typo --- hardware/raspberrypi/frequency-management.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware/raspberrypi/frequency-management.md b/hardware/raspberrypi/frequency-management.md index 4f27e0007b..308ad1c454 100644 --- a/hardware/raspberrypi/frequency-management.md +++ b/hardware/raspberrypi/frequency-management.md @@ -8,7 +8,7 @@ For Raspberry Pi 3 Model B+, the PCB technology has been changed to provide bett The Raspberry Pi 4 Model B continues with the same PCB technology as the Raspberry Pi 3B+ to help dissipate excess heat. There is currently no soft limit defined. -### DVFS on the Raspberry Pi 4, 400 and CM4 +### DVFS on the Raspberry Pi 4B, 400 and CM4 On Raspberry Pi 4 Model B, firmware from late November 2019 onwards implements Dynamic Voltage and Frequency Scaling (DVFS). This technique (outlined on Wikipedia [here](https://en.wikipedia.org/wiki/Dynamic_voltage_scaling)) allows Raspberry Pi 4B to run at lower temperatures whilst still providing the same performance. From 180295c363bdfad130016e9de5ab9a9b180a8b25 Mon Sep 17 00:00:00 2001 From: WizardTim <43670403+WizardTim@users.noreply.github.com> Date: Thu, 20 May 2021 18:56:04 +1000 Subject: [PATCH 3/7] Style guide edit --- hardware/raspberrypi/frequency-management.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware/raspberrypi/frequency-management.md b/hardware/raspberrypi/frequency-management.md index 308ad1c454..5f13123db6 100644 --- a/hardware/raspberrypi/frequency-management.md +++ b/hardware/raspberrypi/frequency-management.md @@ -8,7 +8,7 @@ For Raspberry Pi 3 Model B+, the PCB technology has been changed to provide bett The Raspberry Pi 4 Model B continues with the same PCB technology as the Raspberry Pi 3B+ to help dissipate excess heat. There is currently no soft limit defined. -### DVFS on the Raspberry Pi 4B, 400 and CM4 +### DVFS on the Raspberry Pi 4 On Raspberry Pi 4 Model B, firmware from late November 2019 onwards implements Dynamic Voltage and Frequency Scaling (DVFS). This technique (outlined on Wikipedia [here](https://en.wikipedia.org/wiki/Dynamic_voltage_scaling)) allows Raspberry Pi 4B to run at lower temperatures whilst still providing the same performance. From ab961ebab6d49c2812c159a17a11730261f575ff Mon Sep 17 00:00:00 2001 From: WizardTim <43670403+WizardTim@users.noreply.github.com> Date: Thu, 20 May 2021 19:39:30 +1000 Subject: [PATCH 4/7] Raspberry Pi 4 devices reference style --- hardware/raspberrypi/frequency-management.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hardware/raspberrypi/frequency-management.md b/hardware/raspberrypi/frequency-management.md index 5f13123db6..ee5fbfbc6e 100644 --- a/hardware/raspberrypi/frequency-management.md +++ b/hardware/raspberrypi/frequency-management.md @@ -8,9 +8,9 @@ For Raspberry Pi 3 Model B+, the PCB technology has been changed to provide bett The Raspberry Pi 4 Model B continues with the same PCB technology as the Raspberry Pi 3B+ to help dissipate excess heat. There is currently no soft limit defined. -### DVFS on the Raspberry Pi 4 +### DVFS on the Raspberry Pi 4 (4B, 400 and CM4) -On Raspberry Pi 4 Model B, firmware from late November 2019 onwards implements Dynamic Voltage and Frequency Scaling (DVFS). This technique (outlined on Wikipedia [here](https://en.wikipedia.org/wiki/Dynamic_voltage_scaling)) allows Raspberry Pi 4B to run at lower temperatures whilst still providing the same performance. +Raspberry Pi 4 devices implement Dynamic Voltage and Frequency Scaling (DVFS). This technique (outlined on Wikipedia [here](https://en.wikipedia.org/wiki/Dynamic_voltage_scaling)) allows Raspberry Pi 4 devices to run at lower temperatures whilst still providing the same performance. Various clocks (e.g. ARM, Core, V3D, ISP, H264, HEVC) inside the SoC are monitored by the firmware, and whenever they are not running at full speed, the voltage supplied to the particular part of the chip driven by the clock is reduced relative to the reduction from full speed. In effect, only enough voltage is supplied to keep the block running correctly at the specific speed at which it is running. This can result in significant reductions in power used by the SoC, and therefore in the overall heat being produced. @@ -25,10 +25,6 @@ In addition, a more stepped CPU governor is also used to produce finer-grained c The default CPU governor is `ondemand`, the governer can be manually changed for example with `sudo cpufreq-set -g powersave` to reduce idle power consumption. -DVFS is supported on Raspberry Pi 4B, 400 and CM4 devices with supporting firmware. - - - ### Heatsinks Whilst heatsinks are not necessary to prevent overheating damage to the SoC (the thermal throttling mechanism handles that), a heatsink or small fan will help if you wish to reduce the amount of thermal throttling that takes place. Depending on the exact circumstances, mounting the Pi vertically can also help with heat dissipation, as doing so can improve air flow. From 200932ef7cc2447f3f3a9dd35f2b89b7afce5bf3 Mon Sep 17 00:00:00 2001 From: WizardTim <43670403+WizardTim@users.noreply.github.com> Date: Thu, 20 May 2021 22:12:23 +1000 Subject: [PATCH 5/7] `cpufrequtils` usage style --- hardware/raspberrypi/frequency-management.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hardware/raspberrypi/frequency-management.md b/hardware/raspberrypi/frequency-management.md index ee5fbfbc6e..e233fc0c87 100644 --- a/hardware/raspberrypi/frequency-management.md +++ b/hardware/raspberrypi/frequency-management.md @@ -23,7 +23,11 @@ Due to possible system stability problems involved with running an undervoltage, In addition, a more stepped CPU governor is also used to produce finer-grained control of ARM core frequencies, which means the DVFS is more effective. The steps are now 1500MHz, 1000MHz, 750MHz, and 600MHz. These steps can also help when the SoC is being throttled, and mean that throttling all the way back to 600MHz is much less likely, giving an overall increase in fully loaded performance. -The default CPU governor is `ondemand`, the governer can be manually changed for example with `sudo cpufreq-set -g powersave` to reduce idle power consumption. +The default CPU governor is `ondemand`, the governor can be manually changed with the package `cpufrequtils` to reduce idle power consumption: +``` +sudo apt install cpufrequtils +sudo cpufreq-set -g powersave +``` ### Heatsinks From 0dc12020ba5fe43e24f9e9eff6f739363c356121 Mon Sep 17 00:00:00 2001 From: WizardTim <43670403+WizardTim@users.noreply.github.com> Date: Fri, 21 May 2021 12:36:49 +1000 Subject: [PATCH 6/7] Minor sentance structure --- hardware/raspberrypi/frequency-management.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware/raspberrypi/frequency-management.md b/hardware/raspberrypi/frequency-management.md index e233fc0c87..a7b42169d9 100644 --- a/hardware/raspberrypi/frequency-management.md +++ b/hardware/raspberrypi/frequency-management.md @@ -23,7 +23,7 @@ Due to possible system stability problems involved with running an undervoltage, In addition, a more stepped CPU governor is also used to produce finer-grained control of ARM core frequencies, which means the DVFS is more effective. The steps are now 1500MHz, 1000MHz, 750MHz, and 600MHz. These steps can also help when the SoC is being throttled, and mean that throttling all the way back to 600MHz is much less likely, giving an overall increase in fully loaded performance. -The default CPU governor is `ondemand`, the governor can be manually changed with the package `cpufrequtils` to reduce idle power consumption: +The default CPU governor is `ondemand`, the governor can be manually changed with the `cpufreq-set` command (from the `cpufrequtils` package) to reduce idle power consumption: ``` sudo apt install cpufrequtils sudo cpufreq-set -g powersave From c0802fd8ea129bf01a0882ddd8de22ab098b6057 Mon Sep 17 00:00:00 2001 From: WizardTim <43670403+WizardTim@users.noreply.github.com> Date: Fri, 21 May 2021 12:50:41 +1000 Subject: [PATCH 7/7] Specify default DVFS setting --- hardware/raspberrypi/frequency-management.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hardware/raspberrypi/frequency-management.md b/hardware/raspberrypi/frequency-management.md index a7b42169d9..399c18ce81 100644 --- a/hardware/raspberrypi/frequency-management.md +++ b/hardware/raspberrypi/frequency-management.md @@ -16,10 +16,10 @@ Various clocks (e.g. ARM, Core, V3D, ISP, H264, HEVC) inside the SoC are monitor Due to possible system stability problems involved with running an undervoltage, especially when using undervoltaged fixed clock peripherals (eg. PCIe), two DVFS modes are available and can be configured in `/boot/config.txt` with the below properties. GUI desktop systems should use `dvfs=2`, headless systems may benefit from `dvfs=1` provided peripheral use is managed. -| property=value | Description | -|----------------|---------------------| -| dvfs=1 | allow under-voltage | -| dvfs=2 | no under-voltage | +| property=value | Description | +|----------------|------------------------------| +| dvfs=1 | allow under-voltage | +| dvfs=2 | no under-voltage (default) | In addition, a more stepped CPU governor is also used to produce finer-grained control of ARM core frequencies, which means the DVFS is more effective. The steps are now 1500MHz, 1000MHz, 750MHz, and 600MHz. These steps can also help when the SoC is being throttled, and mean that throttling all the way back to 600MHz is much less likely, giving an overall increase in fully loaded performance.