March 10, 2008 · General · Email This Post
Share
{lang: 'en-GB'}

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

Related posts

63 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.

    [Reply]

  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

    [Reply]

    Itun Reply:

    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.

    [Reply]

Leave a Reply