diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-06-21 01:03:26 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-06-21 01:03:28 +0000 |
commit | 14605d77b5e0aabc741b2b69d53e9e772f010b23 (patch) | |
tree | b528f70cbfa22decfea5899870efc1a42e7b7778 /en/devices/tech/power/component.html | |
parent | 8560a623b8040782583740e9dd1cbc4be310a568 (diff) | |
parent | d72514453123a8634ae55406807d77f03362a2bd (diff) | |
download | source.android.com-14605d77b5e0aabc741b2b69d53e9e772f010b23.tar.gz |
Merge "Docs: Changes to source.android.com"
Diffstat (limited to 'en/devices/tech/power/component.html')
-rw-r--r-- | en/devices/tech/power/component.html | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/en/devices/tech/power/component.html b/en/devices/tech/power/component.html index 90edf65a..0b69358c 100644 --- a/en/devices/tech/power/component.html +++ b/en/devices/tech/power/component.html @@ -105,8 +105,8 @@ in low-power states inappropriate for measuring active power use. To prevent the suspending while the screen is off, use a temporary partial wakelock. Using a USB cable, connect the device to a development host, then issue the following command:</p> -<pre> -$ adb shell "echo temporary > /sys/power/wake_lock" +<pre class="devsite-terminal devsite-click-to-copy"> +adb shell "echo temporary > /sys/power/wake_lock" </pre> <p>While in <code>wake_lock</code>, the screen off state does not trigger a system suspend. @@ -114,8 +114,8 @@ $ adb shell "echo temporary > /sys/power/wake_lock" <p>To remove the wakelock:</p> -<pre> -$ adb shell "echo temporary > /sys/power/wake_unlock" +<pre class="devsite-terminal devsite-click-to-copy"> +adb shell "echo temporary > /sys/power/wake_unlock" </pre> <h3 id="measure-suspend">Measuring system suspend</h3> @@ -155,7 +155,7 @@ scheduling activity.</p> <p>You must specify the available CPU speeds for your device in the power profile <code>cpu.speeds</code> entry. To get a list of available CPU speeds, run:</p> -<pre> +<pre class="devsite-terminal devsite-click-to-copy"> adb shell cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state </pre> @@ -167,12 +167,12 @@ controlling CPU speed using the userspace cpufreq governor and using sysfs inter speed. For example, to set speed for 200MHz on a system with only 1 CPU or all CPUs sharing a common cpufreq policy, use the system console or adb shell to run the following commands:</p> -<pre> -echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor -echo 200000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq -echo 200000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq -echo 200000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed -cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq +<pre class="devsite-click-to-copy"> +<code class="devsite-terminal">echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor</code> +<code class="devsite-terminal">echo 200000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq</code> +<code class="devsite-terminal">echo 200000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq</code> +<code class="devsite-terminal">echo 200000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed</code> +<code class="devsite-terminal">cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq</code> </pre> <p class="note"> @@ -187,7 +187,7 @@ setting the maximum speed.</p> <p>To measure current consumed by a CPU running at various speeds, use the system console to place the CPU in a CPU-bound loop using the command:</p> -<pre> +<pre class="devsite-click-to-copy"> # while true; do true; done </pre> |