LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 11-22-2006, 11:11 PM   #1
notapplicable
Member
 
Registered: Sep 2005
Location: Technology Capital of the World
Distribution: Slackware 12.1
Posts: 67

Rep: Reputation: 15
Suspend to RAM problem: works occasionally


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.

Last edited by notapplicable; 11-22-2006 at 11:23 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Suspend to RAM (S3) not working BCarey Linux - Laptop and Netbook 10 11-21-2006 06:18 PM
Another suspend-to-RAM problem coldsalmon Linux - Laptop and Netbook 16 08-14-2006 09:57 PM
Recovery from suspend to RAM only works in X? bl0tt0 Linux - Laptop and Netbook 1 04-24-2006 03:40 PM
IPW2200 - works occasionally coolnicklas Linux - Wireless Networking 6 04-17-2005 06:15 PM
suspend to ram works at last!!!! jwn7 Linux - Laptop and Netbook 4 03-31-2005 06:42 AM


All times are GMT -5. The time now is 02:36 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration