Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Frequency throttling on OPi PC2?

Featured Replies

I've got an Orange Pi PC2, and I'm running some pretty CPU intensive tasks on it.  However, I'm running into a situation where the processor is overheating and shutting down.  I've got a bunch of OPiZero's, and on those I'm used to the kernel automatically throttling the CPU frequency down and/or shutting off cores in response to rising CPU temps -- but I'm not seeing that happen on the PC2 -- it just stays at max CPU speed until it overheats and shuts down.  Is there a way to enable that same behavior on the PC2?  (I'd rather it throttle down the CPU frequency instead of overheat...) 

Edited by mikaey

There is already some discussion about this topic at the other topic

 

However, if this is causing you issues that need fixing now, it shouldn't be too hard to work around it manually until a better solution is available

 

Simplest solution might be to have a script / service running (as root) that does

- read temp from /sys/devices/virtual/thermal/thermal_zone0/temp

- if temp is too high for you, throttle max frequency, e.g. using

 

cpufreq-set -u 700000

then up the limit again once temp is reduced.

 

Not ideal of course, but should work in the short term.

 

How high is your temp getting before shutdown? Or what does

 

armbianmonitor -m 

 

output before it shuts down?

 

Just asking as I have a hard time getting my OPi PC2 above 82C under load, no heatsinks, but no casing either...

 

 

  • Author

Ok, I think I got it!  Had to learn a little bit about device trees in the process.  BUT...here's what I did (and BTW -- I did this all directly on the PC2):

 

Step 1: Grab a copy of the Linux source:

$ sudo apt install linux-source-4.19.20-next-sunxi64

This will dump the Linux source tarballs (and a config file) into /usr/src.

 

Step 2: Unzip the tarball, and copy in the config file:

$ cd /usr/src
$ sudo mkdir linux
$ sudo chown `whoami`:`whoami` linux
$ cd linux
$ tar xvf ../linux-source-4.19.20-sunxi64.tar.xz
$ xzcat ../linux-sunxi64-next_4.19.20_5.75_config.xz >.config

Step 3: Download the attached patch and apply it:

$ patch -p1 <OrangePiPC2.patch

Step 4: Build the new DTB:

$ make dtbs

You should find your new DTB under arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dtb.

 

Step 5: Copy the new DTB into your DTBs folder:

$ sudo cp arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dtb /boot/dtb/allwinner

Step 6: Reboot!

$ sudo reboot

The PC2 will now throttle automatically when temps start getting too high!

OrangePiPC2.patch

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.