NanoPi M2 stuck at 1GHz

Hay all :slight_smile:

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:

 ─────────────────────────────────────────────────────
 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?

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:

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.

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:

1400000 8686
1200000 10048
1000000 2647
800000 8
700000 51
600000 19
500000 71
400000 189530

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

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

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.php/NanoPi_M2#Compile_Linux_kernel

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_alumina_thermal_adhesive.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

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

Thanks Dirk,

I’ll look into updating our kernel for the M2:
https://github.com/Fourdee/DietPi/issues/725

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

Hi Dirk,

I’ve compiled the latest M2 kernel as per: http://wiki.friendlyarm.com/wiki/index.php/NanoPi_M2#Make_Your_Own_OS_Image

Please can you test the kernel (below link) and see if it resolves the CPU clock issue?
https://github.com/Fourdee/DietPi/issues/725#issuecomment-276074267