March 10, 2008 · General ·

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

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

  1. Saurabh says:

    Sean and Niloc, I am running Ubuntu 11.04 on my Toshiba Satellite and I couldn’t get hibernate working with the tweek that Ivan has mentioned. First of all I couldn’t find any files in the dir. he mentions and even if I create the mentioned file nothing changes.

  2. kossivi alex N. says:

    (Please for hibernation problem
    make share your swap is mounted correctly
    so do this as root:)

    sudo nano /etc/fstab

    (you will need to enter root password)
    (if the /etc/fstab is openned go to the line where you can read ” # swap was on /dev/…..”
    immediatly after this line,I mean the next line ,be sure there is no ”#”.If there is on ”#” starting this following line ,just erease it.like this your swap space will be active for hibernation. after press ”ctrl+0” to save the changes. ”ctrl+x” to exit)

    sudo apt-get install uswsusp

    and restart your computer.

    Ciao

    kan

  3. Itun says:

    if the /etc/fstab is openned go to the line where you can read ” # swap was on /dev/…..”
    immediatly after this line,I mean the next line ,be sure there is no ”#”.If there is on ”#” starting this following line
    I don not have # in the next line. And I still cannot find /usr/lib/hal/scripts/linux/hal-system-power-hibernate-linux and the same second either.
    Also command s2disk has a same trouble as a previous.

  4. pst007x says:

    Hi, could you be a little clearer with you instruction. When I try to save changes I get asked to save in either DOS FORMAT, MAC Format, PREFIX, BACKUP FILE or CANCEL.

    So unable to save changes.

    Remember a lot of people without much terminal experience need more help than those who are experienced, idiots guide please? 😀

    Thanks

  5. dj says:

    the system is hangs after s2disk is given..can u pls help

  6. hako says:

    I am running ubuntu 12.04 installed with wubi.

    sudo apt-get install uswsusp

    update-initramfs: Generating /boot/initrd.img-3.2.0-25-generic-pae
    Warning: No support for locale: en_US.utf8

    sudo s2ram
    KMS graphics driver is in use, skipping quirks.
    –> system goes into suspend, wake-up ok

    sudo s2disk
    screen goes blank, error message about a file not found (swap??), after a few seconds system returns to normal running

    /etc/fstab
    # UNCONFIGURED FSTAB FOR BASE SYSTEM
    /host/ubuntu/disks/swap.disk none swap sw 0 0
    #
    # windows disk
    UUID=…

    Any ideas?

  7. hako says:

    At sudo s2disk:
    The message says “looking for splash system…none”.
    Then,another message shows up shortly, and the system returns to normal.

    syslog
    “…Freezing of tasks failed after 20.00 seconds (3 tasks refusing to freeze, wq_busy=0):…”
    NetworkManager, Sunbird-bin, Firefox are mentioned with trace backs.

    The same thing sometimes happens at sudo s2ram, but that can be tried again, and then usually works.

    How to do?

  8. This still worked for me with Ubuntu 12.04 but without extra instructions, just installing uswusp.

    I made a short tutorial for this and other issues with Dell XPS 13 Developer Edition

    You can find it here: http://www.librethinking.com/2013/09/tips-and-solutions-for-dell-xps-13.html

  9. Rima says:

    THANK YOU IT WORKED…………

    I have an asus x101ch netbook and the solution above worked very well. after installing “uswsusp” ,I prefer to type: “sudo s2ram” and “sudo s2disk” in the terminal for suspending and hibernating because it is easy and safer than replacing older commands.

    I`ve got another 5 years old ASUS laptop which is runnig both windows and linux and it is working greatly after 5 years of my heavy duty uses.
    GENERALLY asus products are awesome.

  10. rixxi says:

    I had the same issue on my Toshiba satellite L755. The new Nvidia driver v331.38 solved the problem. Now hibernation, sleep and fn keys for brightness work fine.

  11. John Key says:

    The easiest solution that I found for fixing the audio after resume (suspend/hibernate) is this:

    https://pcfix3r.wordpress.com/sin-sonido-tras-hibernar-o-supsender-no-sound-after-resume-in-linux-mint-ubuntu-lubuntu/

    And the fix for a related problem when screensaver begins to work is this:

    https://pcfix3r.wordpress.com/el-sonido-se-va-cada-10-minutos-en-linux-mint-sound-goes-off-after-10-minutes/

  12. s2m says:

    Thanks
    Worked for me in LENOVO Laptop

Leave a Reply

  • Recent comments