download and install uswsusp
Code:
sudo apt-get install uswsusp
Code:
sudo s2disk sudo s2ram --force
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
#!/bin/bash /usr/sbin/s2disk
And the code in
sudo gedit /usr/lib/hal/scripts/linux/hal-system-power-suspend-linux
#!/bin/bash /usr/sbin/s2ram --force
To fix the restart problem:
sudo apt-get install kexec-tools
Now
sudo gedit /etc/default/kexec
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 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