Getting Suspend/Hibernate working in Ubuntu 8.04

For some reason, I could not get Suspend or Hibernate to work out of the box on my Ubunto 8.04 installation on my old Sony Vaio laptop. A quick search of google reveals that this is a common problem, and the most common solution is to use a 3rd party application called uswsusp to do it. It’s pretty easy to get this going, here is what you need to do,

First, install 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

If that all works, you can now replace the ubuntu default commands with the new uswsusp commands

First step is to back up the standard ubuntu commands

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

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

Now, edit the suspend command file “hal-system-power-suspend” using vi or gedit, and replace the contents with

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

Now, edit the hibernate command file “hal-system-power-hibernate” and replace the contents with

#!/bin/sh
/sbin/s2disk

And that’s it, hibernate and suspend should be working as they should!

Tags:

6 Responses to “Getting Suspend/Hibernate working in Ubuntu 8.04”

  1. Jon Rutherford says:

    Thanks for this very useful tip! My new (well, refurbished, but anyway…) Everex StepNote gBook had the same problem as you had with your laptop, and I followed your instructions and now suspend and hibernate work properly. The only difference from your procedure is that when I installed uswsusp I got “s2both” instead of “s2ram” in /sbin. I just used “/sbin/s2both” for the hibernate function, and it works fine (so far). I think it’s possible that the installer discovers how much RAM the machine has (only 512MB till I upgrade), and inserts a “both” alternative owing to the small amount of memory. Just a guess.

  2. Francisco says:

    What if the s2ram and s2disk commands are not found?

    I’m having troubles with that, i couldn’t find any explanation in spanish (my mother language) and i’m having troubles in english too.

    Please try to answer to my mail.

    Thanks in advanced.

  3. jrobbo says:

    Hi Francisco, after you have installed uswsusp, you should find the s2ram and s2disk commands in /sbin. I hope that this helps. Cheers, John

  4. I have been looking looking around for this kind of information. Will you post some more in future? I’ll be grateful if you will.

  5. kempozone says:

    Im sure many of you are like me and one of the first things you do in the morning is head here and check out the new post. Along with seeing the new posts, I’m also always checking out the blog roll rss feed and watching them grow, or shrink sometimes. In one of my past …but all in all excellent site. Keep it up!

  6. Donnieboy says:

    Just wanted to drop you a line to say, I enjoy reading your site. I thought about starting a blog myself but don’t have the time.
    Oh well maybe one day…. :)

Leave a Reply