Fix for suspend and hibernation problem for Laptops

Sponsored Link
You might have noticed that the suspend and hibernation function in ubuntu/kubuntu won’t work. While there’s no official fix, you might find this work around helpful.

Most people need hibernation for their laptops.step is to install a tool called «uswsusp»

sudo apt-get install uswsusp

And by typing the below command you check if the suspend function works now….

sudo s2ram

Same goes for hibernation

sudo s2disk

Now once this is done, and all of the above commands work, they can be replaced with the old non-working commands that come with ubuntu.

But attention, before editing the system files, always make sure you back up the files in case something goes completely wrong.

sudo cp /usr/lib/hal/scripts/linux/hal-system-power-suspend-linux /usr/lib/hal/scripts/linux/hal-system-power-suspend-linux.bak

sudo cp /usr/lib/hal/scripts/linux/hal-system-power-hibernate-linux /usr/lib/hal/scripts/linux/hal-system-power-hibernate-linux.bak

This step is to replace the old commands with the new commands in

hal-system-power-suspend-linux

sudo nano /usr/lib/hal/scripts/linux/hal-system-power-suspend-linux

paste the following:

#!/bin/sh
/sbin/s2ram –force

hal-system-power-hibernate-linux

sudo nano /usr/lib/hal/scripts/linux/hal-system-power-hibernate-linux

paste the following again:

#!/bin/sh
/sbin/s2disk

Sponsored Link

Incoming search terms:

Related posts

70 thoughts on “Fix for suspend and hibernation problem for Laptops

  1. I have tried busymind tips, but still no success.

    When sleep mode kicks in screen goes blank and the only way to return to Ubuntu is to hold the power button to turn off the computer and power it ON again. Sleep is really broken on this laptop.

    How can I tell which sleep mechanism is used between PM or ACPI?

    Thanks

    Claude

    [Reply]

  2. Suspend doesn’t work with me. However, hibernation is working but I have to force the system to reboot by continuously pressing on power button!

    Ubuntu 10.04

    Asus K52Jc
    Intel i5 Core (2.27 GHz)
    nVidia Geforce M310 CUDA (1GiB)
    Memory (4GiB)

    It’s not the only problem I have in this laptop. So, my advice to you is …
    DO NOT BUY ASUS PRODUCTS !

    [Reply]

  3. sorry to hear that my solution is not working on other laptops, thats why I shown lspci output. Configuring “when laptop lid is closed” to blank screen is important thing. I still running this laptop is stand-by mode described in my little workaround.
    Hibernate is not working for me because I not invested time to resolve it.

    [Reply]

  4. Thank you very much.

    I got my hibernate to work right a way however I had to use s2ram –pci_save –force to get the suspend to work on my Noka 3g Booklet.

    //Peter

    [Reply]

  5. How do I undo these changes? Can someone give me the commands?? This messed things up WORSE for me.

    Thanks, Cole B

    [Reply]

  6. Won’t help now but for future download latest Ubuntu tweak as the new build has backup for applic, desktop, and system, very nice.Under desktop recovery

    [Reply]

  7. If your are running Ubuntu 10.04, then
    Open terminal: Application > Accessories > Terminal

    sudo gedit /etc/pm/config.d/00sleep_module

    Add a line at the end of file
    ‘SUSPEND_MODULES=”xhci”

    Save and try to suspend.

    If running Ubuntu 10.10, then release notes say:

    When the XHCI module is loaded for USB 3.0 operation the system cannot suspend. Manually unloading XHCI will allow suspend to complete normally. To avoid future suspend problems, the workaround is to add SUSPEND_MODULES=”xhci-hcd” to /etc/pm/config.d/unload_module then the system can suspend normally. (522998)

    Note difference in driver names xhci vs xhci-hcd. This is because the module has been renamed “xhci_hcd” in the latest mainline kernel (2.6.34-rc6).

    [Reply]

  8. hay gyz, i had exactly the same problem on my Destop, i use ubuntu-lucid, it won’t hybernate at all,…after some days, i open up my G-parted,and see their that my swap was not mounted, i restarted and then i realize that my swap is not mounting at boot time….

    after that , i checked out my FSTAB, and found no line for Swap, then i add line to FSTAB ,SO that it can mount my swap-drive at Boot-time,

    now my PC is Able to hybernate :) ,i am not sure that this case will happen to all of you, but have a look at you swap-drive on start-up,whether it is mounting on boot or not…

    [Reply]

  9. I want to try the solution from Ivan, but I can’t find that file…so the command:

    sudo gedit /etc/pm/config.d/00sleep_module

    opens gedit with an empty text file. I’m using ubuntu 10.04 and I just don’t get this. :( ??? :( ???

    Will we ever fix this?? I’m using ubuntu for almost 3 years now…

    [Reply]

  10. Solution posted by Ivan works perfect.
    Thanks!

    I’m running Ubuntu 10.04 on ASUS 1018P netbook. The problem with suspend/hibernate had come from USB 3.0 interface (xhci).

    jl2035, follow the instruction, empty file is ok.

    [Reply]

  11. Whoa! I can’t belive! It works!
    This Ivan guy is a savior! I have to make an article about this! I can’t belive it’s so simple, because I really spend a lot of energy on this…

    [Reply]

  12. I’m running Ubuntu 11.04 on my Toshiba satellite laptop and after frustration with the suspend/hibernate, Ivan’s solution worked perfectly. A quick and easy fix. Many thanks

    [Reply]

  13. Thanks Ivan after trying everything, finally your procedure worked. Lenovo Y530 on Linux Mint 11.

    Thanks once again!!!

    [Reply]

  14. Well, the solution of busymind, works in part for me, cause I didnt had problems going to suspend/hibernate, but coming from hibernate, time in which the pc simply shuts off by itself, now I can see the s2disk process reaching its “100% completed” so Im confident this is it, however Im not sure if I did succed editing the default commands in the system replacing with the new ones, but I guess the time will say it. Thanks a lot

    [Reply]

  15. I changed the distribution for Debian 6 and this solution no more working.
    sudo apt-get install uswsusp – package not supported anymore for for Debian 6.

    After first suspend witch is working OK I will have just black screen without any access to the system, need power button to shut down.

    [Reply]

  16. I have the same resume / suspend issue on my Lenovo Ideapad s10e; I love ubuntu and its philosophy BUT this kind of things are which dont allow me to walk away from windows for good and that’s why must of US have dual boot, because of this unfixed bugs. Cheers!

    [Reply]

  17. I am running Ubuntu 11.04 Natty on a Dell laptop. I was unable to suspend and resume, the resume would wake the computer, but the computer did not respond. My solution was to remove the following packages:
    acpi-support
    acpid

    Now suspend and resume work everytime, including just closing the lid and re-opening. :) Hope it helps.

    [Reply]

  18. I had this problem on Asus U36J and Debian and Ivan’s solution fixed it. Now I switched to Ubuntu and it doesn’t work. The problem is certainly in USB3 drivers so I’m not sure why this doesn’t work…

    Does anyone else have suggestions?

    [Reply]

  19. When I type sudo s2ram I get this message:
    Machine is unknown.
    This machine can be identified by:
    sys_vendor = “Hewlett-Packard”
    sys_product = “HP Compaq 6530b (GW688AV)”
    sys_version = “F.13″
    bios_version = “68PDD Ver. F.13″
    See http://suspend.sf.net/s2ram-support.html for details.

    If you report a problem, please include the complete output above.

    And nothing happens.

    When I type sudo s2disk it works perfectly, is it possible my RAM can be broken in some kind of way?

    [Reply]

  20. Ivan’s reply worked great with my 11.04 on my ASUS G72Sw. Thank you so much, that was a lifesaver. I was having issues with both suspend and hibernate where the OS would seem to crash and nothing would load on my screens, forcing a manual shutdown via power key.

    [Reply]

Leave a comment

Your email address will not be published. Required fields are marked *