[ltp] transporting suspended thinkpad
Atte André Jensen
linux-thinkpad@linux-thinkpad.org
Fri, 04 Aug 2006 12:43:33 +0200
Hi
Is it save to suspend a thinkpad (T41) and take it with me (in a bag)?
IOW: Are the heads lifted from the harddisc during suspend?
This is my sleep.sh:
#!/bin/bash
. /etc/default/acpi-support
. /usr/share/acpi-support/power-funcs
. /usr/share/acpi-support/device-funcs
. /usr/share/acpi-support/policy-funcs
DeviceConfig;
if [ x$ACPI_SLEEP != xtrue ] && [ x$1 != xforce ]; then
exit;
fi
# If gnome-power-manager or klaptopdaemon are running, let them handle
policy
if [ x$1 != xforce ] && [ x$1 != xsleep ] && [ `CheckPolicy` = 0 ]; then
exit;
fi
if [ x$LOCK_SCREEN = xtrue ]; then
if pidof xscreensaver > /dev/null; then
for x in /tmp/.X11-unix/*; do
displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
getXuser;
if [ x"$XAUTHORITY" != x"" ]; then
export DISPLAY=":$displaynum"
. /usr/share/acpi-support/screenblank
fi
done
fi
fi
# Generic preparation code
. /etc/acpi/prepare.sh
if [ x$DISABLE_DMA = xtrue ] && [ -b /dev/hda ]; then
hdparm -d 0 /dev/hda
fi
echo -n $ACPI_SLEEP_MODE >/sys/power/state
if [ x$RESET_DRIVE = xtrue ] && [ -b /dev/hda ]; then
hdparm -w /dev/hda
hdparm -C /dev/hda
hdparm -C /dev/hda
hdparm -C /dev/hda
hdparm -d 1 /dev/hda
fi
if [ x$DISABLE_DMA = xtrue ] && [ -b /dev/hda ]; then
hdparm -d 1 /dev/hda
fi
# Generic wakeup code
. /etc/acpi/resume.sh
--
peace, love & harmony
Atte