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 get a crash on rebooting from hibernate after doing this…I have to reboot again with previous successful boot, and then it works.

    Is there any way to skip the crash?

    [Reply]

  2. On my Dell Latitude X300, I’ve found that it’s closing the lid that causes problems, not suspend. If I press the alt-esc, the computer suspends and comes back alive fine. But if I close the lid, which I’ve also set to suspend, it crashes. I tried setting the “close lid” to blank screen and also tried hibernate, and the computer crashed in both instances.

    [Reply]

  3. With Ubuntu 9.10, I have to change the /etc/pm/config.d/00sleep_module file to make power manager use uswsusp.

    # The sleep/wake system to use. Valid values are:
    # kernel The built-in kernel suspend/resume support.
    # Use this if nothing else is supported on your system.
    # uswsusp If your system has support for the userspace
    # suspend programs (s2ram/s2disk/s2both), then use this.
    # tuxonice If your system has support for tuxonice, use this.
    #
    # The system defaults to “kernel” if this is commented out.
    SLEEP_MODULE=”uswsusp”

    [Reply]

  4. Since 9.10, I was unable to use uswsusp, simple because my computer no longer boots if ‘resume’ is present in kernel options. Either it takes too long or it doesn’t boot al all. But I glad the dennis j is able to use uswsusp in Ubuntu 9.10.

    [Reply]

  5. I have the same problem with the lid of the Dell Latitude X300. The computer hangs when you close the lid. Help anyone? Thanks!

    [Reply]

  6. I tried this and still on suspend screen goes dark for a few seconds then comes back fully on. Hibernate works normally though. When I had this laptop with XP standby and hibernate worked normally. Hopefully the suspend problem will be fixed soon as we all need to save energy.

    [Reply]

  7. thank you very much. This did work for me. The suspend option had to be invoked as sudo s2ram -f
    Both suspend and hibernate are better than the default ones :)

    Btw if anybody knows how to integrate a splash to the hibernate please let me know.
    thnaks again.

    [Reply]

  8. I have started using Ubuntu 10.04 and I have the same problem. My Toshiba Laptop/Tablet PC, always freezes when put in suspend or hibernate mode.

    After sudo apt-get install uswsusp when I enter sudo s2ram I get following message:

    Machine is unknown.
    This machine can be identified by:
    sys_vendor = “TOSHIBA”
    sys_product = “Satellite R20″
    sys_version = “PSR20U-00T009″
    bios_version = “Version 1.30″
    See http://suspend.sf.net/s2ram-support.html for details.
    How do I find out whether suspend function works?

    [Reply]

  9. My machine (Clevo TN70M) isn’t identified too – just try “sudo s2ram -f” instead. That works for me.

    [Reply]

  10. Thanks.

    With –force options works great with my Samsung N150 and Ubuntu 10.04 (standard suspend/hibernate does not work due to bug).

    [Reply]

  11. I’m using the new Ubuntu 10.04 and the same problem with a Lenovo G530. But after installed the uswsusp, now all is working with the commands sudo s2ram -f and sudo s2disk. Thanks for the author!

    [Reply]

  12. one question, have a way to the user password be requested when the image is restored from hibernation?

    [Reply]

  13. It did the Job for my Dell Studio 15 (bought 2010)!

    I needed to reinstall the properitary ati driver, but I’m not sure if that’s an related error

    [Reply]

  14. I have the same problem running Ubuntu 10.04 64 bit on a Dell Latitude e6510.

    However!

    Running 32 bit Ubuntu 10.04 on a Lenovo R61i works perfectly, even with Virtualbox installed and with a virtual host running…. strange…

    [Reply]

  15. Thanks a lot, works perfectly! I used sudo s2ram -f to get it working with my laptop.

    For those who are a bit confused with the last step, to edit the sleep script:

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

    Then replace all the text with just this:

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

    Then to edit the hibernate script:

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

    Then replace all the text with this:

    #!/bin/sh
    /sbin/s2disk

    [Reply]

  16. I was able to install the package successfully.
    After I ran “sudo s2ram” laptop went to sleep.

    Unable to wake it from sleep (even by pushing the power button once). Screen stays blank.

    Now the WORST part.

    When I tried to reboot my computer it asked me for a password (the bios)!!!!???? WTF???? I have never put a password in there!

    Any idea what I could do now? My laptop is useless!!!!

    Toshiba A100 laptop (model #PSAAKC-VA104C).

    PLEASE HELP!!!

    [Reply]

  17. Little update on my situation.

    It turns out that the fact the BIOS got a password automatically set is a BUG with the version that I had. Toshiba serviced the computer, that part is fixed now. This was a coincidence then.

    So I got back the computer and I try the “sudo s2ram” command again… Still no luck for me on this side :(
    – I have to push the power button to wake from sleep, but still the screen stays blank and nothing happen.
    – I have to hold the power button in order to shutdown the computer.
    – When I boot it again… It won’t boot! It stays at the Toshiba main screen and the Booting sequence stall. I have to remove the RAM and put it back it in order to have the machine to boot.
    – I have tested the memory with memtest and all test passed.

    I guess I will not put the computer to sleep until another solution arise.

    Claude

    [Reply]

  18. Have the same issue. Msi 670 M laptop when I install uswsusp I can put the laptop nto slep, but can not awake it. Had to restart.

    [Reply]

  19. Hi, thanks for the help, however, I got a bit lost. Seems like more people have a similar problem.

    I installed uswsusp, then ran the commands – sudo s2ram -n gave me a description of the machine, while the other two options (s2ram and s2ram -f) made the system go to sleep. Then it wouldn’t wake up and I had to reboot.

    Any idea?

    (Acer TM 2450, running lucid)

    [Reply]

  20. touch /etc/acpi/lidsuspend-acustom.sh
    nano /etc/acpi/lidsuspend-acustom.sh

    insert

    #!/bin/sh
    /usr/sbin/s2ram

    nano /etc/acpi/events/lidbtn

    #——————————————–
    # /etc/acpi/events/lidbtn
    # Called when the user closes or opens the lid

    event=button[ /]lid
    #action=/etc/acpi/lid.sh # —————->>>> comment out
    action=/etc/acpi/lidsuspend-acustom.sh # –>>insert this
    Save and reboot or restart acpi

    [Reply]

Leave a comment

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