Linux has a long-standing problem with running down the battery of certain laptop machines when the machine is "off."
This affects many Toshibas, but has been reported with other brands. It affects many, maybe all, recent versions of Linux, Puppy and Ubuntu included. It certainly affected Puppy 4.3.1 on my Toshiba Portege R100.
After some investigation, I discovered that the machine's internal Ethernet card was still running after Puppy shut down the machine. Since "Wake-on-LAN" was disabled in the machines BIOS, I thought this a bit bizarre.
Solving the problem turned out to be fairly simple; unload the driver module (e100 for the R100) before shutting down.
To see if this problem affects your computer, check the lights on either the machine's Ethernet port or the hub/switch/router it is plugged into. If the lights are on after Puppy shuts down the box, you have the problem.
The following script attempts to unload all the networking modules:
Code: Select all
#!/bin/sh
#
# Unload the Ethernet drivers on shutdown to prevent battery drain.
# STH 28 May 2010, after the rc.pcmcia script by BK.
# For Puppy Linux 4.3.1
case "$1" in
start) # Puppy loads the drivers at bootup, we don't have to!
;;
stop)
echo -n "Shutting down Ethernet services: " > /dev/console
for i in `/sbin/lsmod | cut -d' ' -f1` ; do
if grep -q "^$i " /etc/networkmodules; then
/sbin/modprobe -r "$i" && echo -n "$i " > /dev/console
fi
done
echo > /dev/console
sleep 2 # take this out once testing complete
;;
restart)
;;
esac
# END
-Shel