just for everyone interested I post my /etc/rc.local optimized for powersaving with my NC10 \w Supertalent 64Gb SSD . I'm using the PHC-enabled kernel and Intel-PHC for cpu undervolting and a self-compiled iwlagn driver for the Intel 5100agn wifi card which is replacing the built-in atheros.
Estimated battery time right now: 80% battery, ~6:30h (screen dimmed to 1/8, compiz, firefox, mail, feedreader, wifi). Realistic usage time is about ~5:30-6:00h. Powertop minimum watt usage reported 6,9W.
Problem #1: Soundchip powersaving does not work, sound remains muted
Problem #2: Setting suspend mode for HSDPA modem to "auto" only seems to work by doing "by hand" in a terminal after gnome has been fully loaded, setting the mode in rc.local or /usr/lib/pm-utils/sleep.d does not work. Any help would be greatly appreciated.
Code: Select all
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# cpu voltage powersaving
echo "12:20 10:15 8:15 6:15" | tee /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
echo "12:20 10:15 8:15 6:15" | tee /sys/devices/system/cpu/cpu1/cpufreq/phc_controls
# wifi powersaving
iwconfig wlan0 power on
# laptop mode
echo 5 | tee /proc/sys/vm/laptop_mode
echo 1 | tee /sys/devices/system/cpu/sched_smt_power_savings
# drive polling
hal-disable-polling --device /dev/scd0
# disc usage
echo noop | tee /sys/block/sda/queue/scheduler
echo 1 | tee /proc/sys/vm/swappiness
echo 1500 | tee /proc/sys/vm/dirty_writeback_centisecs
echo 20 | tee /proc/sys/vm/dirty_ratio
echo 10 | tee /proc/sys/vm/dirty_background_ratio
#echo 10 | tee /sys/module/snd_hda_intel/parameters/power_save
# disabled since with this line there is no sound at all
# HSDPA
#echo "auto" | tee /sys/bus/usb/devices/1-7/power/level
# disabled since "auto" cannot be set via /etc/rc.local. Timing issue?
# Webam
echo "auto" | tee /sys/bus/usb/devices/1-8/power/level
for dir in apparmor apt ConsoleKit cups dist-upgrade fsck gdm installer news ntpstats samba unattended-upgrades ; do
if [ ! -e /var/log/$dir ] ; then
mkdir /var/log/$dir
fi
done
for d in /sys/bus/usb/devices/* ; do
if [ -e "$d/power/autosuspend" ]; then
echo "0" > $d/power/autosuspend
fi
done
exit 0