Pages

Tuesday, July 27, 2010

Hiberrnate, resume and restart issues in Ubuntu 10.04 : dell inspiron 1545

For those of you who are having problems with suspend and resume with your laptops using Ubuntu 10.04 here is a quick fix:

download and install uswsusp
Code:
sudo apt-get install uswsusp
Now you can try suspend and hibernate by giving the following commands
Code:
sudo s2disk
sudo s2ram --force
These will hopefully work. If they do not, you need to back up the following two files
Code:
sudo cp /usr/lib/hal/scripts/linux/hal-system-power-hibernate-linux /usr/lib/hal/scripts/linux/hal-system-power-hibernate-linux.bak
sudo cp /usr/lib/hal/scripts/linux/hal-system-power-suspend-linux /usr/lib/hal/scripts/linux/hal-system-power-suspend-linux.bak

Now replace the code in the following file
Code:
sudo gedit /usr/lib/hal/scripts/linux/hal-system-power-hibernate-linux
with:
#!/bin/bash
/usr/sbin/s2disk
And the code in
sudo gedit /usr/lib/hal/scripts/linux/hal-system-power-suspend-linux
with:
#!/bin/bash
/usr/sbin/s2ram --force

To fix the restart problem:
sudo apt-get install kexec-tools

Now
sudo gedit /etc/default/kexec
and make sure that load kexec is set to true.


Now restart your PC and enjoy :)

After following the above steps you will find that you can hibernate the PC when you click the hibernate button, but it will not hibernate once the battery runs low. For this you need to do a little bit of tweaking to make things right, first launch the global configuration editor
gconf-editor
Now navigate to apps/gnome-power-manager/general and uncheck use_time_for_policy.




Now you may wish to manually adjust the critical battery levels. For me the defaults were a bit too low :) To do so navigate to apps/gnome-power-manager/thresholds and adjust the percentages to your liking. I have set the percentage_action to 7, percentage_critical 10 and percentage_low at 20. Now when you have tweaked to your hearts content, click on close. Enjoy :) Happy hibernating!

No comments:

Post a Comment