Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Troubleshooting suspend and hibernate

  1. #1
    Join Date
    Nov 2005
    Beans
    23
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Troubleshooting suspend and hibernate

    I've seen dozens of threads posted on this forum about suspend and hibernate problems, many of them left orphaned and apparently unsolved. When I came looking for hints to solve my own problem (unable to either suspend or hibernate), all I've found is a confusing collection of threads mostly related to waking from a low-power state, rather than getting into it in the first place.

    So what I'd like to know is if there is a general procedure for troubleshooting suspend/resume problems - logs to check, scripts/commands to run, what to do when you get a blinking cursor on a black screen, etc. I found this thread, but I'd like to start with steps less drastic than recompiling my kernel, and I suspect the information there is rather out of date anyway.

    I can give more information on my personal problem, but for now I'd really just like general troubleshooting information, so others can use it too.

  2. #2
    Join Date
    Apr 2008
    Beans
    353

    Re: Troubleshooting suspend and hibernate

    Agreed, we should have a simple resolution process for this problem. I am experiencing the same issues, and would like some information on at least where to start looking for the problem.

    I was in #ubuntu on freenode, and they said it is motherboard specific. So far, that's all I know.


    Hmm.. on a whim i checked my kern.log and found that somehow i had disabled my Swap partition....

    Now my system suspends and resumes fine.

    I am just unsure if hibernation works. It goes down, but on resume, it boots as normally, not resume from hibernation.
    Last edited by Mgiacchetti; May 8th, 2009 at 01:57 PM.
    I don't pretend to be captain weird. I just do what I do.
    Ubuntu user #23413

  3. #3
    Join Date
    Sep 2007
    Location
    Atlanta, GA
    Beans
    165
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Troubleshooting suspend and hibernate

    ive asked the question in 2-3 of the "abandoned threads" (one of which i started) on what to do, dmesg, logs, etc

    no one that knows what to do has the time/seems to care/etc to enlighten us.

  4. #4
    Join Date
    Nov 2005
    Beans
    23
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Troubleshooting suspend and hibernate

    Ok, so due to the resounding silence on this issue, I've done my best to find and compile a general troubleshooting guide. I consider this a work in progress as I have the time to do the research to improve the list.

    DISCLAIMER: I don't know any more about this issue than the average linux user (arguably less, actually), so I can't offer help beyond telling people where to look and (more or less) what to look for. If anyone has suggestions, additions, or would like to make this guide more helpful, please say so.

    Because a lot of suspend/hibernate problems require a hard restart, I'm including this as general helpful information:
    Before doing a hard reboot, try the following combination:
    hold down Alt+SysRq(Print Screen), and then type REISUB.
    This combination should stop all programs, unmount all drives, and reboot the computer, more safely than just pressing the power button
    If this doesn't work, then you can go ahead and hold down the power button.

    Most of my information was gathered from these sites, so you may find it useful to read them, too.
    https://wiki.ubuntu.com/DebuggingACP...20Bug%20Report
    https://wiki.ubuntu.com/DebuggingKernelSuspend
    https://wiki.ubuntu.com/DebuggingGNOMEPowerManager
    http://ubuntuforums.org/showthread.php?t=505890

    Suspend/Hibernate menu items not shown
    If you don't have the suspend or hibernate menu items, you need to find out why they are disabled.

    1. Check to make sure that Gnome Power Manager is enabled
    Navigate to your login items (System -> Preferences -> Login Items), and scroll down to make sure that the Gnome Power Manager is checked.

    2. Make sure Gnome Power Manager is behaving
    Open up a terminal, and run the command
    Code:
    gnome-power-manager restart
    If suspend/hibernate appear now, then create a launcher for that command in your login items.

    3. Check if the HAL detectecd a sleep handler
    Code:
    lshal | grep can_suspend
    If this returns false, you need to check your BIOS settings and make sure suspend is enabled there.

    4. Check to see if the ability is there, but disabled
    If the previous check returned true, it's possible that the ability to suspend/hibernate has been disabled. You can check this by running
    Code:
    gconftool-2 -R /apps/gnome-power-manager | grep can
    You should get something like
    Code:
    can_suspend = true
    can_hibernate = true
    If either of those are false type
    Code:
    gconf-editor
    Navigate to apps/gnome-power-manager/general and change the appropriate values to true

    5. Determine why suspend/hibernate isn't offered
    If the one you're having problems with isn't shown at all, then follow the instructions in the Debugging Gnome Power Manager page to determine why not.


    System freezes when suspending/hibernating
    1. Check Swap
    Swap is essential for suspending and hibernating. If your swap isn't on and active, it appears to generate the "blinky cursor on screen when trying to suspend/hibernate," but it could manifest in other ways as well.
    You may also experience problems if your swap is smaller than the amount of ram you have installed, or if you're using a swap file rather than a swap partition.
    Code:
    	cat /proc/swaps
    	swapon -s
    You should get something like this:
    Code:
    Filename				Type		Size	Used	Priority
    /dev/sdb2                               partition	8393952	4716	-1

    2. Check your hardware
    Search the hardware incompatibility list stickied at the top of this forum, and the forums to see if anyone has had problems with similar hardware and drivers. The biggest culprit appears to be graphics drivers, so check for proprietary drivers and search for them, first. If you have a laptop, try searching the make and model of the computer you're using.
    People seem to frequently have success blacklisting graphics cards


    Those are the easy fixes. Unfortunately, suspend and hibernate problems seem to be incredibly complex and difficult to debug, so next we move on to data collection.

    3. Check logging information
    Ideally, you should do this right after rebooting from a failure, so the problems will be the last thing logged.
    Logs to check:
    Kernel log (kern.log):
    I believe you are looking for lines containing "PM:" to indicate sleep and wake calls
    The line "Back to C!" indicates the point at which the kernel resumes
    Debug log (debug):
    Contains mostly the same information as the kernel log, but you may find something helpful there

    Code to run:
    dmesg
    Like in the kernel log, you're looking for the block of text starting with PM, or containing forcedeth

    If your problem occurs while suspending:
    Test ACPI scripts
    Fire up your friendly neighborhood command prompt, and, depending on the function you're having problems with, run either pm-suspend, or pm-hibernate, and look for any errors scrolling by.

    Test GNOME power manager
    Still in the command prompt, try these commands to bypass the GNOME power manager, and send commands directly to the HAL

    Hibernate
    Code:
    dbus-send --system --print-reply --dest="org.freedesktop.Hal" /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Hibernate
    Suspend
    Code:
    dbus-send --system --print-reply --dest="org.freedesktop.Hal" /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Suspend int32:0
    If the problem occurs during resume:
    There is, unfortunately, less helpful information here, though it might be beneficial to run the same suspend/hibernate commands. Otherwise, check the logs.

    If it makes it all the way into standby/hibernate, restart the computer, and keep an eye on the disk indicator light to see if it blinks. If so, then it has loaded the image, so the problem is further on than that.

    At this point, if you haven't found a solution, you can try posting any logs that appear to have errors, and the output of the suspend/hibernate commands, if you saw errors there, on the forums, but you may end up needing to file a bug report. If you go that route, I suggest you read this, and this before filing a bug report, to make both your life and those of the developers easier.
    Last edited by Mantrasong; May 11th, 2009 at 02:08 PM.

  5. #5
    Join Date
    Jul 2006
    Location
    Deep South Texas
    Beans
    311
    Distro
    Ubuntu

    Re: Troubleshooting suspend and hibernate

    Quote Originally Posted by Mantrasong View Post
    ...a general troubleshooting guide.
    Many thanks for your help. Considering the many unanswered pleas for help I've seen and made on this subject, your efforts will be appreciated.

    However, (you had to know this was coming ), my problem begins before your help does. When I click on the shut down button, (either in the menu or the one I've added to the icon panel, [Ubuntu 8.10 i386 and Ubuntu 9.04 amd64 - both on a custom desktop ASUS K8N with AMD64]), I don't usually get offered the option of suspending or hibernating - just "Shut Down" or "Restart".

    Quote Originally Posted by Mantrasong View Post
    Admittedly, I have not read any of the these, but I am about to.

    Quote Originally Posted by Mantrasong View Post
    ...run either pm-suspend, or pm-hibernate,...
    I have run both of these from the command line and I am happy to say that the result is as it should be. However, I can't get the GUI to give me these choices.

    One final thing - when I do a normal shutdown, I can bring the system back to life by wiggling the mouse or tapping a key on the keyboard. However, when I am able to do a suspend or hibernate I can only restart by pressing the power button on the CPU box.

    I suspect that the foregoing is somehow related to my BIOS settings. I have an American Megatrends V02.54 BIOS. The ACPI Suspend Mode is set at 'S1' but 'S3' is also an option. I have ACPI 2.0 Support and ACPI APIC support enabled. PME Resume - Disabled; RI Resume - Disabled; RTC Resume - Disabled; Resume on PS/2 Mouse - Enabled; Resume on PS/2 Keyboard - Enabled; and Restore on AC Power Loss - Last State.

    Any further suggestions you have to offer will be greatly appreciated and thanks again for your efforts thus far.

  6. #6
    Join Date
    Nov 2005
    Beans
    23
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Troubleshooting suspend and hibernate

    Quote Originally Posted by TiredBird View Post
    However, (you had to know this was coming ), my problem begins before your help does. When I click on the shut down button, (either in the menu or the one I've added to the icon panel, [Ubuntu 8.10 i386 and Ubuntu 9.04 amd64 - both on a custom desktop ASUS K8N with AMD64]), I don't usually get offered the option of suspending or hibernating - just "Shut Down" or "Restart".
    Hopefully you've found this already, but if you haven't (and for others to come searching), this is the information you're looking for:
    Debugging GPM:Finding out why suspend or hibernate aren't offered
    GPM FAQ: Why does GNOME Power Manager not let me suspend or hibernate

    One final thing - when I do a normal shutdown, I can bring the system back to life by wiggling the mouse or tapping a key on the keyboard. However, when I am able to do a suspend or hibernate I can only restart by pressing the power button on the CPU box.
    Just to make sure I'm clear, do you have to restart when doing a suspend or hibernate, or does the system fail to shut down after successfully suspending and resuming? What happens when you try to use the menu buttons to shutdown?

    I'm reasonably certain that I saw this problem solved on the forums, but I can't seem to find the thread right now, but it might be worthwhile to look around to see if you can find it.

  7. #7
    Join Date
    Aug 2005
    Location
    Front Royal, VA
    Beans
    225
    Distro
    Ubuntu Karmic Koala (testing)

    Re: Troubleshooting suspend and hibernate

    One of the biggest suspend/reume bugs is having UXA enabled in /etc/X11/xorg.conf for Intel video chipsets.
    Trying Karmic Koala on an IBM Thinkpad T61
    Registered Linux User #397039

  8. #8
    Join Date
    Jul 2006
    Location
    Deep South Texas
    Beans
    311
    Distro
    Ubuntu

    Re: Troubleshooting suspend and hibernate

    Thanks for all of your help. Progress is definitely being made but still no cigar.
    Quote Originally Posted by Mantrasong View Post
    ...this is the information you're looking for...
    I performed the tests as specified in the two links. Following are the results:

    Code:
    xxx@amd64:~$ gconftool-2 -R /apps/gnome-power-manager | grep can
      can_suspend = true
      can_hibernate = true
    xxx@amd64:~$ dbus-send --session --print-reply --dest="org.freedesktop.PowerManagement" --type=method_call --reply-timeout=6000 /org/freedesktop/PowerManagement org.freedesktop.PowerManagement.CanSuspend
    method return sender=:1.44 -> dest=:1.48 reply_serial=2
       boolean true
    xxx@amd64:~$ gconftool-2 -g /apps/gnome-power-manager/general/can_suspend
    true
    xxx@amd64:~$ polkit-auth | grep power-management.suspend
    org.freedesktop.hal.power-management.suspend
    xxx@amd64:~$ hal-device | grep power_management.can_suspend
      power_management.can_suspend = true  (bool)
      power_management.can_suspend_hybrid = false  (bool)
    xxx@amd64:~$ pm-is-supported --suspend || echo "Not supported"
    xxx@amd64:~$
    My interpretation of the foregoing is that hibernate and suspend should be working, and they do from the command line, but they don't appear in the gui menus, at least not usually. (They are there sometimes but I can't figure out what thats related to.)

    Quote Originally Posted by Mantrasong View Post
    Just to make sure I'm clear, do you have to restart when doing a suspend or hibernate, or does the system fail to shut down after successfully suspending and resuming? What happens when you try to use the menu buttons to shutdown?
    This problem was solved by information I found in another thread. Apparently, when I had done a full shutdown, the BIOS settings were starting it back up from mouse or keyboard activity. However, when I did a suspend or hibernate the BIOS still believed the system to be on and did not reactivate it. In order to get it to work I had to change the values in /proc/apci/wakeup which I did with:
    Code:
    echo PS2K > /proc/apci/wakeup
    I based that on information contained in another thread. (I'm trying to find it so you can have the info. I'll let you know as soon as I find it.)

    However, further to your last question - my desktop, although still new, has been seriously tweaked. It doesn't look anything like the original install. I am using the 'Main Menu' applet to provide my menu and using the 'Shut Down' applet as my usual means of shutting down. The 'Shut Down' applet and the shutdown item on the 'Main Menu' applet both invoke the same module but I have yet to figure out what that is.

  9. #9
    Join Date
    Jul 2006
    Location
    Deep South Texas
    Beans
    311
    Distro
    Ubuntu

    Re: Troubleshooting suspend and hibernate

    Here's the thread that provided the help for wake by mouse or keyboard.

    http://ubuntuforums.org/showthread.php?t=814939

  10. #10
    Join Date
    Jul 2006
    Location
    Deep South Texas
    Beans
    311
    Distro
    Ubuntu

    Re: Troubleshooting suspend and hibernate

    Quote Originally Posted by mariner09 View Post
    One of the biggest suspend/reume bugs is having UXA enabled in /etc/X11/xorg.conf for Intel video chipsets.
    I've checked the referenced file and it is empty.

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •