ygor Posted December 6, 2017 Share #1 Posted December 6, 2017 (edited) By default CPU is working 100% all time (2200Mhz) with the script found in previous post it works (bootloader 1.02b) on AMD before: fixed state: sh-4.3# grep MHz /proc/cpuinfo cpu MHz : 2200.000 cpu MHz : 2200.000 after: sh-4.3# grep MHz /proc/cpuinfo cpu MHz : 800.000 cpu MHz : 1300.000 sh-4.3# grep MHz /proc/cpuinfo cpu MHz : 800.000 cpu MHz : 800.000 sh-4.3# grep MHz /proc/cpuinfo cpu MHz : 800.000 cpu MHz : 1900.000 sh-4.3# grep MHz /proc/cpuinfo cpu MHz : 800.000 cpu MHz : 800.000 sh-4.3# grep MHz /proc/cpuinfo cpu MHz : 800.000 cpu MHz : 800.000 sh-4.3# grep MHz /proc/cpuinfo cpu MHz : 1300.000 cpu MHz : 1600.000 the original script was not working due to this line: insmod /lib/modules/powernow-k8.ko, just had to comment it Script: # vi S99PowersavingAMD.sh #!/bin/sh for c in $(ls -d /sys/devices/system/cpu/cpu[0-9]*); do if ! grep -q 'conservative' $c/cpufreq/scaling_governor ; then echo conservative >$c/cpufreq/scaling_governor ; fi done copy the scipt to: /usr/local/etc/rc.d/S99PowersavingAMD.sh edit crontab and add: */15 * * * * root /usr/local/etc/rc.d/S99PowersavingAMD.sh Don't wait for 15 minutes to activate the script: sh /usr/local/etc/rc.d/S99PowersavingAMD.sh sh-4.3# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor conservative sh-4.3# cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor conservative Default mode : performance Run the CPU at the maximum frequency. Switch to mode : conservative Scales the frequency dynamically according to current load. Scales the frequency more gradually than ondemand. looks good Edited December 7, 2017 by Polanskiman added proper code tags 1 Quote Link to comment Share on other sites More sharing options...
XPEH Posted December 6, 2017 Share #2 Posted December 6, 2017 I have tried it on my HP N54L running DSM 6.1.4 U2. Works fine. Thank you. Quote Link to comment Share on other sites More sharing options...
b0fh Posted December 6, 2017 Share #3 Posted December 6, 2017 Has anyone actually measured any appreciable power usage difference before and after running this script? Your CPU is not running 100% just because your CPU it showing full speed. I imagine the difference with CPU stepping on vs off for most people is tens of pennies per year, honestly. Quote Link to comment Share on other sites More sharing options...
ygor Posted December 6, 2017 Author Share #4 Posted December 6, 2017 Same as on your phone. When idling it goes down, and same on laptop with windows , CPU is going down on frequency by défaut. Quote Link to comment Share on other sites More sharing options...
ygor Posted December 6, 2017 Author Share #5 Posted December 6, 2017 i know it is not going to make a big diff on the bill, but cpu may also cool a bit as it require less energy. Quote Link to comment Share on other sites More sharing options...
b0fh Posted December 6, 2017 Share #6 Posted December 6, 2017 It might, but if it is not being used much, as most of our N54Ls are not I suspect from a processor perspective, the fluctuation may be more harmful that it is worth. And for battery operated devices like the phones mentioned above, it matters. For devices on power all the time, if a processor is idling at 2.0ghz or 800mhz, the actual power used is minimally different. I am not trying to be an a$$, just pointing out that often things are just not worth chasing. I know I had to disable C1E on my n54l when moving from 5.2 to 6.1, and that disabled some of the more effective power savings anyway. But again, n54l is pretty cheap to run 24x7x365 as it is. Quote Link to comment Share on other sites More sharing options...
XPEH Posted December 7, 2017 Share #7 Posted December 7, 2017 Its not only power bill savings. Cooler CPU = less fan noise. It matters for some. Quote Link to comment Share on other sites More sharing options...
ygor Posted December 7, 2017 Author Share #8 Posted December 7, 2017 (edited) The script is not for AMD only, since the module is not required since kernel 3.4 (dsm 6.1.x have kernel 3.10) It should work for any X86_64 cpu, if someone can confirm with other hardware. for more than 10 cpu core change the line : for c in $(ls -d /sys/devices/system/cpu/cpu[0-9]*); to ->by for c in $(ls -d /sys/devices/system/cpu/cpu[0-15]*); for 16 cores. We could change the title AMD HP N54L PowerSave CPU on DSM 6.1.4 / loader 1.02b -> AMD / Intel PowerSave CPU on DSM 6.1.x / loader 1.02b and rename: S99PowersavingAMD.sh with vi S99Powersaving.sh as nothing in the script is related to AMD. (except the removed line for DSM 5.x) ? I can't edit the first post. Edited December 7, 2017 by ygor Quote Link to comment Share on other sites More sharing options...
haldi Posted December 16, 2017 Share #9 Posted December 16, 2017 Has anyone actually measured any appreciable power usage difference before and after running this script? Your CPU is not running 100% just because your CPU it showing full speed. I imagine the difference with CPU stepping on vs off for most people is tens of pennies per year, honestly.I have the same question.Anyone actually done tests on PowerUsage and CPU Temperature before and after?When I tried this on my Intel g1610t it did make 0 difference.From 44W usage to 44W usage. No temperature difference either.I could retry it now on the X1265L...... Quote Link to comment Share on other sites More sharing options...
123gas Posted May 21, 2018 Share #10 Posted May 21, 2018 (edited) Hello everyone I have a system with APU A6-5400k I didn't understand where I find the script and how to install it. Can someone help me? Edited May 21, 2018 by 123gas Quote Link to comment Share on other sites More sharing options...
apejovic Posted November 5, 2018 Share #11 Posted November 5, 2018 @ygor Hey, do you have an idea how to make this working on an old DSM 5.2 5967 with Xpenoboot N54L baremetal installation? The old script was working for me till update to DSM 5.2. Thank you Quote Link to comment Share on other sites More sharing options...
ygor Posted November 6, 2018 Author Share #12 Posted November 6, 2018 @apejovic It should work with the HP N54L (modded bios - never tried with original bios) as this path exist when the bios is set to and option like: power comsuption is managed by the os. (i don't have the N54L to check anymore) For exemple on the HP gen8 microserver this path is created when that powersave option is set on os managed, and after a reboot of the os. After trying with a watt meter this option and the powersave mode on the gen8 values are almost the same. Around 30 / 35 watts with a xeon 1245L. you might want to execute the script manualy to see an error like: path not found, or module error -> path not found : should be bios related -> module error : should comment the list of modules: #modprobe .... (probably not required since the kernel is more recent) I can't help much, as i did not test that with 5.2, and don't have the N54L anymore. Quote Link to comment Share on other sites More sharing options...
mymax Posted November 29, 2018 Share #13 Posted November 29, 2018 Goodmorning, I'm setting up my N54L with DSM 6.1.7, 1.03 loader. The system works well. Now I followed the solution at post #1. The script doesn't start automatically from crontab and the CPU continues running in "performance". The script itself works well, if I run manually both cores go "conservative", 800 Mhz. Any advice? Thanks! Quote Link to comment Share on other sites More sharing options...
mymax Posted November 29, 2018 Share #14 Posted November 29, 2018 9 hours ago, mymax said: Goodmorning, I'm setting up my N54L with DSM 6.1.7, 1.03 loader. The system works well. Now I followed the solution at post #1. The script doesn't start automatically from crontab and the CPU continues running in "performance". The script itself works well, if I run manually both cores go "conservative", 800 Mhz. Any advice? Thanks! Solved, just a problem of "owner" and "permission" on the file. Quote Link to comment Share on other sites More sharing options...
LDiamond Posted December 24, 2018 Share #15 Posted December 24, 2018 В 07.12.2017 в 02:40, b0fh сказал: It might, but if it is not being used much, as most of our N54Ls are not I suspect from a processor perspective, the fluctuation may be more harmful that it is worth. And for battery operated devices like the phones mentioned above, it matters. For devices on power all the time, if a processor is idling at 2.0ghz or 800mhz, the actual power used is minimally different. I am not trying to be an a$$, just pointing out that often things are just not worth chasing. I know I had to disable C1E on my n54l when moving from 5.2 to 6.1, and that disabled some of the more effective power savings anyway. But again, n54l is pretty cheap to run 24x7x365 as it is. В 29.11.2018 в 17:23, mymax сказал: Goodmorning, I'm setting up my N54L with DSM 6.1.7, 1.03 loader. The system works well. Now I followed the solution at post #1. The script doesn't start automatically from crontab and the CPU continues running in "performance". The script itself works well, if I run manually both cores go "conservative", 800 Mhz. Any advice? Thanks! V1.02b for DSM 6.1 (current) Quote Link to comment Share on other sites More sharing options...
pedalman Posted February 22, 2019 Share #16 Posted February 22, 2019 I am with Xpenology for one day and I wonder if I can reactivate the C-states in bios after setting up DSM6.2x with loader 1.03b on my HP 54NL with biggest Xenon CPU. If that is ok than it should make more sense on limmiting heat expense, noise and energy? PS: I hit the full power button in config/power in the GUI and can not deactivate it. Is there a config file I could edit to go back to conservative if it is respected at all since DSM does not know my HP hardware. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.