Jump to content

CPU is stuck at 408MHz no matter what I try


Jon Ashley

Recommended Posts

Hello all,

 

I'm going to preface by saying that I am not experienced with Pi, Pi clones, or linux, but I know how to google stuff until my fingers bleed and can navigate around a terminal window well enough.

 

I have an Orange Pi Lite, which is running OctoPrint primarily, but does use a few other uses.

 

I am using a prepared Armbian image file. Upon SSH login in the terminal displays the following:

 

Welcome to ARMBIAN Debian GNU/Linux 8 (jessie) 3.4.113-sun8i
System load:   3.17             Up time:       39 min
Memory usage:  72 % of 494Mb    IP:            192.168.0.250
CPU temp:      36°C
Usage of /:    99% of 3.6G      storage/:      1% of 3.8G
 
CPU is at minimum speed 100% of the time, even if I change governor to performance. I have tried adjusting min speed, ive tried editing other files from google searches specifically relating to cpu frequency and scaling, all of which have had no effect ( I mistakenly didn't book mark them so I don't remember all I've changed)
 

root@octoorangepi:/sys/devices/system/cpu/cpu0/cpufreq/stats# cat time_in_state
60000 0
120000 0
240000 0
312000 0
408000 167071
480000 0
504000 0
528000 0
576000 0
600000 0
624000 0
648000 0
672000 0
720000 0
768000 0
816000 0
864000 0
912000 0
960000 0
1008000 0
1056000 0
1104000 0
1152000 0
1200000 0
1248000 0
1296000 0
1344000 0
1440000 0
1536000 0
 
 
 
I have a heat sink, and a fan blowing directly on heatsink and board, temp never goes above 40C even at 100% load. To try and load the processor up as much as possible thinking the scaling was set really high, i loaded the desktop enviroment and streamed some videos on youtube (albeit very poorly at 240/360P but hey, didn't get it for streaming youtube videos). HTop shows all 4 cores at near 100%, and frequency doesn't budge from 480Mhz. Same reults with ondemand, performance, interactive. Even userspace with cpufreq-set -c 0 -f 1296.000 it stays at 480. 
 
Can you please provide any assistance?
 
Thank you in advance for your time,
Jonathan
Link to comment
Share on other sites

I have tried adjusting min speed

 

But maybe you adjusted max speed instead? Without information it's really hard to tell. How does the output of the following looks like?

sudo su -
armbianmonitor -u
h3consumption -p
cat /sys/devices/system/cpu/cpu0/cpufreq/*max*
Link to comment
Share on other sites

 

But maybe you adjusted max speed instead? Without information it's really hard to tell. How does the output of the following looks like?

sudo su -
armbianmonitor -u
h3consumption -p
cat /sys/devices/system/cpu/cpu0/cpufreq/*max*

 

 

 

Hi tkaiser,

 

The armbian monitor url: http://sprunge.us/bGWV

 

h3consumption was not found

root@octoorangepi:~# armbianmonitor -u
/var/log/armhwinfo.log has been uploaded to http://sprunge.us/bGWV
Please post the URL in the Armbian forum where you've been asked for.
root@octoorangepi:~# h3consumption -p
-su: h3consumption: command not found
root@octoorangepi:~# cat /sys/devices/system/cpu/cpu0/cpufreq/*max*
1296000
1296000
root@octoorangepi:~# h3consumption -p
-su: h3consumption: command not found
root@octoorangepi:~#

Link to comment
Share on other sites

I've been hesitant to try and upgrade due to my ignorance, and the issue I had getting octoprint to work in the first place.

I first tried getting it up and running with a fresh armbian installation from the website, and then manually installing octoprint but was unsuccessful. As a last ditched effort I went with a pre-made image and it has worked pretty well. One of the features of octoprint (3D Printer manager basically, serves GCode and acts as an interface for your printer) is to take time lapse videos. The orangepi then renders the video (series of snapshots). Because of the low clockspeed this takes a lot longer than other users have reported doing the same task. Also even just working in the terminal seems slow, and from time to time I boot into the desktop environment just to "play around" with a linux distribution. At 480MHz the experience leaves alot to be desired. It works, albeit not that well.

 

It is also very difficult to find information specific to the orangepi / armbian since 98% of the information out there is for the raspberry pi and raspian and there are enough differences that make working through a tutorial useless. 

 

I'm trying my best to learn as I go, but I feel I'm getting a little in over my head now. I'm now regretting not learning more about linux when I had the time (IE: young bachelor with tons of free time) now that I'm a dad with a 60+hour/week job I just can't devote the time to really read/learn.

 

I hate to be "that guy" on the forum but if it isn't too much trouble can you point me in the right direction to atleast get CPU scaling working? I'm OK with running outdated stuff as long as it works. 

 

Thank you again for your help thus far.

-Jon

Link to comment
Share on other sites

Hi Jon

 

has your root filesystem filled up?

may cause different problems.

 

best, gnasch

 

 

It is at about 85%. I was unable to resize the filesystem without screwing everything up so I gave up on it. I now have another micro SD card mounted (set to mount on boot) to /mnt/usbstorage that I use for upload GCODE files and timelapse images from octoprint. 

 

The card that is in the Pi for boot is a 8GB, but only has 4GB usable still. I've tried various tutorials for resizing the partition, but everything I've found online says to use Raspi-Config and it refuses to run on Orange Pi (not built for Armbian?)

 

I have done apt-get clean (which didn't seem to do much) and apt-get autoclean and that got me from 98% full to 85ish or wherever it is at now. 

 

However I don't think this will have an impact on improperly working CPU scaling. 

Link to comment
Share on other sites

You started with some very old image, presumably beta at that time. You made several upgrades from that build and you are not very skilled ... it's much better that you start with fresh install. You will save yourself a lot of time and troubles. You will get updated system, resized FS, working CPU scaling ...

Link to comment
Share on other sites

Ok. I will attempt to do a fresh install. 

 

The reason I went with the image is I was able to successfully install octoprint, but upon rebooting the pi, could not get octoprint to load again. I guess I'll have to approach that road when I get there. Unfortunately the OctoPrint community is not interested in assisting those who don't run a genuine Raspberry Pi, running Raspbian. 

 

I sincerely appreciate your insight and assistance.

Link to comment
Share on other sites

Ok. I will attempt to do a fresh install. 

 

The reason I went with the image is I was able to successfully install octoprint, but upon rebooting the pi, could not get octoprint to load again. I guess I'll have to approach that road when I get there. Unfortunately the OctoPrint community is not interested in assisting those who don't run a genuine Raspberry Pi, running Raspbian. 

 

I sincerely appreciate your insight and assistance.

 

Regarding Octoprint details I can't help much since I never ever install it. Have no idea what kind of troubles you can expect. But I saw few install howtos or mentioning of success install on top of Armbian ... which is, if you take Debian Jessie version, not much / almost no different than Raspbian. The biggest / main difference is lower level, hardware support, which is mostly in kernel and other RPi dedicated libraries. I would say unrelated to this install.

 

Since this software looks hardware independent, it should be no problem to install it on Armbian. And when you succeed, the best thing is that you sum commands into one script, that you can recreate build at any time and that you can share your success story / how-to install Octoprint with others.

Link to comment
Share on other sites

Regarding Octoprint details I can't help much since I never ever install it. Have no idea what kind of troubles you can expect. But I saw few install howtos or mentioning of success install on top of Armbian ... which is, if you take Debian Jessie version, not much / almost no different than Raspbian. The biggest / main difference is lower level, hardware support, which is mostly in kernel and other RPi dedicated libraries. I would say unrelated to this install.

 

Since this software looks hardware independent, it should be no problem to install it on Armbian. And when you succeed, the best thing is that you sum commands into one script, that you can recreate build at any time and that you can share your success story / how-to install Octoprint with others.

 

 

 

Well I'm getting there, but I'm getting random lock ups. Once when installing octoprint and once when I was in the desktop environment browsing the web.

 

My CPU scaling is working, but I wish I could find out what is causing these lock ups. 

RPi Monitor is still running, but the mouse has a 30 second delay in the desktop environment and the SSH windows has frozen. Took this screenshot as I was trying to install octoprint.

 

Ive read that some boards have issue with the RAM frequency. Is it worth dropping the speed on the RAM to see if that fixes it? I'm taking a wild guess here. Nothing is modified, just the latest Armbian install from this site, then following this tutorial for installing octoprint:

 

http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=594

 

 

 

 

wgnzbVE.jpg

Link to comment
Share on other sites

Hi Igor,

 

i want to thank you for give me the push to "do it the right way."

 

I am 99% there, but I think my last issue is getting OctoPrint to automatically start on bootup.

 

Here are the steps on the tutorial:

12. Make Octoprint a service with autostart
sudo nano ~/OctoPrint/scripts/octoprint.default
Copy the Code

Find "username" and change it to "octoprint".
sudo cp ~/OctoPrint/scripts/octoprint.init /etc/init.d/octoprint
sudo cp ~/OctoPrint/scripts/octoprint.default /etc/default/octoprint
sudo chmod +x /etc/init.d/octoprint
sudo update-rc.d octoprint defaults
Copy the Code


Make sure you have something in your /usr/local/bin/octoprint. To test if not:
cat /usr/local/bin/octoprint
Copy the Code

There should be some output with python code.

I got no errors during any of this. After rebooting OctoPrint does not start.

 

I can log in via SSH and do: cd /home/octoprint/OctoPrint     then do ./run and it starts up.

 

Octoprint is installed under a different username "octoprint" the desktop enviroment boots to the other user created at initial Armbian setup "octopi"

This is the same behavior as the old image I was running, but OctoPrint application did auto start.

 

How do I make OctoPrint a service that auto starts?

 

Thank you,
Jonathan

Link to comment
Share on other sites

My CPU scaling is working, but I wish I could find out what is causing these lock ups.

I can't help about the main purpose of the topic. But i noticed the same lock ups with Orange Pi ONE, which is almost the same as Lite. I can't tell what causing it, maybe some wrong RAM parameters, as you suggest. These lock ups happens due to heavy load as trying to use browser and sometimes causing full halt. This behaviour is with latest Armbian 5.25. Last version i used before on OpiONE and can confirm is been ok, have to be Armbian_5.20_3.4.112, so a lot of changes may happen since then. I can advice you to try some a bit older image from here - https://dl.armbian.com/orangepilite/archive/ and to not upgrade linux-image, linux-headers, linux-firmware and linux-u-boot (i a not sure about all, but doesn't hurt), until this is fixed in some new upgrades.

Link to comment
Share on other sites

My CPU scaling is working, but I wish I could find out what is causing these lock ups. 

 

By looking at the average load numbers and CPU utilization I would say you're suffering from a crappy SD card (very low random IO write performance). Do your normal work, let 'sudo armbianmonitor -m' run in a window and check there load vs %iowait numbers. If the latter value is high all the time it's time to exchange SD card. Please don't trust those 'shot in the dark' suggestions as in post #13 but better look at the root cause and fix the issue.

 

Regarding this thing called 'average load' please read especially through the comment here: http://dtrace.org/blogs/brendan/2011/06/24/load-average-video/#comment-2592

Link to comment
Share on other sites

By looking at the average load numbers and CPU utilization I would say you're suffering from a crappy SD card (very low random IO write performance). Do your normal work, let 'sudo armbianmonitor -m' run in a window and check there load vs %iowait numbers. If the latter value is high all the time it's time to exchange SD card. Please don't trust those 'shot in the dark' suggestions as in post #13 but better look at the root cause and fix the issue.

 

Regarding this thing called 'average load' please read especially through the comment here: http://dtrace.org/blogs/brendan/2011/06/24/load-average-video/#comment-2592

 

 

Thank you tkaiser, I'll run this and see. I'm using an old Samsung Class 10 card (bought in Best buy not online, too many selling knock off cards online) but it may be on its last leg. 

 

 

 

Do you have any suggestions on making the OctoPrint application a service that auto starts? I've been waiting for over a week for the admin at the orange pi forums to activate my account. What's funny is I can't even VIEW the thread when logged in, says I need to be verified.

Link to comment
Share on other sites

By looking at the average load numbers and CPU utilization I would say you're suffering from a crappy SD card (very low random IO write performance). Do your normal work, let 'sudo armbianmonitor -m' run in a window and check there load vs %iowait numbers. If the latter value is high all the time it's time to exchange SD card.

I guess you are right. I am using class 4 semi broken SD card for test purposes. It's so bad i even had to extend file system manually, because first boot fails to do this. Happens often with this card. I didn't thought this is the main reason for lock ups, because days or two ago i used nand_sata_install to move rootfs to external USB HDD. And there where the same lock ups, but this could be because of other issue. As far as i understand, in this case sd card is only for booting and should not affect system later. And when @Jon Ashley mentions the same behaviour i was sure something else is causing this.

Link to comment
Share on other sites

I guess you are right. I am using class 4 semi broken SD card for test purposes. It's so bad i even had to extend file system manually, because first boot fails to do this. Happens often with this card. I didn't thought this is the main reason for lock ups, because days or two ago i used nand_sata_install to move rootfs to external USB HDD. And there where the same lock ups, but this could be because of other issue. As far as i understand, in this case sd card is only for booting and should not affect system later. And when @Jon Ashley mentions the same behaviour i was sure something else is causing this.

 

 

Ragner can you please assist with how to run something on boot as a service? Thank you,

Link to comment
Share on other sites

There are many ways. Some more complex than others.

The simplest on is running a startup script and call it in /etc/rc.local :

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

/root/my-startup-script.sh &

exit 0
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