[ltp] Thinkpad Power Consumption Roundup [TPCR]
Volker Krueger
linux-thinkpad@linux-thinkpad.org
Thu, 30 Apr 2009 10:02:54 +0200
Hi guys,
i thought it might make sense to revisit the power-consumption issue.
I realized in the meantime (I had a bit of time over eastern) how are
things working under ubuntu. Many things are still not clear to me so I
decided to not use laptop-mode-tools and make a powersave file myself,
which I placed in /etc/pm/power.d
Below are powersave.sh and xorg.conf
i use the latest ubuntu version.
With these, I use right now long-term 9.1W, but short-term right now
8.0W and 7.5W shortterm when the disk is off.
best,
Volker
/etc/pm/power.d/powersave.sh:
#!/bin/bash
if on_ac_power; then
# normal settings
hdparm -B 200 -S 240 -M 254 /dev/sda
mount -o remount,commit=60 /
mount -o remount,commit=60 /home
echo 0 > /proc/sys/vm/laptop_mode
echo 10 > /proc/sys/vm/dirty_ratio
echo 5 > /proc/sys/vm/dirty_background_ratio
echo 500 > /proc/sys/vm/dirty_writeback_centisecs
echo max_performance >
/sys/class/scsi_host/host0/link_power_management_policy
echo max_performance >
/sys/class/scsi_host/host1/link_power_management_policy
modprobe e1000e
echo 0 > /proc/sys/kernel/nmi_watchdog
echo 0 > /sys/devices/system/cpu/sched_mc_power_savings
else
# Turn on power savings
hdparm -B 1 -S 12 /dev/sda
mount -o remount,commit=600 /
mount -o remount,commit=600 /home
echo 5 > /proc/sys/vm/laptop_mode
echo 90 > /proc/sys/vm/dirty_ratio
echo 1 > /proc/sys/vm/dirty_background_ratio
echo 30000 > /proc/sys/vm/dirty_writeback_centisecs
echo min_power > /sys/class/scsi_host/host0/link_power_management_policy
echo min_power > /sys/class/scsi_host/host1/link_power_management_policy
echo 1 > /sys/devices/system/cpu/sched_mc_power_savings
echo 0 > /proc/sys/kernel/nmi_watchdog
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 10 > /sys/module/snd_hda_intel/parameters/power_save
iwconfig wlan0 power on
echo 5 > /sys/bus/pci/drivers/iwlagn/*/power_level
echo 5 > /proc/sys/vm/laptop_mode
rmmod e1000e
fi
/etc/X11/xorg.conf
Section "Device"
Identifier "Configured Video Device"
Option "AccelMethod" "UXA"
EndSection
Section "Monitor"
Identifier "Configured Monitor"
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
EndSection