0

My knowledge of this is quite limited. I'm using an MSI GS75 Stealth 95G laptop, with an Ubuntu 19.04 and Windows 10 dual boot.

Running sudo systemctl hibernate seems to just turn off my computer. When I boot back up, none of my programs are back.

At first, I checked my swap size with sudo swapon --show. Because it was 2 GB, and my laptop has 32 GB of RAM, I resized the swap size to 32 GB, following this tutorial. The swap size was sucessfully changed. However, the sudo systemctl hibernate command still didn't work.

The command sudo swapon --show resulted in the following:

NAME      TYPE SIZE USED PRIO
/swapfile file  32G   0B   -2

However, the command grep swap /etc/fstab resulted in:

/swapfile   none   swap  sw
0       0

This is all I could figure out. I tried many different things, several tutorials, and nothing seemed to work.

Thanks very much for the help.

1
  • You probably need a swap partition, not a file. – ubfan1 Oct 20 '19 at 21:10
0

If I am not mistaken to use hybernate you need more than 32 GB swap file. There was a document explainin optimum swapfile sizes for linux kernel. If it is more than 2xRAM size it somehow lags and drops performance if you dont hybernate you can use ideally 0.5xRAM size, it claimed swap size shoudl be 2xRAM size if you plan to use hybernate.

I have found a similar article: Optimal Swap Size

1
  • Thanks for the response. I've 32 GB of RAM, so I've resized /swapfile to 64 GB as per your recommendation. It unfortunately doesn't seem to change anything, besides simply changing the size of /swapfile. – Aditya Radhakrishnan Oct 21 '19 at 3:26

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.