[ltp] Aggressive Powersaving
linux-thinkpad@linux-thinkpad.org
linux-thinkpad@linux-thinkpad.org
Tue, 9 Feb 2010 22:55:22 +0100
--EeQfGwPcQSOJBaQU
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
On Tue, Feb 09, 2010 at 14:16:32 +0100, Karsten König wrote:
> Heya,
[...]
> I don't mind echos to some sysfs file, the simpler the better, I just want to
> make a small script which I can run as root to just get power down
> aggressivly.
Hi,
here is my script. Usually, I have iwlagn (wireless) and e1000e
unloaded unless I need network connectivity. I don't really know if all
the actions in the script really give any power saving. I just tried to
max out the battery runtime.
Additionally, I also use laptop_mode and noflushd (modified to work
with libata) to spin down the hard disk.
Regards,
Tino
--EeQfGwPcQSOJBaQU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=save_power
#!/bin/sh
cd /sys/bus/pci/drivers/yenta_cardbus 2>/dev/null &&
for i in 0* ; do
echo -n "$i" > unbind
done ||
echo "no cardbus loaded"
modules="$modules yenta_socket"
cd
modules="$modules uhci_hcd ehci_hcd"
modules="$modules snd_hda_intel"
hciconfig hcd0 down
for i in firewire_sbp2 pcmcia mmc_block sdhci_pci sdhci mmc_core firewire_ohci firewire_core rfcomm btusb bluetooth uinput $modules ; do
modprobe -r $i
done
for i in /sys/class/scsi_host/*/link_power_management_policy ; do
dev="`echo $i | cut -d'/' -f 5`"
echo min_power > $i
echo "$dev: `cat $i` "
done
xrandr --rate 40
xrandr --rate 40
xrandr --output VGA1 --off
ethtool -s eth0 wol d
ethtool -s eth0 speed 100
ethtool -s eth0 autoneg off
echo disable > /proc/acpi/ibm/bluetooth
echo -n "powersave" > /sys/module/pcie_aspm/parameters/policy
--EeQfGwPcQSOJBaQU--