1

I used to hibernate on my laptop whose disk is encrypted, under Ubuntu 20.04, following the instruction given in Install Ubuntu 19.10 with encrypted swap/home partitions, specifying manually the swap partition and Hibernate and resume from a swap file (except that I didn't manage to make it work before Ubuntu 20.04 because of NVIDIA drivers issues...).

But for some times, it does not work anymore: at recovering, after I type my encryption password, it hangs forever.

The first problem that I have is that I don't really know how to "debug" this issue.

Then I wonder if the problem could come from swap priority. When I compare to what is in Install Ubuntu 19.10 with encrypted swap/home partitions, specifying manually the swap partition, my priorities are in wrong order.

root@is241395:~# swapon 
NAME      TYPE      SIZE USED PRIO
/swapfile file       40G   0B   -3
/dev/dm-2 partition 980M   0B   -2

It is possible that my problem is due to this. How to update these priorities (I am not sure I understand the relation with fstab)?

janou195
  • 243

1 Answers1

0

I can at least answer the question about how to change swap priorities. You can set this manually in your /etc/fstab. If you want to prefer using your swapfile, edit /etc/fstab for the line that contains your swapfile mount. Looking at your link, it looks like you probably have something in the form of:

/swapfile                   none            swap    sw              0       0

Change it to:

/swapfile                   none            swap    sw,pri=1       0       0

Reboot and your machine should prefer to use the swapfile over the partition.

Brian Turek
  • 1,826