This document contains only my personal opinions and calls of judgement, and where any comment is made as to the quality of anybody's work, the comment is an opinion, in my judgement.
[file this blog page at: digg del.icio.us Technorati]
sabiwatts script
	but mostly to the haphazard yet continuous progression of the
	Linux power conservation efforts, including monitoring tools
	like
	powertop
	and
	acpitool
	(which is rather more informative than
	acpi
	even if less official).
	#!/bin/bash
# vim:set ft=sh:
ME="$(basename "$0")"
PATH='/sbin:/usr/sbin:'"$PATH"
# Inspired by http://www.linux.com/feature/54610 and
# http://devresources.linux-foundation.org/dev/robustmutexes/src/fusyn.hg/Documentation/power/video.txt
usevbetool()    { true; }
if ! usevbetool
then VGAPCI="$(/sbin/lspci | grep VGA | cut -d ' ' -f1 | sed -e 's|0000:||' -e 's|:|/|')"
fi
VGACON="$(fgconsole)"
VGAVCS="$(mktemp /var/tmp/vgavcs-XXXXXX)"
VGASET="$(mktemp /var/tmp/vgaset-XXXXXX)"
trap "rm -f '$VGASET' '$VGAVCS'" 0 1 15
chvt 1
cp /dev/vcsa "$VGAVCS"
if usevbetool
then vbetool vbestate save > "$VGASET"
else cp "/proc/bus/pci/$VGAPCI" "$VGASET"
fi
sync; sleep 3; echo -n mem > /sys/power/state; sleep 3
if usevbetool
then vbetool post; vbetool vbestate restore & "$VGASET"
else cp "$VGASET" "/proc/bus/pci/$VGAPCI"
fi
cp "$VGAVCS" /dev/vcsa
chvt "$VGACON"
sync
	When the system is suspended to RAM it keeps its information for
	a fairly long time, my estimate si around 4-6 times longer than
	in its lowest active power mode. I am not using suspend to disk
	for a couple of important reasons, one being that encrypted disk
	save files are not supported or awakward to setup, and the other
	is that suspend to disk is much riskier than to ram, as there is
	a lot more state to save and restore.
	PowerTOP version 1.9 (C) 2007 Intel Corporation Cn Avg residency P-states (frequencies) C0 (cpu running) ( 0.2%) 1500 Mhz 0.0% C1 0.0ms ( 0.0%) 1000 Mhz 100.0% C2 0.0ms ( 0.0%) C3 110.6ms (99.8%) Wakeups-from-idle per second : 9.0 interval: 2.0s Power usage (ACPI estimate): 12.1W (01:49 remaining) Top causes for wakeups: 42.9% ( 3.0) pop3-login : __mod_timer (process_timeout) 14.3% ( 1.0) dovecot-auth : __mod_timer (process_timeout) 14.3% ( 1.0) dovecot : __mod_timer (process_timeout) 14.3% ( 1.0) <kernel core> : schedule_delayed_work_on (delayed_work_timerA rate of decay of 15m/month, which sort of matches the one between February 2008 and November 2008, where 1h30m of duration was lost in 9 months (most of that in the months between July and November though).
ST-PA3595U-1BRS) which costs
	around £110+VAT. Well, that's expensive but well worth it,
	as it lasts around 7-8h under light usage
PowerTOP version 1.9 (C) 2007 Intel Corporation Cn Avg residency P-states (frequencies) C0 (cpu running) ( 1.8%) 1500 Mhz 0.0% C1 0.0ms ( 0.0%) 1000 Mhz 100.0% C2 0.0ms ( 0.0%) C3 20.8ms (98.2%) Wakeups-from-idle per second : 47.2 interval: 2.0s Power usage (ACPI estimate): 12.0W (08:05 remaining) (long term: 5.1W,/18.9h) Top causes for wakeups: 25.6% ( 11.0) kicker : __mod_timer (process_timeout) 16.3% ( 7.0) xemacs : __mod_timer (process_timeout) 12.8% ( 5.5) <interrupt> : extra timer interrupt 11.6% ( 5.0) <kernel module> : queue_delayed_work (delayed_work_timer_fn)That's quite remarkable. It is a bit bigger than the others, as it protrudes from the back like many other high capacity laptop batteries, but that is used to advantage as the protrusion is used as a small pedestal that keeps the hot underside of the laptop a small distance from the desk and gives some inclination to the keyboard. The extra size is not a big deal, but the extra weight is noticeable, especially compared to the 4000mAh version.
PowerTOP version 1.9 (C) 2007 Intel Corporation Cn Avg residency P-states (frequencies) C0 (cpu running) ( 1.4%) 1500 Mhz 0.0% C1 0.0ms ( 0.0%) 1000 Mhz 100.0% C2 9.5ms ( 0.3%) C3 14.0ms (98.3%) Wakeups-from-idle per second : 70.6 interval: 15.0s Power usage (ACPI estimate): 12.0W (03:18 remaining) (long term: 5.2W,/7.6h) Top causes for wakeups: 17.0% ( 11.7) kicker : __mod_timer (process_timeout) 15.1% ( 10.5) <interrupt> : extra timer interrupt 11.2% ( 7.7) xemacs : __mod_timer (process_timeout) 9.3% ( 6.4) <kernel IPI> : Rescheduling interruptsand 3h is not that bad indeed. Lithium-ion batteries lose capacity even if not used, and I haven't used the 4 cell battery since February, so it must have lost a bit of capacity; using
acpitool shows it has lost 20% of its original
	capacity:
tree# acpitool -B
  Battery #1     : present
    Remaining capacity : 3200 mAh, 100.0%
    Design capacity    : 4000 mAh
    Last full capacity : 3200 mAh, 80.00% of design capacity
    Capacity loss      : 20.00%
    Present rate       : 0 mA
    Charging state     : discharging
    Battery type       : rechargeable, LION
    Model number       : NS2P3SZNJ4WR
    Serial number      : 18087
	which for 10 months is not too bad. Instead the 6 cell battery I
	have been using for those 10 months has lost 65% of its
	capacity:
tree# acpitool -B
  Battery #1     : present
    Remaining capacity : 1814 mAh, 100.0%
    Design capacity    : 5200 mAh
    Last full capacity : 1814 mAh, 34.88% of design capacity
    Capacity loss      : 65.12%
    Present rate       : 0 mA
    Charging state     : charged
    Battery type       : rechargeable, LION
    Model number       : NS2P3SZNJ5WR
    Serial number      : 16507
	and the new 9 cell one of course has lost none:
tree# acpitool -B
  Battery #1     : present
    Remaining capacity : 7800 mAh, 100.0%
    Design capacity    : 7800 mAh
    Last full capacity : 7800 mAh
    Present rate       : 0 mA
    Charging state     : charged
    Battery type       : rechargeable, LION
    Model number       : NS3P3SZNJSWR
    Serial number      : 12632
	The capacity loss of the 6 cell battery in 10 months is quite
	remarkable, and checking some relevant sources
	(1,
	2)
	the rate of decay depends very much on battery temperature (and
	on battery charge: a fully charged one decays more rapidly than
	a partially charged one). Keeping the battery plugged into the
	laptop even when on wired power seems a bad idea, also because
	it happens to be next to the CPU, whuch generates a lot of heat.
	xrandr power consumption went back
	down to 11-12W.
	