LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-14-2006, 12:14 PM   #1
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,455

Rep: Reputation: Disabled
Suspend to RAM (S3) not working


Hi,

I'm trying to get suspend-to-RAM working on my HP Pavilion zv5000 with an NVidia card (using X's nv driver), Slack 11.0 and a recompiled 2.6.17.13 kernel. Suspend-to-disk (hibernate) works great with swsusp. When I try suspend-to-RAM, only the fan turns back on when I press my power button.

I have been trying to follow the instructions at http://developer.osdl.org/dev/robust...ower/video.txt. When I run the script the screen goes momentarily blank like it is going to suspend, but then the screen comes back on and I'm back where I was. In other words, it seems like it might be working but is automatically unsuspending without me pressing a button. The script shows the following error: line 7: /proc/acpi/sleep: No such file or directory.

Does anyone have any suggestions for me?

Thanks,
Brian
 
Old 11-14-2006, 12:58 PM   #2
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,455

Original Poster
Rep: Reputation: Disabled
OK, so it seems that /proc/acpi/sleep has been replaced by /sys/power/state. "echo 3 > /sys/power/state" gives a write error. "echo -n mem > /sys/power/state" produces the same behavior as before, ie. the computer seems to go into suspend mode (blank screen, power light blinking), but pressing the power button only serves to start the fan.

BTW, I have also tried the instructions at http://www.linux.com/article.pl?sid=06/05/24/1716222

Brian
 
Old 11-15-2006, 09:58 PM   #3
Tyante
LQ Newbie
 
Registered: Oct 2004
Location: California
Distribution: Slackware, Debian, FreeBSD
Posts: 10

Rep: Reputation: 0
I just posted about this on another thread. I'm using Slackware 11 with a custom 2.6.18.2 kernel. About the write error, make sure you do the "echo -n mem > /sys/power/state" as root.

Check out the other thread for some sleep scripts.
http://www.linuxquestions.org/questi...d.php?t=495225
 
Old 11-16-2006, 11:56 AM   #4
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,455

Original Poster
Rep: Reputation: Disabled
Tyante,

I tried both the scripts on the page you reference and neither work. My hard drive and cd drive seem to wake up, which is different from my other attempts, but the screen stays blank and the keyboard does not respond, so I end up doing a hard reboot. I did run the scripts as root.

Thanks,
Brian
 
Old 11-17-2006, 01:36 PM   #5
avheretic
Member
 
Registered: Oct 2005
Distribution: Slackware 11
Posts: 45

Rep: Reputation: 15
I had this problem earlier and traced this occurrence to a problem with the USB modules not unloading properly. This way though there seemed to be a lot of hard-disk thrashing when resuming from suspend nothing much actually happened and a hard reboot was the only option left.

Soln : Recompile the kernel with USB options as modules. This is a script I wrote to get suspend working. Hope it helps.

Code:
#!/bin/sh

# Get current terminal :
CTTY=`tty | awk -F'/' '{ print $4 }'`
TTTY=`expr \( $CTTY + 1 \) % 6` 
chvt $TTTY

echo "Supending ...."

# Remove the USB modules. Need to check if these are causing problems
# in the new kernel also or not.
rmmod uhci_hcd 
rmmod ehci_hcd

# write all unwritten data (just in case)
sync

# suspend display
vbetool vbestate save > /tmp/db
vbetool dpms suspend

# suspend
echo -n mem > /sys/power/state

# resume display
vbetool vbestate restore < /tmp/db
vbetool dpms on

# Modules back on.
modprobe ehci_hcd
modprobe uhci_hcd


rm /tmp/db
chvt $CTTY
Note : I am using vbetool to control the display.
 
Old 11-18-2006, 02:22 AM   #6
Tyante
LQ Newbie
 
Registered: Oct 2004
Location: California
Distribution: Slackware, Debian, FreeBSD
Posts: 10

Rep: Reputation: 0
Quote:
Originally Posted by avheretic
Soln : Recompile the kernel with USB options as modules. This is a script I wrote to get suspend working. Hope it helps.
As avheretic pointed out, USB can cause problems with sleep mode and returning from it. Also, make sure your Xorg config is set up correctly. Your problem may be with the video driver you are using. While searching this problem before, I came across many other people having an issue with ATI radeon cards I believe. I have one in my laptop. The modules I added from the stock config are:

Code:
    Load       "record"
    Load       "synaptics"      # touchpad
    Load       "dri"
    Load       "radeon"         # video card ATI Mobility 9000
    Load       "drm"
    Load       "xtrap"
My graphics device is then:

Code:
Section "Device"
        Identifier "ati9000"
        Driver     "radeon"
        VendorName "ATI"
        BoardName  "ATI Radeon Mobility 9000"
        Option     "AGPMode"    "4"
        Option     "AGPFastWrite" "no"
        Option     "EnablePageFlip" "yes"
        Option     "DDCMode"    "yes"
        Option     "Accel"
        Option     "BackingStore"
EndSection
And make sure you have a dri section. Mine is at the end of the config file.

Code:
Section "DRI"
        Group   0
        Mode    0666
EndSection

One other modification I made to my sleep script. I added a line to lock my screen with the xscreensaver. To do this, you have to use the su <user> -c "/path/xscreensaver-command -lock". You can also use the kdedesktop_lock command or any other to lock your screen if you wish. When I was looking at these, they could not be run as root. That's why you need the "su <user> -c" before the command. Hope this helps.
 
Old 11-18-2006, 09:57 AM   #7
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,455

Original Poster
Rep: Reputation: Disabled
avheretic: I already had these compiled as modules, and one of the scripts I tried from Tyante did try to unload and reload them, with no luck.

Tyante: I have an nVidia card and am using X's nv driver. Do you still think I should try all the Options and Modules that you use for your Radeon card?

Brian
 
Old 11-18-2006, 03:32 PM   #8
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,455

Original Poster
Rep: Reputation: Disabled
BTW, even without X running the machine doesn't come back.

Brian
 
Old 11-20-2006, 06:22 AM   #9
Tyante
LQ Newbie
 
Registered: Oct 2004
Location: California
Distribution: Slackware, Debian, FreeBSD
Posts: 10

Rep: Reputation: 0
With an nvidia card, use their driver. I think you still want the DRI stuff in your xorg.conf file. I don't believe that has anything to do with video card drivers. For not coming back out of xwindows, I have not set my acpi up there. I currently only have it set for while in xwindows.

About your USB modules not being unloaded correctly, do you have CONFIG_MODULES_UNLOAD set to yes in your kernel? Here is also what I set in my kernel for ACPI:

Code:
CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_SLEEP_PROC_FS=y
CONFIG_ACPI_SLEEP_PROC_SLEEP=y
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_VIDEO=y
CONFIG_ACPI_HOTKEY=y
CONFIG_ACPI_FAN=y
CONFIG_ACPI_DOCK=m
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_THERMAL=y
My laptop is different than yours and I'm using kernel 2.6.18.2.
 
Old 11-21-2006, 12:45 PM   #10
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,455

Original Poster
Rep: Reputation: Disabled
1. Tried with the nvidia driver...no difference. On the other hand, I could not recover from a suspend-to-disk with the nvidia driver (plus I had to reinstall X because the nvidia installation overwrote my glx module).

2. CONFIG_MODULE_UNLOAD is yes. All the other options were compiled as modules. I recompiled as static for all the acpi stuff. No change in the suspend problem.

3. I added in all the Options you mentioned, plus the DRI. Again, no change.

This is sure a tough one. Any idea why hibernate wouldn't work with nvidia's driver?

Brian
 
Old 11-21-2006, 06:18 PM   #11
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,455

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by BCarey
1. Tried with the nvidia driver...no difference. On the other hand, I could not recover from a suspend-to-disk with the nvidia driver (plus I had to reinstall X because the nvidia installation overwrote my glx module).
ok, I got Suspend-to-disk working with the nvidia driver following the hack at http://ubuntuforums.org/showthread.php?t=79295 (although the line numbers are different).

Brian
 
  


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
dell e1505 - how do i get suspend 2 ram working? mistamaila Linux - Laptop and Netbook 11 09-02-2006 03:15 AM
[Help!]Laptop can not suspend to ram Crossa Linux - Laptop and Netbook 3 08-20-2006 12:29 AM
Another suspend-to-RAM problem coldsalmon Linux - Laptop and Netbook 16 08-14-2006 09:57 PM
Suspend to RAM/HD question Lake-end Linux - Laptop and Netbook 6 07-05-2005 01:10 AM
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 03:15 PM.

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