I've been trying to get Suspend to RAM working on my Thinkpad T23, which runs Debian GNU/Linux Sid. Occasionally, everything works "perfectly;" it sleeps and wakes without any problems. More often than not, however, it sleeps, and when I press the power button to wake it up, the screen turns on, but the little crescent moon doesn't turn off. I wait and see if the computer will wake and go into X, but nothing happens. I press "Alt-F7" and "Ctrl-Alt-F7" to see if it will go into X, and nothing happens. Eventually, I have to turn pull the plug and turn the computer back on.
I use a script I got off
this website, and it looks like this:
Code:
#!/bin/sh
# discover video card's ID
ID=`lspci | grep VGA | awk '{ print $1 }' | sed -e 's@0000:@@' -e 's@:@/@'`
# securely create a temporary file
TMP_FILE=`mktemp /var/tmp/video_state.XXXXXX`
trap 'rm -f $TMP_FILE' 0 1 15
# switch to virtual terminal 1 to avoid graphics
# corruption in X
chvt 1
# write all unwritten data (just in case)
sync
# dump current data from the video card to the
# temporary file
cat /proc/bus/pci/$ID > $TMP_FILE
# suspend
echo -n mem > /sys/power/state
# restore video card data from the temporary file
# on resume
cat $TMP_FILE > /proc/bus/pci/$ID
# switch back to virtual terminal 7 (running X)
chvt 7
# remove temporary file
rm -f $TMP_FILE
I use debian's 2.6.18-2-686 kernel, if that's any help.
Any ideas on why suspend to ram sometimes works and sometimes doesn't?
Thanks in advance.