LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices



Reply
 
Search this Thread
Old 03-06-2005, 09:42 PM   #1
jwn7
Member
 
Registered: Aug 2004
Location: pittsburgh, pa
Distribution: gentoo
Posts: 81

Rep: Reputation: 15
suspend to ram works at last!!!!


for the longest time i couldn't get my display to come back. but this little video post program, available here: http://www.srcf.ucam.org/~mjg59/laptops/ (last link) did the trick.

here' is my /etc/acpi/powerbtn.sh script, which sucessfully suspends and comes back cleanly

Code:
#!/bin/sh
# /etc/acpi/powerbtn.sh
# suspend to ram and come back

#save the console
CONSOLE=`fgconsole`
chvt 12
VBESTATE=`tempfile`
/usr/sbin/vbestate save >$VBESTATE;

# lock the powerbutton, so pressing it once starts the suspend,
# and pressing it again to come back doesn't start this script all
# over again.
LOCK_FILE=/var/lock/powerbtn.lock

get_lock () {
        dotlockfile -p -l -r 0 $LOCK_FILE
        [ $? -ne 0 ] && return 1
        return 0
}

release_lock () {
        [ $$ -eq `cat $LOCK_FILE` ] || exit 1
        dotlockfile -u $LOCK_FILE
}

trap "" 2 3 15
get_lock || exit 1

#stop the acpi daemon ... gross, but it's the easiest way
/etc/init.d/acpid stop >/dev/null 2>&1

# shut the backlight off
dpms off

#take down the network and unload the usb moduels
ifdown eth0
modprobe -r ehci_hcd
modprobe -r usbhid
modprobe -r uhci_hcd
modprobe -r ohci1394

# suspend to ram
echo "mem" > /sys/power/state

#reload the display module, mine is the intel i830
modprobe i830

# use that video post program and restore the state of the adapter
/usr/sbin/vm86_video_post
/usr/sbin/vbestate restore <$VBESTATE
rm $VBESTATE

# reload the usb modules, network, set the time
# and turn the backlight back on
modprobe ehci_hcd
modprobe usbhid
modprobe uhci_hcd
modprobe ohci1394
ifup eth0
hwclock --hctosys
/usr/sbin/dpms on

# go back to the console
chvt $CONSOLE;
#chvt 12;
#chvt $CONSOLE;

# Other half of the hideous hack
/etc/init.d/acpid start >/dev/null 2>&1

# done
release_lock
works great for me, hopefully that helps somebody get it working.
 
Old 03-10-2005, 07:55 AM   #2
Engmar
Member
 
Registered: Oct 2003
Location: The Forest
Distribution: Ubuntu, LFS, DSL
Posts: 127

Rep: Reputation: 16
Good find! Thanks for the link.
 
Old 03-16-2005, 06:52 PM   #3
vdemuth
Member
 
Registered: Oct 2003
Location: West Midlands, UK
Distribution: Slackware 14 (Server),Suse 13.1 (Desktop),, Mepis on the wifes lappy
Posts: 770

Rep: Reputation: 94
Hi,
Tried that but still cant get laptop to wake up again. My graphics is compiled into the kernel so I have no loadable module.
Have you any more suggestions
 
Old 03-17-2005, 06:05 AM   #4
short101
Member
 
Registered: May 2004
Location: Aust.
Distribution: Debian
Posts: 424

Rep: Reputation: 30
Maybe recompile kernel and make graphics module instead of built in.
 
Old 03-31-2005, 07:42 AM   #5
krisealv
Member
 
Registered: Jan 2004
Location: Hareid, Norway
Distribution: Ubuntu
Posts: 111

Rep: Reputation: 15
korrupt x

did you get it to work with x? or did you do it from text mode? my x just starts to blink after the resume when I do this I've also got a tool called vbntool, this can handle dpms and vbnstate, will this work?

Last edited by krisealv; 03-31-2005 at 07:50 AM.
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Another suspend-to-RAM problem coldsalmon Linux - Laptop and Netbook 16 08-14-2006 10:57 PM
Setup whether to suspend-to-RAM or not (Xfce) robbbert Linux - Laptop and Netbook 2 03-28-2006 04:06 PM
Suspend to RAM/HD question Lake-end Linux - Laptop and Netbook 6 07-05-2005 02:10 AM
FC2: suspend-to-ram changes clock? anandj Linux - Laptop and Netbook 7 03-02-2005 10:51 AM
Suspend to RAM in LInuX enigma82 Linux - Hardware 7 09-29-2004 05:28 AM


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

Main Menu
Advertisement
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