joeltoh95 Posted August 12, 2017 Posted August 12, 2017 I have an orange pi+ 2e that is being used for pihole. I want to set my pi to use 1 cpu core, disable usb ports and set Ethernet link speed at 100Mb/s etc to reduce consumption however not all the changes will apply at once (see picture attached) If cpu is running at one core and ram at reduced speed, ethernet link speed will still be at 1gbps and the other way round when Link speed is at 100Mbps.
Taurus Posted August 12, 2017 Posted August 12, 2017 Something similar happens to me with an Orange Pi Lite. Not all changes are made and it seems as if some are reversing others (for example DRAM speed and number of active cores).
tkaiser Posted August 13, 2017 Posted August 13, 2017 Basic h3consumption mode of operation: adjust settings reboot check settings if something seems to be strange provide output of 'armbianmonitor -u' and TEXTUAL output from 'h3consumption -p' (no screenshots!) There was an issue with CPU cores not being brought up back but this should be fixed in the meantime (though no idea whether this is already part of latest board support package and of course whether users install available updates or not)
Taurus Posted August 13, 2017 Posted August 13, 2017 In my case the problem occurs when I try to change DRAM speed and the number of active cores as though they were incompatible with each other. I attach the output of the terminal and /var/log/armhwinfo.log. Spoiler alejandro@orangepilite:~$ sudo h3consumption -p [sudo] password for alejandro: Active settings: cpu 912 mhz allowed, 1200 mhz possible, 4 cores active dram 408 mhz hdmi/gpu off usb ports off wlan0 IEEE 802.11bgn ESSID:"Flybox" Nickname:"<WIFI@REALTEK>" Mode:Managed Frequency:2.412 GHz Access Point: D4:6E:0E:68:95:A9 Bit Rate:150 Mb/s Sensitivity:0/0 Retry:off RTS thr:off Fragment thr:off Encryption key:****-****-****-****-****-****-****-**** Security mode:open Power Management:off Link Quality=90/100 Signal level=75/100 Noise level=0/100 Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 alejandro@orangepilite:~$ sudo h3consumption -c 1 Settings changed. Please reboot for changes to take effect and verify settings after the reboot using "h3consumption -p" alejandro@orangepilite:~$ sudo shutdown -r now Connection to 192.168.50.24 closed by remote host. Connection to 192.168.50.24 closed. alejandro@GP60-2PE:~$ ssh alejandro@192.168.50.24 alejandro@192.168.50.24's password: ___ ____ _ _ _ _ / _ \ _ __ __ _ _ __ __ _ ___ | _ \(_) | | (_) |_ ___ | | | | '__/ _` | '_ \ / _` |/ _ \ | |_) | | | | | | __/ _ \ | |_| | | | (_| | | | | (_| | __/ | __/| | | |___| | || __/ \___/|_| \__,_|_| |_|\__, |\___| |_| |_| |_____|_|\__\___| |___/ Welcome to ARMBIAN 5.31 stable Ubuntu 16.04.3 LTS 3.4.113-sun8i System load: 0.12 0.18 0.12 Up time: 6 min Memory usage: 7 % of 494MB IP: 192.168.50.24 CPU temp: 51°C Usage of /: 9% of 15G Last login: Sun Aug 13 16:09:52 2017 from 192.168.50.19 alejandro@orangepilite:~$ sudo h3consumption -p [sudo] password for alejandro: Active settings: cpu 912 mhz allowed, 1200 mhz possible, 1 cores active dram 624 mhz hdmi/gpu off usb ports off wlan0 IEEE 802.11bgn ESSID:"Flybox" Nickname:"<WIFI@REALTEK>" Mode:Managed Frequency:2.412 GHz Access Point: D4:6E:0E:68:95:A9 Bit Rate:150 Mb/s Sensitivity:0/0 Retry:off RTS thr:off Fragment thr:off Encryption key:****-****-****-****-****-****-****-**** Security mode:open Power Management:off Link Quality=86/100 Signal level=76/100 Noise level=0/100 Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 alejandro@orangepilite:~$ uname -a Linux orangepilite 3.4.113-sun8i #18 SMP PREEMPT Thu Jun 15 02:16:06 CEST 2017 armv7l armv7l armv7l GNU/Linux alejandro@orangepilite:~$ sudo armbianmonitor -u /var/log/armhwinfo.log has been uploaded to http://sprunge.us/RaUT Please post the URL in the Armbian forum where you've been asked for.
Taurus Posted August 16, 2017 Posted August 16, 2017 Looks like you missed this post, could you take a look?
tkaiser Posted August 20, 2017 Posted August 20, 2017 On 13.8.2017 at 6:15 PM, Taurus said: In my case the problem occurs when I try to change DRAM speed and the number of active cores as though they were incompatible with each other. I looked into this today but can't reproduce. All the script is doing wrt those two options is putting some lines of code to /etc/rc.local to be executed on next reboot. Please play around with h3consumption and watch after each change contents of /etc/rc.local. If you're not updated to latest versions please do this first. And if you find a way to reproduce please share.
Taurus Posted August 21, 2017 Posted August 21, 2017 15 hours ago, tkaiser said: I looked into this today but can't reproduce. All the script is doing wrt those two options is putting some lines of code to /etc/rc.local to be executed on next reboot. Please play around with h3consumption and watch after each change contents of /etc/rc.local. If you're not updated to latest versions please do this first. And if you find a way to reproduce please share. Installation is recent and updated. I really haven't yet started playing with it, so I can't say something special to be able to reproduce this. Apparently whenever I use h3consumption with any of its options the previous content of /etc/rc.local is removed, so the last actions are reset to their default value. For instance, when I use sudo h3consumption -c 1 (and after restart). Spoiler alejandro@orangepilite:~$ cat /etc/rc.local #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. ### do NOT edit the following lines, always use h3consumption instead ### for i in 3 2 1; do echo 0 >/sys/devices/system/cpu/cpu${i}/online; done # h3consumption exit 0 Then I apply sudo h3consumption - d 408, reboot, and the new content is: Spoiler alejandro@orangepilite:~$ cat /etc/rc.local #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. ### do NOT edit the following lines, always use h3consumption instead ### echo 408000 >/sys/devices/platform/sunxi-ddrfreq/devfreq/sunxi-ddrfreq/userspace/set_freq # h3consumption exit 0
tkaiser Posted August 21, 2017 Posted August 21, 2017 26 minutes ago, Taurus said: Installation is recent and updated. Can you please compare contents of script on disk and latest revision on Github? curl -s 'https://raw.githubusercontent.com/armbian/build/master/packages/bsp/h3consumption' | md5sum md5sum /usr/bin/h3consumption If MD5 hashes don't match please update h3consumption manually, try again and report back. sudo -s curl -s 'https://raw.githubusercontent.com/armbian/build/master/packages/bsp/h3consumption' >/usr/bin/h3consumption
Taurus Posted August 23, 2017 Posted August 23, 2017 On 21/8/2017 at 1:08 PM, tkaiser said: Can you please compare contents of script on disk and latest revision on Github? curl -s 'https://raw.githubusercontent.com/armbian/build/master/packages/bsp/h3consumption' | md5sum md5sum /usr/bin/h3consumption I was wrong, thank you for telling me how to check it Now MD5 hashes match (2f0fb2eeed6055a12dd8f5cdaed2fdc2 it's the value). Unfortunately the problem remains unresolved. I have tried editing '/etc/rc.local' by myself and I've managed to run with the desired configuration. As the problem seems like it can't be reproduced, it may be something very particular of my environment. Probably with a fresh reinstallation it would be solved. So, unless others report the same problem, I suggest not continuing with this issue. Thanks!
Recommended Posts