Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old June 12th, 2007   #1
Bluecircle
Gee! These Aren't Roasted!
 
Bluecircle's Avatar
 
Join Date: May 2007
Location: PA, USA
Beans: 113
Gutsy Gibbon Testing
Send a message via AIM to Bluecircle
Lightbulb [HowTo]: Fix suspend and hibernate on laptops

If the normal suspend and hibernate buttons don't work, you can try this little hack.

First get uswsusp:

Code:
sudo apt-get install uswsusp
Now, test out suspend to see if it works:

Code:
sudo s2ram
If this does not work, you can use

Code:
sudo s2ram --force
Next, try out hibernate:

Code:
sudo s2disk
Now, if one or both of these commands work and you would like to use them, we need to change the command on the shutdown menu to this.

Note: This part is for FEISTY AND GUTSY ONLY!!! The scripts in Edgy are stored in "/usr/share/hal/scripts" and have different names AFAIK. If someone running Edgy could tell me what the files names are I will add it here.

First, backup your original files:

Code:
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
Now, edit these two files and replace all the code with this:

hal-system-power-suspend-linux

Code:
sudo gedit /usr/lib/hal/scripts/linux/hal-system-power-suspend-linux
Code:
#!/bin/sh

/sbin/s2ram --force
hal-system-power-hibernate-linux

Code:
sudo gedit /usr/lib/hal/scripts/linux/hal-system-power-hibernate-linux
Code:
#!/bin/sh

/sbin/s2disk
if this breaks stuff, just restore the backup files you made.

Good luck!
__________________
Fix your Suspend/Hibernate functions | Learning the shell | Writing shell scripts

qualitytrafficsupply.com website traffic | Running Ubuntu since 05/02/07

Last edited by Bluecircle; June 24th, 2007 at 05:03 PM..
Bluecircle is offline   Reply With Quote
Old June 13th, 2007   #2
ukripper
Iced Blended Vanilla Crème Ubuntu
 
ukripper's Avatar
 
Join Date: Jan 2007
Location: London, UK
Beans: 2,922
Re: [HowTo]: Fix suspend and hibernate on laptops

I know few people having this problem in feisty I will ask them to try this.

On my laptops there are no problems either on Edgy or Feisty.

Good work though.
__________________
Unix is the best screwdriver ever built and Linux is the best engine ever built
ukripper is offline   Reply With Quote
Old June 15th, 2007   #3
Unnicknamed
5 Cups of Ubuntu
 
Join Date: Dec 2006
My beans are hidden!
Re: [HowTo]: Fix suspend and hibernate on laptops

Excellent!

This works on my HP Pavilion DV5215us, with xgl and beryl enabled on Feisty

But, after I hibernate or suspend, my Hibernate and Suspend buttons from the Log off menu are gone!

UPDATE: Sound didn't work, I have to reboot to get it back.

Last edited by Unnicknamed; June 15th, 2007 at 07:50 PM..
Unnicknamed is offline   Reply With Quote
Old June 19th, 2007   #4
slartoff
First Cup of Ubuntu
 
Join Date: Jun 2007
Beans: 2
Re: [HowTo]: Fix suspend and hibernate on laptops

Thanks, Bluecircle. The kernalspace (?) suspend/resume stuff (what comes by default) never worked properly on my Toshiba A105. I spent some time long ago trying to figure it out, and eventually because satisfied with only hibernate.

A couple weeks ago, after some update undoubtedly, fan control started to be flaky on resume---the laptop would sometimes get VERY hot! But following your guide, now suspend and hibernate both seem to work fine.

The only strange thing I get is that upon resume, Gnome Power Manager reports that there was a problem suspending. So I have to click a checkbox to make that disappear.
slartoff is offline   Reply With Quote
Old June 19th, 2007   #5
vanadium
May the Ubuntu Be With You!
 
Join Date: Apr 2007
Beans: 1,663
Ubuntu 8.04 Hardy Heron
Re: [HowTo]: Fix suspend and hibernate on laptops

See also this thread

http://ubuntuforums.org/showthread.php?t=417964&page=2

Probably, the permanent installation of the alternative hibernate routine is safer the way described in the link. I have applied it with success (Dell Latitude D810) under Feisty
__________________
Ubuntu Hardy Heron on a Dell Latitude 800
1 GB RAM, ATI Radeon video, Sigmatel Audio
vanadium is offline   Reply With Quote
Old June 20th, 2007   #6
grahams
Way Too Much Ubuntu
 
Join Date: Jun 2006
Location: California
Beans: 230
Ubuntu 9.04 Jaunty Jackalope
Re: [HowTo]: Fix suspend and hibernate on laptops

Many thanks Bluecircle, I will give a try and report back.
grahams is offline   Reply With Quote
Old June 20th, 2007   #7
kushelmex
Spilled the Beans
 
Join Date: May 2007
Beans: 13
Ubuntu 7.10 Gutsy Gibbon
Send a message via ICQ to kushelmex Send a message via MSN to kushelmex
Re: [HowTo]: Fix suspend and hibernate on laptops

tnx!! works fine here
__________________
_________________________
http://www.kushelmex.com
kushelmex is offline   Reply With Quote
Old June 21st, 2007   #8
Teamgeist
Gee! These Aren't Roasted!
 
Teamgeist's Avatar
 
Join Date: Aug 2006
Location: Braunschweig, Germany
Beans: 173
Ubuntu Jaunty Jackalope (testing)
Re: [HowTo]: Fix suspend and hibernate on laptops

Seems to work fine here too. I have an Asus M2400N Centrino Laptop. It's like 4 years old now.
I will have to play around with it a little more, but the test run I just did went fine.
Thank you very much!
Teamgeist is offline   Reply With Quote
Old June 21st, 2007   #9
grahams
Way Too Much Ubuntu
 
Join Date: Jun 2006
Location: California
Beans: 230
Ubuntu 9.04 Jaunty Jackalope
Re: [HowTo]: Fix suspend and hibernate on laptops

Thanks for the post.

I tried s2disk and found it resumes much faster (50 secs v 84 secs), than the default hibernate on my Compaq n610c. So far s2ram does work on this system as i can not resume. I think the ATI graphics controller is not recovering correctly and I will try this again when the later uswsusp0.6 gets release as this adds more options such as -v (save the PCI config space for the VGA card).

If anyone has a Compaq n610c and has s2ram working, please let me know what settings you are using and also report the s2ram -i output to the developers, thanks.

I will try s2disk and s2ram on my work HP nw8440 laptop soon.
grahams is offline   Reply With Quote
Old June 22nd, 2007   #10
teasum
A Carafe of Ubuntu
 
teasum's Avatar
 
Join Date: Feb 2006
Location: Madison, WI
My beans are hidden!
Ubuntu 9.04 Jaunty Jackalope
Send a message via Yahoo to teasum
Re: [HowTo]: Fix suspend and hibernate on laptops

No luck on my Dell inspiron 8600--suspend and hibernate both worked for me in Dapper, but not in Feisty. I've tried several solutions listed here in the forums, but no dice. Everything seems to go down nicely, even with the commands listed in this thread, but when I power up, I get nothing after grub. Does anybody know why the solution listed in this thread works? I'd really like to track down this problem and get it working. Otherwise, I'll have to try and install Dapper again or Edgy. Thanks. Here's my sudo s2ram -i output, if it means anything...

Quote:
This machine can be identified by:
sys_vendor = "Dell Computer Corporation"
sys_product = "Inspiron 8600 "
sys_version = ""
bios_version = "A14"

Last edited by teasum; June 22nd, 2007 at 05:49 PM..
teasum is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:57 PM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry