Skip to content

Instantly share code, notes, and snippets.

@gccpacman
Last active October 9, 2015 08:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gccpacman/296ab51b5249873b009a to your computer and use it in GitHub Desktop.
Save gccpacman/296ab51b5249873b009a to your computer and use it in GitHub Desktop.
linux mint/ Ubuntu/ Debian

Enable the Hibernate option

To enable Hibernate, I followed this answer from Dima. After enabling hibernate you will have an option to hibernate in the indicator session menu at top panel. But, though you can hibernate you may not resume from hibernate. You will just be given a new session. The fixes are below. The fixes to be able to resume from hibernate There is two way to fix this.

  1. Editing the /etc/initramfs-tools/conf.d/resume file First get the UUID of the swap partition.

sudo blkid | grep swap

This will output a line similar to this:

    /dev/sda12: UUID="a14f3380-810e-49a7-b42e-72169e66c432" TYPE="swap"

The actually line will not match with this. Copy the value of UUID in between "..." double quote. Open the resume file

    gksudo gedit /etc/initramfs-tools/conf.d/resume

And in that file, add a line like this RESUME=UUID=a14f3380-810e-49a7-b42e-72169e66c432 Don't forget to replace the actual UUID value you get from step 1. Save the file and exit gedit Then in terminal, execute this command

    sudo update-initramfs -u

You will now be able to resume from hibernation

  1. Editing the /etc/default/grub file. Open a terminal and execute the below command to open it gksudo gedit /etc/default/grub There will be a line like GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" . Edit the line to insert RESUME=UUID= after the word splash. For example in my case, the line looks like this after editing
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=a14f3380-810e-49a7-b42e-72169e66c432" 

Make sure, you used your UUID value you get from sudo blkid | grep swap command. Then do this command

    sudo update-grub

This also enable you to successfully get resumed from hibernate.

Check UUID

    sudo blkid

Then

    sudo gedit /etc/default/grub & to pull up the boot loader configuration

Look for the line GRUB_CMDLINE_LINUX="" and make sure it looks like this (using your UUID of course) GRUB_CMDLINE_LINUX="resume=UUID=41e86209-3802-424b-9a9d-d7683142dab7" and save the file

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=41e86209-3802-424b-9a9d-d7683142dab7"

sudo update-grub and wait for it to finish

gksu gedit /etc/initramfs-tools/conf.d/resume & and make sure its contents are resume=UUID=41e86209-3802-424b-9a9d-d7683142dab7 (with your UUID of course in place of mine). Save the file! sudo update-initramfs -u

Reboot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment