You are not logged in.
the result is amazing.
=before=
windows:~5hr
arch:~2hr
=after=
windows: ~5hr (this should be the same, )
arch: 6hr+ (if you dont use flash)
package
1. powerdown in aur
3. xorg-xset (for dpms)
important
now, two options must be set in your boot parameter
1. pcie_aspm=force
2. i915.i915_enable_rc6=1
dpms optional
.xinitrc
# screen powersave
xset +dpms
xset dpms 0 0 300
Last edited by taylorchu (2012-05-31 23:37:19)
"After you do enough distro research, you will choose Arch."
Offline
What files are those exactly? Where do they belong?
Offline
I assume the latter is a pm-powersave script, similar to the one in the wiki.
https://wiki.archlinux.org/index.php/Pm … wer_saving
Regards
Offline
I have another one
for i in $(ls /sys/bus/usb/devices/*/power/level);do echo auto > $i;done
Offline
thanks for sharing!
hdparm -B 1: i don't know if it's recommendable but -B 1 can your wear out your disk. i would rather recommend an average value of 128, spinning up and down also needs lots of power. i keep it at 254 because i hate those noises.
maybe i overlooked it, but scaling down the monitor brightness saves A LOT of energy. even on my android device ~70% is 'wasted' by the screen
to improve the power consumption in my thinkpad i also disabled all unneeded devices in the bios (bluetooth, modem, cardreader, thinkfinger, cdrom). rfkilling or unloading the modules also works
also make sure to disable Wake On Lan: ethtool -s eth0 wol d
ifyou want to put more things into your script:
http://www.lesswatts.org
http://www.gentoo.org/doc/en/power-management-guide.xml
http://www.thinkwiki.org/wiki/How_to_re … onsumption
http://www.free-it.de/archiv/talks_2005 … tml#N100A5
Last edited by broken pipe (2012-01-22 12:26:17)
Offline
@op - please edit your first post defining the location of the files. I suspect one is /etc/conf.d/cpupower.conf
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
i revised the script a bit, and add screen dpms and backlight rules.
this script is intended to be the most complete script for linux powersaving.
@broken pipe
1. i think that is what -S does. it has nothing to do with -B.
2. can you list the modules?
"After you do enough distro research, you will choose Arch."
Offline
A stupid question: How is this any different from laptop-mode-tools?
Offline
#!/bin/bash
#
#Power OFF nvidia card
cd /home/jochem/acpi_call
insmod acpi_call.ko
echo '\_SB.PCI0.PEG0.PEGP._OFF' > /proc/acpi/call &
#set wwan0 down
ifconfig wwan0 down &
#Enable Audio HD powersave
echo 1 > /sys/module/snd_hda_intel/parameters/power_save &
#Disable WOL
ethtool -s eth0 wol d &
#Enable multi core power savings
echo 1 > /sys/devices/system/cpu/sched_smt_power_savings &
#Enable laptop mode
echo 5 > /proc/sys/vm/laptop_mode &
#Set vm writeback to 10 secs (lose 10 secs on crash)
#echo 1500 > /proc/sys/vm/dirty_writeback_centisecs &
# Keep dirty writes in memory
echo 90 > /proc/sys/vm/dirty_ratio &
# Keep dirty writes out of cache
echo 1 > /proc/sys/vm/dirty_background_ratio &
# Writeback 60 secs
echo 6000 > /proc/sys/vm/dirty_writeback_centisecs &
# Swappiness
echo 9 > /proc/sys/vm/swappiness &
#maak bluetooth dood
rfkill block bluetooth
#/etc/init.d bluetooth stop
#kill nouveau
rmmod nouveau
#set scheduler
echo noop > /sys/block/sdb/queue/scheduler &
#set aspm
echo powersave > /sys/module/pcie_aspm/parameters/policy sleep 60 &
#set wireless power
iwconfig wlan0 power on
iwconfig wlan0 power timeout 500ms
#runtime PM
for i in $(ls /sys/bus/{pci,i2c}/devices/*/power/control);do echo auto > $i;done
#powersaving /dev/sda
hdparm -B 1 -S 12 /dev/sda
#set scaling_governor
#echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
#echo ondemand > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
#echo ondemand > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
#echo ondemand > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
#echo ondemand > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
#echo ondemand > /sys/devices/system/cpu/cpu5/cpufreq/scaling_governor
#echo ondemand > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor
#echo ondemand > /sys/devices/system/cpu/cpu7/cpufreq/scaling_governor
echo conservative | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
echo 1 > /sys/devices/system/cpu/cpufreq/conservative/ignore_nice_load
echo -n 40 > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
echo -n 90 > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
#echo -n 10 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
#set SATA link power managment
echo min_power > /sys/class/scsi_host/host0/link_power_management_policy
exit
....works pretty well
Last edited by jocheem67 (2012-01-23 11:26:15)
Offline
jocheem67,
Please use BBCode Code tags.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
@jocheem67
thanks for reminding me "bluetooth".
@kcirick
i think the reason you asked is that you didnt give it a try.
laptop-tool barely saves me 30 minutes.
=compare=
before: ~2hr
laptop-mode-tools: 2.5~3 hr
my script: 6 hr.
"After you do enough distro research, you will choose Arch."
Offline
@broken pipe
1. i think that is what -S does. it has nothing to do with -B.
2. can you list the modules?
1. hdparm -S 6 = Wait 30sec (5*6) and then spindown? Correct me if i'm wrong
2. those modules can't be applied on any other laptop, but hwdetect can list a queue of modules (sound, usb, net, wlan, fw, irda) you might want to unload.
Offline
taylorchu wrote:@broken pipe
1. i think that is what -S does. it has nothing to do with -B.
2. can you list the modules?1. hdparm -S 6 = Wait 30sec (5*6) and then spindown? Correct me if i'm wrong
2. those modules can't be applied on any other laptop, but hwdetect can list a queue of modules (sound, usb, net, wlan, fw, irda) you might want to unload.
also disable watchdog and enable ac97 powersaving:
echo 0 > /proc/sys/kernel/nmi_watchdog
echo Y > /sys/module/snd_ac97_codec/parameters/power_save
mount the partitions using the noatime option
you could also include if/then checks to verify if the commands can be adapted on the hardware. otherwise the user gets a load of error messages
another trick:
http://www.cyberciti.biz/tips/linux-eth … aving.html
edit: sry double post
Last edited by broken pipe (2012-01-23 08:00:59)
Offline
mount the partitions using the noatime option
relatime is the better option here iirc.
Offline
@kcirick
i think the reason you asked is that you didnt give it a try.
laptop-tool barely saves me 30 minutes.=compare=
before: ~2hr
laptop-mode-tools: 2.5~3 hr
my script: 6 hr.
You're right, I didn't actually try the scripts, but I asked because when I check the values you manually change, it is similar to what laptop-mode-tools do when it goes into the laptop-mode
These are what my laptop-mode-tools do:
$ cat /sys/module/pcie_aspm/parameters/policy
[default] performance powersave
$ cat /proc/sys/vm/laptop_mode
2
$ cat /proc/sys/vm/dirty_ratio
60
$ cat /proc/sys/vm/dirty_background_ratio
1
$ cat /proc/sys/vm/dirty_writeback_centisecs
60000
$ for i in /sys/bus/{pci,i2c}/devices/*/power/control; do cat $i; done
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
auto
$ for i in /sys/bus/usb/devices/*/power/autosuspend; do cat $i; done
2
2
2
2
2
2
$ for i in /sys/bus/usb/devices/*/power/level; do cat $i; done
auto
on
auto
auto
auto
auto
$ for i in /sys/class/scsi_host/host*/link_power_management_policy; do cat $i; done
min_power
$ cat /sys/module/snd_hda_intel/parameters/power_save
2
$ cat /sys/module/snd_hda_intel/parameters/power_save_controller
Y
The actual values are a little different (for example /proc/sys/vm/laptop_mode is 2 as opposed to 5 in your code), because that's what's in my /etc/laptop-mode/laptop-mode.conf. I can change it to whatever I want in there. My original question had to do with what these values really mean, I suppose... especially if the difference between laptop-mode and your script doubles the battery time (unless if I'm missing something/the point?)
Offline
pcie_aspm: +1~1.5hr!
I use more aggressive settings. For example /proc/sys/vm/dirty_ratio is set to 90, it basically almost disable the feature to let program to write dirty data to the disk.
laptop_mode is how many sec to let your disk to go to idle state. I set it to 5 because linux doc recommends so.
"After you do enough distro research, you will choose Arch."
Offline
Will you every transfer this information into the Wiki?
Offline
of course this will go to wiki.
I posted here to ask for more suggestions.
I will add this to "laptop".
"After you do enough distro research, you will choose Arch."
Offline
Might be worth to include the powersaving methods from those sources too.
1. https://wiki.archlinux.org/index.php/Pm … wer_saving
2. https://bbs.archlinux.org/viewtopic.php?id=130785
Especially the latter seem to have some nice tweaks.
Regards
Offline
Additional information about what each option does and how it can effect usage would also be welcome.
(e.g. NMI Watchdog)
(e.g.
#Enabling the controller can produce "clicking" noises when the device wakes up
echo Y > /sys/module/snd_hda_intel/parameters/power_save_controller
)
Edit: I believe most of this has been covered already but here's some nice ideas from Red Hat
Last edited by Earnestly (2012-01-23 21:17:22)
Offline
one module might be recommendable to blacklist: uhci_hcd
it's only used for usb 1.1 devices and needs 1-2 watt
for taking down bluetooth:
hciconfig hci0 down ; rmmod hci_usb
Those modules are often a reason for interrupts and wakeups. But they also disable hardware, so use them with caution
blacklist pcmcia
blacklist yenta_socket
blacklist ehci_hcd
blacklist uhci_hcd
blacklist usbcore
blacklist ohci1394
blacklist firewire-ohci
remount using relatime (thx army):
mount -o remount,relatime /
powersaving for ati video cards:
https://wiki.archlinux.org/index.php/Ati#Powersaving
Offline
is this script relevant for SSDs? Also would it work for ATI graphics card?
Last edited by venky80 (2012-01-23 22:35:03)
Acer Aspire V5-573P Antergos KDE
Offline
pcie_aspm=force i915.semaphores=1 i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1"
Intel chipsets/graphics could really benefit from these settings, check out phoronix..
echo powersave > /sys/module/pcie_aspm/parameters/policy
I feel that it' s necessary to use this kernelsetting towards aspm. Otherwise there's no use in passing the grub parameter..anyone confirms this?
is this script relevant for SSDs? Also would it work for ATI graphics card?
Noatime and discard are the fstab options you could use..and proper allignment..there's an arch wiki 'bout ssd's..
Last edited by jocheem67 (2012-01-24 05:53:55)
Offline
I have as my kernel line
kernel /vmlinuz-linux root=/dev/sda3 ro acpi_osi= i915.modeset=1 pcie_aspm=force i915.i915_enable_rc6=1
That alone gives me about a half hour extra battery time, if I don't watch any vids or flash, if I do the battery time seems to be about a half hour less then without those kernel options.
You're just jealous because the voices only talk to me.
Offline