NanoPi M2 stuck at 1GHz

Having issues with your DietPi installation, or, found a bug? Post it here.
smartoad
Posts: 6
Joined: Sun Dec 04, 2016 11:27 pm

NanoPi M2 stuck at 1GHz

Post by smartoad »

Hay all :)

I have just started to use DietPi and it makes setting up my owncloud system so much easier! I am having a small issue. My NanoPi M2 that I am using seems to be stuck at 1GHz, when it should be sitting at 1.4GHz. When I type CPU I get:

Code: Select all

 ─────────────────────────────────────────────────────
 DietPi CPU Info
 Use dietpi-config to change CPU / performance options
 ─────────────────────────────────────────────────────
 Architecture |     armv7l
 Temp         |     30'c | Cool runnings.
 Governor     |     interactive

                 Current Freq    Min Freq   Max Freq
 CPU0         |      1000 Mhz      400 Mhz    1000 Mhz
 CPU1         |      1000 Mhz      400 Mhz    1000 Mhz
 CPU2         |      1000 Mhz      400 Mhz    1000 Mhz
 CPU3         |      1000 Mhz      400 Mhz    1000 Mhz
I have gone into dietpi-config and upped the frequency to 1400MHz but still the board is running only at 1GHz.

Have I got a setting wrong somewhere?
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: NanoPi M2 stuck at 1GHz

Post by Fourdee »

Hi,

Thanks for the report.
I have gone into dietpi-config and upped the frequency to 1400MHz but still the board is running only at 1GHz.
I completely missed that bit lol. 1 sec i'll update this with some tests we can run.

Ok, so the 1400mhz entry exists in kernel.

Lets check if 1400mhz is actually being used, please paste results:

Code: Select all

cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
If that reports 1400Mhz as 0 time, try changing the CPU gov to performance in dietpi-config.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
smartoad
Posts: 6
Joined: Sun Dec 04, 2016 11:27 pm

Re: NanoPi M2 stuck at 1GHz

Post by smartoad »

Apologies for the lateness of the reply. I since I put this up I noticed that it has gone back to 1.4GHz. I have had to reboot twice since then, maybe something reset during one of those?

Just for completeness I have run the command and this is the output:

Code: Select all

1400000 8686
1200000 10048
1000000 2647
800000 8
700000 51
600000 19
500000 71
400000 189530
smartoad
Posts: 6
Joined: Sun Dec 04, 2016 11:27 pm

Re: NanoPi M2 stuck at 1GHz

Post by smartoad »

I have noticed though that the speed drops as the cpu temp rises. Although the CPU command always shows it at 30C even when running a stress test on the device
dirks

Re: NanoPi M2 stuck at 1GHz

Post by dirks »

I have the same issue with my NanoPi M2: it's stucks at 1GHz even with a heatsink and active cooling, which keeps the complete board very cool. I'm crunching Einstein@Home workunits with my NanoPi M2, which uses a lot of cpu-performance. After a reboot the cpu frequency starts with 1.4 GHz and then decreases to 1.2 and 1GHz (checked with the cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq command). After several minutes the cpu frequency sometimes decreases to 800 MHz. This occurs even with an only light warm cpu. Reading the cpu temperature with the cat /sys/class/hwmon/hwmon0/device/temp_label command doesn't seem to work with NanoPi M2 boards, it always shows 30 °C. I'm using the latest DietPi release V141. I have also tried the "performance mode" with dietpi-config, but this does not change anything.

I'm also using a NanoPi M3 board, which works like a charm with DietPi (it works very reliable with 1.4 GHz 24x7).

Can anyone help me, please?

Thank you very much!

Regards,
Dirk
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: NanoPi M2 stuck at 1GHz

Post by Fourdee »

dirks wrote:After several minutes the cpu frequency sometimes decreases to 800 MHz. This occurs even with an only light warm cpu.
Hi Dirk,

cpu temp readout appears bugged on the M2, at kernel level. Always reports 30'c.

I believe the reason for reduced clocks is due to thermal throttling. However, if this is occurring below 70'c, could indicate another issue in kernel.

It appears FriendlyARM are working on the Kernel. When I get a chance i'll build it and test if it resolves the CPU readout issue, but that may be some time, so your welcome to try:
http://wiki.friendlyarm.com/wiki/index. ... nux_kernel
https://github.com/friendlyarm/linux-3. ... llipop-mr1
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
dirks

Re: NanoPi M2 stuck at 1GHz

Post by dirks »

Hi Fourdee,

first of all thanks for your reply!

To be sure that it isn't a problem caused by thermal throttling I've now replaced the heatsink with a new one which is now attached with "Arctic Alumina Thermal Adhesive" which has a great heat conductivity (http://www.arcticsilver.com/arctic_alum ... hesive.htm). In addition to the heatsink there is a big fan working in front of my NanoPi M2. Therefore I believe this is a kernel issue.

After installing sysfsutils and using these settings in the /etc/sysfs.conf file...

devices/system/cpu/cpu0/cpufreq/scaling_governor = performance
devices/system/cpu/cpu1/cpufreq/scaling_governor = performance
devices/system/cpu/cpu2/cpufreq/scaling_governor = performance
devices/system/cpu/cpu3/cpufreq/scaling_governor = performance
devices/system/cpu/cpu0/cpufreq/scaling_min_freq = 1400000
devices/system/cpu/cpu1/cpufreq/scaling_min_freq = 1400000
devices/system/cpu/cpu2/cpufreq/scaling_min_freq = 1400000
devices/system/cpu/cpu3/cpufreq/scaling_min_freq = 1400000

my NanoPi M2 is working 24x7 with 1.2 GHz, BUT the performance is really bad!!! I'm crunching Einstein@Home workunits on different boards...

time for completing a 17500 GFLOPS workunit: (hh:mm)
------------------------------------------------------------------
NanoPi M3 1,4 GHz - 09:15h < - - - P E R F E CT !!!
Raspberry Pi 3 1,2 GHZ - 11:15h
OrangePi PC Plus 1,296 GHz - 13:00h
Raspberry Pi 2 1,0 GHz - 13:40h
NanoPi M2 1,2 GHz - 16:00h < - - - V E R Y _ B A D !!!

There must be something wrong!

By the way, the DietPi images are absolutly great, please keep up the good work!

Unfortunately my linux knowledge is not good enough for compiling (my own) kernel, so I have to wait and hope for a new release. Please let me know, if I can test a new release for you.

Thx!

Regards,
Dirk
dirks

Re: NanoPi M2 stuck at 1GHz

Post by dirks »

 
Hi,

I now can confirm that the reported issue is related to the kernel.

After hours of work I found out, that the following offical image works permanently with 1.4 GHz (a proper cooling presupposed)...

NanoPi 2 FriendlyARM WiKi
http://wiki.friendlyarm.com/wiki/index.php/NanoPi_2

S5P4418 images shared by "John Smith" (link found in the NanoPi 2 FriendlyARM WiKi above)
https://www.mediafire.com/folder/ilkcy37otd7il/S5P4418

image name:
nanopi2-ubuntu-mate.img.zip

image date:
2017-01-13 12:55:45

image based on..
Ubuntu 15.04
Kernel: 3.4.39-FriendlyARM Jan 18 [ 2016 !!! ] armv71

How to test:
1. install stress (apt-get install stress)
2. print out the current cpufreq stats (cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state)
3. start the cpu stress test on all 4 cores (stress -c 4)
4. leave the test at minimum 20 minutes running (WARNING: a proper cooling is required!)
5. print out the current cpufreq stats again (cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state)
6. check the cpufreq stats deltas

The entry of 1400000 increases very strongly, all other stats did not change (the 400000 entry may also increases a little bit, caused by the stress test loops).

I have also tested the following images...

s5p4418-ubuntu-core-qte-sd4g-20170111.img.zip - 2017-01-13 05:45:52
s5p4418-debian-sd4g-20170110.img.zip - 2017-01-13 08:52:43

which are based on...
Ubuntu 15.10
Kernel: Linux FriendlyARM 3.4.39-s5p4418 Jan 10 2017 armv71

without success (the cpufreq decreases very fast to 1.2 and 1.0 GHz).

I hope this can help someone.

Regards,
Dirk
 
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: NanoPi M2 stuck at 1GHz

Post by Fourdee »

Thanks Dirk,

I'll look into updating our kernel for the M2:
https://github.com/Fourdee/DietPi/issues/725
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
dirks

Re: NanoPi M2 stuck at 1GHz

Post by dirks »

 
Hi Fourdee,

thank you very much for this good news!

Just a remark for my last post:
I was unfortunately not able to read the cpu temperature even in the "nanopi2-ubuntu-mate.img.zip" image, but maybe this is possible using a different way than I have done.

Dirk
 
Post Reply