Home > ubuntu > Hibernate your Ubuntu

Hibernate your Ubuntu

Hibernating didn’t work on my laptop. Ubuntu said there was not enough swap space. Well, it was true, I only made a 1 GB swap partition while my laptop had 3 GB RAM.

I had an ext3 partition which was not completely full, there was 4 GB free space on it. First I made a backup of this partition to an external HDD. Then I resized this partition with gparted, cutting off 3.3 GB at the end of the partition. My laptop has 3 GB RAM so I made a swap partition that is a bit larger (just to be sure).

After that, following this SwapFaq guide, I could tell Ubuntu to use this new swap partition for hibernating.

Note that hibernating doesn’t work with swap files. You need a swap partition for that.

“The swappiness parameter controls the tendency of the kernel to move processes out of physical memory and onto the swap disk. swappiness=0 tells the kernel to avoid swapping processes out of physical memory for as long as possible. swappiness=100 tells the kernel to aggressively swap processes out of physical memory and move them to swap cache. The default setting in Ubuntu is swappiness=60.” (source)

Current swappinness value:

cat /proc/sys/vm/swappiness

How to change the swappinness value:

sudo vi /etc/sysctl.conf

Then change this line (or add it to the end of the file if it doesn’t exist):


Save file and reboot.

Hibernate from command-line

sudo pm-hibernate

I added a launcher to my Desktop with the command “gksudo pm-hibernate“.

Categories: ubuntu Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: