mikaey Posted April 10, 2019 Share Posted April 10, 2019 (edited) Armbianmonitor: http://ix.io/1FPy 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 April 10, 2019 by mikaey Link to comment Share on other sites More sharing options...
bschwehn Posted April 10, 2019 Share Posted April 10, 2019 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... Link to comment Share on other sites More sharing options...
mikaey Posted April 10, 2019 Author Share Posted April 10, 2019 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 4 Link to comment Share on other sites More sharing options...
bschwehn Posted April 10, 2019 Share Posted April 10, 2019 Haha, that's great, thanks! Silly me has been rebuilding full kernels for a workaround Link to comment Share on other sites More sharing options...
houldsg Posted April 11, 2019 Share Posted April 11, 2019 Beautiful. I'll try tonight, time permitting. Link to comment Share on other sites More sharing options...
Recommended Posts