0
fjen

OrangePi PC CPU Frequency

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

Share this post


Link to post
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

 

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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

 

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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...

Share this post


Link to post
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).

Share this post


Link to post
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:

 

Share this post


Link to post
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. 

Share this post


Link to post
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 ~]#

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
0