March 10, 2008 · General · Email This Post
Share

If you're new here, you may want to subscribe to my RSS feed and if you have questions related to your ubuntu system post question to our forums. Thanks for visiting!

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

  • Share/Bookmark

Related Articles

9 Comments to “Fix for suspend and hibernation problem for Laptops”

  1. Femacamper says:

    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?

  2. Mike Lopez says:

    instead of using uswsusp, i used the acpi scripts /etc/acpi/sleep.sh and /etc/acpi/hibernate.sh. works for me. :)

  3. Rangga says:

    Oh. Dear Lord, why the command so long. Is it possible that ubuntu will fix this bug via update?

  4. Subhrajit says:

    In my case, the location of s2ram and s2disk was in /usr/sbin, instead of /sbin.

  5. Ole says:

    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.

  6. dennis j says:

    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”

  7. Jorge Gustavo says:

    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.

  8. Gus says:

    If I disable display effects then suspend works normally!!

    3-4 y/o Dell inspiron 6000 laptop 2g ram

  9. Jaime says:

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

Leave a Reply