[ltp] Anyone using Ubuntu 8.10 on X60s / X61s? (battery life)

Theodore Tso linux-thinkpad@linux-thinkpad.org
Sun, 2 Nov 2008 18:26:42 -0500


On Sun, Nov 02, 2008 at 11:12:15PM +0100, Christian Fromme wrote:
> On 02.11. 13:26, Ari El wrote:
> > 
> > Just wondering about the new ubuntu battery life / power consumption. 
> > 
> > How many hours can be expected on an extended battery? Is power consumption
> > anything near XP's 7.5W when note-taking at low brightness levels and
> > wireless off?
> 
> Debian Etch on X61s, kernel 2.6.26-1-686 uses around 11W with wireless
> on. SLES 10 on the same laptop needs a good bit more. YMMV.

With low brightness levels, USB modules unloaded, wireless unloaded,
bluetooth turned off, etc., I've managed to get my X61s down to 8.6
watts or so.  Unfortunately, it requires white a lot of manual
tweaking, and you have to do things like killall -STOP various GNOME
applets and make sure that OpenOffice and FireFox are closed.  I also
will kill off a number of system daemons that tend to wake up too
often.  In addition, compiz wastes a huge amount of power so make sure
you go to the menu item System->Preferences->Appearance Preference,
then clock on the Visual Effects tab, and select "None: Provides a
simple desktop environment without any effects", to disable compiz.
You'll then need to restart the X server (or reboot) to see the power
savings; apparently once you run any 3D programs, something happens in
the X server or the DRM kernel driver that causes a huge number of
extra interrupts per second that never goes away until the X server is
restarted.

Oh, and stopping trackerd is a really good idea, too.

This is with Ubuntu Hardy; I'm hoping that with newer Linux distro's
it won't require quite so much manual work to get the power
utilization down to 8 or 9 watts.  The good news is that it's possible
although userspace needs a lot of work before it's easy enough to do
most users to be able to manage.  Right now you have to be a bit of a
Linux whiz, and manually monitor things using powertop while hitting
various badly-written userspace programs on the head so they stop
wasting power.

						- Ted

P.S.  Here's my personal low-power.sh script.  Your mileage may vary;
warning, this is a personal shell script created by a kernel hacker
and is a gross kludge; it may not do the right thing on your system.
It needs to run as root.  There is a further set of things that I do
when I run in "airplane mode", which involves killing off
network-manager, making sure the ethernet and wireless interfaces are
down and the wireless driver unloaded, etc., that is necessary to get
the power utilization down to 8.5 watts.

#!/bin/sh
# /usr/local/sbin/ultrabay_eject
xbacklight =30
/usr/sbin/laptop_mode start
modprobe lp ; sleep 1; rmmod lp parport_pc parport
iwpriv eth1 set_power 5
modprobe ehci-hcd ; modprobe uhci-hcd; sleep 1; rmmod ehci-hcd uhci-hcd
killall -STOP multiload-applet-2 cpufreq-applet
#aticonfig --set-powerstate=1 --effective=now
# echo disable > /proc/acpi/ibm/wan 
echo disable > /proc/acpi/ibm/bluetooth
rmmod 8250 serial_core nsc_ircc irda crc_ccitt usb_storage nls_utf8 nls_cp437 vfat  fat sg 
ethtool -s eth0 wol d
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
echo 1 > /sys/devices/system/cpu/sched_mc_power_savings
for i in /sys/class/scsi_host/*/link_power_management_policy; do
    echo min_power > $i
done
for i in `echo /sys/bus/pci/drivers/iwlagn/*/power_level`; do
    echo 5 > $i
done
for i in cron atd ntp uml-utilities timidity ; do
    /etc/init.d/$i stop
done