Jump to content

OrangePi PC CPU Frequency


fjen

Recommended Posts

Hi, i am running armbian stretch on an OrangePi PC with "-dev" kernel and uboot. This was originally an jessie installation with legacy kernel, that was upgraded.

I'm wondering now, why the cpu frequency only scales between 648 and 1008 MHz instead of 408 and 1296 MHz. Is this to be expected? cpufrequtils is configured to the latter.

 

# lscpu
Architecture:          armv7l
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    4
Socket(s):             1
Model:                 5
Model name:            ARMv7 Processor rev 5 (v7l)
CPU max MHz:           1008,0000
CPU min MHz:           648,0000
BogoMIPS:              30.85
Flags:                 half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm

 

armbianmonitor -u: http://ix.io/1xNM

Link to comment
Share on other sites

2 hours ago, fjen said:

Hi, i am running armbian stretch on an OrangePi PC with "-dev" kernel and uboot. This was originally an jessie installation with legacy kernel, that was upgraded.

I'm wondering now, why the cpu frequency only scales between 648 and 1008 MHz instead of 408 and 1296 MHz. Is this to be expected? cpufrequtils is configured to the latter.

 

 

Does your

 /etc/default/cpufrequtils look like
 

# WARNING: this file will be replaced on board support package (linux-root-...) upgrade
ENABLE=true
MIN_SPEED=408000
MAX_SPEED=1295000
GOVERNOR=ondemand

1) see the warning! the file maybe altered after a upgrade

2) 408000 is maybe a typo - check with cpufreq-info  it should mostly be 480000

3) this file will only active after a reboot/restart 

 

partly cpufreq-info output of a OPi Zero:
 

hardware limits: 120 MHz - 1.01 GHz
  available frequency steps: 120 MHz, 240 MHz, 480 MHz, 648 MHz, 816 MHz, 960 MHz, 1.01 GHz

 

Link to comment
Share on other sites

Yes, /etc/default/cpufrequtils is mostly identical:

ENABLE=true
MIN_SPEED=408000
MAX_SPEED=1296000
GOVERNOR=ondemand

cpufreq-info shows:

hardware limits: 648 MHz - 1.01 GHz
available frequency steps: 648 MHz, 816 MHz, 1.01 GHz

The H3 SoC is rated to 1.3 GHz and was running about that high with the legacy kernel.

Link to comment
Share on other sites

3 hours ago, fjen said:

Hi, i am running armbian stretch on an OrangePi PC with "-dev" kernel and uboot. This was originally an jessie installation with legacy kernel, that was upgraded.


Move to 4.19.y and it should work as expected. It is available in beta.armbian.com repository for now. Beware that you are going into developer areas where things might be broken.

Link to comment
Share on other sites

Thank you, that worked!

hardware limits: 120 MHz - 1.37 GHz
available frequency steps: 120 MHz, 240 MHz, 480 MHz, 648 MHz, 816 MHz, 960 MHz, 1.01 GHz, 1.06 GHz, 1.10 GHz, 1.15 GHz, 1.20 GHz, 1.22 GHz, 1.25 GHz, 1.30 GHz, 1.34 GHz, 1.37 GHz

 

Link to comment
Share on other sites

26 minutes ago, guidol said:

here you see 480000 and not 40800

 

The 408000 setting came from the package.

 

I've set the frequencies to this now:

MIN_SPEED=120000
MAX_SPEED=1400000

Link to comment
Share on other sites

 
The 408000 setting came from the package.
 
I've set the frequencies to this now:
MIN_SPEED=120000
MAX_SPEED=1400000
Note that anything lower than 480 MHz will trash your storage performance probably. And power saving is also minimal. Consider using 480 as min freq.
Link to comment
Share on other sites

Is there any source for that claim? I use this OPi mostly headless for music streaming, so storage performance is irrelevant, standby drain is not. Anyway, i will check the idle power consumption with both settings.

Link to comment
Share on other sites

Idle measurements with a usb meter on an 5.3v adapter by changing MIN_SPEED and setting GOVERNOR=powersave:

120MHz: 0.28 A

480MHz: 0.28 A

960MHz: 0.29 A

1200MHz: 0.31 A

 

Nothing plugged in, except for a usb wifi adapter (no traffic) which is pulling 0.18 A itself. Maybe i exchange that one...

Link to comment
Share on other sites

And check storage performance with all those settings now. You can run it using armbianmonitor with some switch (can't remember which one).
My statement is based on some tkaiser's forum writing, and he's rather proven to not spread bs (he just did such tests AFAIK).

Link to comment
Share on other sites

On 1/8/2019 at 7:57 PM, Igor said:


Move to 4.19.y and it should work as expected. It is available in beta.armbian.com repository for now. Beware that you are going into developer areas where things might be broken.

 

@Igor, with latest upgrade the "typo" (408 vs 480) is still in cpufrequtils. Is there a chance (I mean: time to do it) to have it corrected in the source? THe related thread:

 

Link to comment
Share on other sites

3 minutes ago, piknew said:

with latest upgrade the "typo" (408 vs 480) is still in cpufrequtils. Is there a chance (I mean: time to do it) to have it corrected in the source? THe related thread:


Can the problem be replicated with the new kernel? Otherwise it is not really worth fixing since we will not touching this file via apt-update anymore. 

Link to comment
Share on other sites

I will change it on one of my platforms to verify. It will be Orange Pi+ 2 - just a moment ago I have changed it back to original package version (with "408") and rebooted:

 

  ___                               ____  _
 / _ \ _ __ __ _ _ __   __ _  ___  |  _ \(_)  _
| | | | '__/ _` | '_ \ / _` |/ _ \ | |_) | |_| |_
| |_| | | | (_| | | | | (_| |  __/ |  __/| |_   _|
 \___/|_|  \__,_|_| |_|\__, |\___| |_|   |_| |_|
                       |___/

Welcome to ARMBIAN 5.70 stable Debian GNU/Linux 9 (stretch) 4.19.13-sunxi
System load:   1.43 0.34 0.11   Up time:       0 min
Memory usage:  3 % of 2014MB    IP:            192.168.10.230
CPU temp:      61°C
Usage of /:    16% of 15G

Last login: Mon Jan 14 17:56:01 2019 from 192.168.10.210

[root@PKHELPER ~]# cat /etc/default/cpufrequtils
# WARNING: this file will be replaced on board support package (linux-root-...) upgrade
ENABLE=true
MIN_SPEED=408000
MAX_SPEED=1296000
GOVERNOR=ondemand
[root@PKHELPER ~]# date && uptime
Mon Jan 14 17:58:24 CET 2019
 17:58:24 up 0 min,  1 user,  load average: 0.73, 0.29, 0.10
[root@PKHELPER ~]# apt list --installed | grep next

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

linux-dtb-next-sunxi/stretch,now 5.70 armhf [installed]
linux-headers-next-sunxi/stretch,now 5.70 armhf [installed]
linux-image-next-sunxi/stretch,now 5.70 armhf [installed]
linux-stretch-root-next-orangepiplus/stretch,now 5.70 armhf [installed]
linux-u-boot-orangepiplus-next/stretch,now 5.70 armhf [installed]
[root@PKHELPER ~]#

 

Link to comment
Share on other sites

It seems that with kernel 4.19.13-sunxi the typo is no longer causing issues (at least on OPi+2, which I've selected to perform test):

 

  ___                               ____  _
 / _ \ _ __ __ _ _ __   __ _  ___  |  _ \(_)  _
| | | | '__/ _` | '_ \ / _` |/ _ \ | |_) | |_| |_
| |_| | | | (_| | | | | (_| |  __/ |  __/| |_   _|
 \___/|_|  \__,_|_| |_|\__, |\___| |_|   |_| |_|
                       |___/

Welcome to ARMBIAN 5.70 stable Debian GNU/Linux 9 (stretch) 4.19.13-sunxi
System load:   2.25 1.43 0.62   Up time:       10 days
Memory usage:  4 % of 2014MB    IP:            192.168.10.230
CPU temp:      68°C
Usage of /:    16% of 15G

Last login: Fri Jan 25 08:14:57 2019 from 192.168.10.106

[root@PKHELPER ~]# uptime
 08:19:41 up 10 days, 14:22,  2 users,  load average: 2.31, 1.46, 0.63
[root@PKHELPER ~]# date
Fri Jan 25 08:19:48 CET 2019
[root@PKHELPER ~]# cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: cpufreq-dt
  CPUs which run at the same hardware frequency: 0 1 2 3
  CPUs which need to have their frequency coordinated by software: 0 1 2 3
  maximum transition latency: 2.04 ms.
  hardware limits: 120 MHz - 1.37 GHz
  available frequency steps: 120 MHz, 240 MHz, 480 MHz, 648 MHz, 816 MHz, 960 MHz, 1.01 GHz, 1.06 GHz, 1.10 GHz, 1.15 GHz, 1.20 GHz, 1.22 GHz, 1.25 GHz, 1.30 GHz, 1.34 GHz, 1.37 GHz
  available cpufreq governors: conservative, userspace, powersave, ondemand, performance, schedutil
  current policy: frequency should be within 408 MHz and 1.10 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1.10 GHz (asserted by call to hardware).
  cpufreq stats: 120 MHz:0.00%, 240 MHz:0.00%, 480 MHz:99.18%, 648 MHz:0.00%, 816 MHz:0.00%, 960 MHz:0.00%, 1.01 GHz:0.00%, 1.06 GHz:0.00%, 1.10 GHz:0.14%, 1.15 GHz:0.00%, 1.20 GHz:0.00%, 1.22 GHz:0.00%, 1.25 GHz:0.00%, 1.30 GHz:0.68%, 1.34 GHz:0.00%, 1.37 GHz:0.00%  (9633)
analyzing CPU 1:
  driver: cpufreq-dt
  CPUs which run at the same hardware frequency: 0 1 2 3
  CPUs which need to have their frequency coordinated by software: 0 1 2 3
  maximum transition latency: 2.04 ms.
  hardware limits: 120 MHz - 1.37 GHz
  available frequency steps: 120 MHz, 240 MHz, 480 MHz, 648 MHz, 816 MHz, 960 MHz, 1.01 GHz, 1.06 GHz, 1.10 GHz, 1.15 GHz, 1.20 GHz, 1.22 GHz, 1.25 GHz, 1.30 GHz, 1.34 GHz, 1.37 GHz
  available cpufreq governors: conservative, userspace, powersave, ondemand, performance, schedutil
  current policy: frequency should be within 408 MHz and 1.10 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1.10 GHz (asserted by call to hardware).
  cpufreq stats: 120 MHz:0.00%, 240 MHz:0.00%, 480 MHz:99.18%, 648 MHz:0.00%, 816 MHz:0.00%, 960 MHz:0.00%, 1.01 GHz:0.00%, 1.06 GHz:0.00%, 1.10 GHz:0.14%, 1.15 GHz:0.00%, 1.20 GHz:0.00%, 1.22 GHz:0.00%, 1.25 GHz:0.00%, 1.30 GHz:0.68%, 1.34 GHz:0.00%, 1.37 GHz:0.00%  (9633)
analyzing CPU 2:
  driver: cpufreq-dt
  CPUs which run at the same hardware frequency: 0 1 2 3
  CPUs which need to have their frequency coordinated by software: 0 1 2 3
  maximum transition latency: 2.04 ms.
  hardware limits: 120 MHz - 1.37 GHz
  available frequency steps: 120 MHz, 240 MHz, 480 MHz, 648 MHz, 816 MHz, 960 MHz, 1.01 GHz, 1.06 GHz, 1.10 GHz, 1.15 GHz, 1.20 GHz, 1.22 GHz, 1.25 GHz, 1.30 GHz, 1.34 GHz, 1.37 GHz
  available cpufreq governors: conservative, userspace, powersave, ondemand, performance, schedutil
  current policy: frequency should be within 408 MHz and 1.10 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1.10 GHz (asserted by call to hardware).
  cpufreq stats: 120 MHz:0.00%, 240 MHz:0.00%, 480 MHz:99.18%, 648 MHz:0.00%, 816 MHz:0.00%, 960 MHz:0.00%, 1.01 GHz:0.00%, 1.06 GHz:0.00%, 1.10 GHz:0.14%, 1.15 GHz:0.00%, 1.20 GHz:0.00%, 1.22 GHz:0.00%, 1.25 GHz:0.00%, 1.30 GHz:0.68%, 1.34 GHz:0.00%, 1.37 GHz:0.00%  (9633)
analyzing CPU 3:
  driver: cpufreq-dt
  CPUs which run at the same hardware frequency: 0 1 2 3
  CPUs which need to have their frequency coordinated by software: 0 1 2 3
  maximum transition latency: 2.04 ms.
  hardware limits: 120 MHz - 1.37 GHz
  available frequency steps: 120 MHz, 240 MHz, 480 MHz, 648 MHz, 816 MHz, 960 MHz, 1.01 GHz, 1.06 GHz, 1.10 GHz, 1.15 GHz, 1.20 GHz, 1.22 GHz, 1.25 GHz, 1.30 GHz, 1.34 GHz, 1.37 GHz
  available cpufreq governors: conservative, userspace, powersave, ondemand, performance, schedutil
  current policy: frequency should be within 408 MHz and 1.10 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1.10 GHz (asserted by call to hardware).
  cpufreq stats: 120 MHz:0.00%, 240 MHz:0.00%, 480 MHz:99.18%, 648 MHz:0.00%, 816 MHz:0.00%, 960 MHz:0.00%, 1.01 GHz:0.00%, 1.06 GHz:0.00%, 1.10 GHz:0.14%, 1.15 GHz:0.00%, 1.20 GHz:0.00%, 1.22 GHz:0.00%, 1.25 GHz:0.00%, 1.30 GHz:0.68%, 1.34 GHz:0.00%, 1.37 GHz:0.00%  (9633)
[root@PKHELPER ~]#

 

Link to comment
Share on other sites

I need to revert statement as above. My OPi+2E has "frozen". So, entry MIN_SPEED=408000 is not valid for my SBCs. Until it is corrected I have added following to /etc/cron.d/cpufrequtils-fix

 

*/5 * * * * root /bin/grep 'MIN_SPEED=408000' /etc/default/cpufrequtils 1>/dev/null 2>&1 && /bin/sed --in-place s/MIN_SPEED=408000/MIN_SPEED=480000/ /etc/default/cpufrequtils 1>/dev/null 2>&1 && /bin/systemctl restart cpufrequtils 1>/dev/null 2>&1

 

Edit. My mistake. It was that I have put my SBC on quite warm router. And during scheduled job (performing backup of my NAS) it was simply shut down:

 

Feb  4 05:11:48 PKBACKUP kernel: thermal thermal_zone0: critical temperature reached (90 C), shutting down
Feb  4 05:11:48 PKBACKUP systemd[1]: Stopped target Sound Card.
Feb  4 05:11:49 PKBACKUP systemd[1]: Stopping Save/Restore Sound Card State...
Feb  4 05:11:49 PKBACKUP systemd[1]: Stopping Initialize i2c hardware RTC device driver...
Feb  4 05:11:49 PKBACKUP systemd[1]: Stopped target Timers.
Feb  4 05:11:49 PKBACKUP systemd[1]: Stopped Clean PHP session files every 30 mins.
Feb  4 05:11:49 PKBACKUP systemd[1]: Stopped Daily Cleanup of Temporary Directories.
Feb  4 05:11:49 PKBACKUP systemd[1]: Stopped target Graphical Interface.
Feb  4 05:11:49 PKBACKUP systemd[1]: Stopped target Multi-User System.
Feb  4 05:11:49 PKBACKUP systemd[1]: Stopped target Login Prompts.
Feb  4 05:11:49 PKBACKUP systemd[1]: Stopping Getty on tty1...
Feb  4 05:11:49 PKBACKUP systemd[1]: Stopping Serial Getty on ttyS0...

........

 

Edited by piknew
Mistake...
Link to comment
Share on other sites

I've got same issue but with OrangePi Zero. But I believe I not using -dev kernel. After update from 4.19.13-sunxi to 4.19.17-sunxi

Cpu frequency scaling to 1008 Mhz instead of 1200Mhz

Thermal is 45 degrees, does not throttle


root@orangepizero:/etc/default# cat /etc/default/cpufrequtils
# WARNING: this file will be replaced on board support package (linux-root-...) upgrade
ENABLE=true
MIN_SPEED=240000
MAX_SPEED=1200000
GOVERNOR=ondemand

 

 

root@orangepizero:/etc/default# cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: cpufreq-dt
  CPUs which run at the same hardware frequency: 0 1 2 3
  CPUs which need to have their frequency coordinated by software: 0 1 2 3
  maximum transition latency: 5.44 ms.
  hardware limits: 120 MHz - 1.01 GHz
  available frequency steps: 120 MHz, 240 MHz, 480 MHz, 648 MHz, 816 MHz, 960 MHz, 1.01 GHz
  available cpufreq governors: conservative, userspace, powersave, ondemand, performance, schedutil
  current policy: frequency should be within 240 MHz and 1.01 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1.01 GHz (asserted by call to hardware).
  cpufreq stats: 120 MHz:0.00%, 240 MHz:12.01%, 480 MHz:0.00%, 648 MHz:0.01%, 816 MHz:0.00%, 960 MHz:0.00%, 1.01 GHz:87.98%  (159)

 

Is it possible to restore 1200MHz?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines