I want my 16.04 to be able to hibernate to disk, it does not give that option now. I have a HP Pavillion x360 with 4 GB RAM. What should I do? Do you think it will help to shrink the Windows partition (sda3) by one GB and make swap size all together 5 GB? Or should I do something else? (Maybe 3.91 GiB is enough already?)

If I expand swap, will I then have to make any adjustments in the system. Or will Ubuntu automatically realize the swap has been enlarged?

Since I will be shrinking Windows 10 I thought I might use Windows 10 partitioning tools, also for enlarging swap. I don't have a bootable GParted USB at hand. Does that make a difference? (The system is dual boot.)

(I am in a period when I use Linux quite much for a project and I would appreciate hibernate to be present and also that I can install it smoothly, therefore I ask this before just trying around.)


enter image description here

ycc@x360:~$ cat /etc/fstab
# /etc/fstab: static file system information.
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda5 during installation
UUID=c9b9e601-f78a-41d8-a4f4-87e276b4aeb7 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=9ADF-D1D2  /boot/efi       vfat    umask=0077      0       1
# /home was on /dev/sda6 during installation
UUID=782e4b9f-4941-48bc-a1bf-5883e28cb174 /home           ext4    defaults        0       2
# swap was on /dev/sda4 during installation
UUID=c35d5bd1-960c-4e1a-8f6e-d73af393bfc3 none            swap    sw              0       0

$ sudo parted -l
Model: ATA WDC WD5000LPCX-6 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system     Name                          Flags
 1      1049kB  274MB  273MB   fat32           EFI system partition          boot, esp
 2      274MB   290MB  16.8MB                  Microsoft reserved partition  msftres
 3      290MB   315GB  315GB   ntfs            Basic data partition          msftdata
 4      315GB   319GB  4194MB  linux-swap(v1)  Basic data partition          msftdata
 5      319GB   382GB  62.9GB  ext4            Basic data partition          msftdata
 6      382GB   483GB  101GB   ext4            Basic data partition          msftdata
 7      483GB   484GB  1028MB  ntfs            Basic data partition          hidden, diag
 8      484GB   500GB  16.1GB  ntfs            Basic data partition          hidden, msftdata

You need to disable Secure Boot in UEFI (BIOS) settings to use hibernation in Ubuntu.

Your swap size is probably enough. You can test it by running

sudo pm-hibernate

If that works and the system wakes up correctly, then you can enable hibernation using this guide

  • Works perfectly, I added menu entry like you suggested. / Thanks, I appreciate. Will make things easier for me. You guys answering are invaluable. / (I found UEFI like I said, but it is quicker through GRUB2 setup.) – ycc_swe Jul 30 '16 at 13:48
  • Grub has a menu entry pointing to UEFI settings. – Pilot6 Jul 30 '16 at 14:15
  • That's what I meant, "System Setup" when the computer starts up. I may have expressed myself unclearly. "Secure boot disable" can be in different places in the BIOS, I read. I had to open the 2nd level menu entry "boot options" to find the secure boot. Thanks. – ycc_swe Jul 30 '16 at 14:19
  • Thanks for your help, all worked like you said. HIbernate worked well at least 10 times. A little slow to wake up and every program needed a "warm up" to get up to full speed. I really pushed it and hibernated MATLAB and other demanding stuff together. Last time it didn't wake up even though I waited long time. I long pressed power and on restart chose the second option which gave me a terminal and I could issue "sudo shutdown -h now" which "took" the second time I issued it. Now all system works OK again, but I guess I pushed it too far. I am not sure it would work if I increased swap? – ycc_swe Aug 1 '16 at 8:31
  • I do not think increasing swap can help, because if swap is not enough, resume from hibernate does not work at all. But you can try to increase it a little just in case. Maybe RAM consuming programs used swap and it was not enough for both things. – Pilot6 Aug 1 '16 at 8:33

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.