The swap partition for hibernation should be the RAM size and then some. 2GB seems to be much less then available ram in Librem15. Try extending its size to (RAM + 1)GB
Swap partition size don’t need to be same as RAM but at least needs to be the same RAM that you’re using before hibernate, it’s unusual to use more than 2GB but to be sure you can set t at 3 or 4GB
Ok, I just realised that I don’t have a swap partition… I mistook my rescue partition for the swap.
Quick question, my laptop came with its main partition encrypted (fs:crypt-luks) which occupies all the space on my ssd drive, so can I shrink it using gparted to make space for a swap partition?
[EDIT] ok, gparted does not support encrypted partitions. So the question is now, what tool can I use to shrink my partition?
You can/should get your swap within the encrypted partition. Just think of it that way: if the swap is not encrypted, then your memory that does include the decryption key will be written in plain in the swap. Not good
I don’t know what the default install layout was given I had a crash on first boot that broke things™, but if it’s anywhere standard you should have lvm inside the swap partition so it should be possible to resize things a bit and create a swap partition there. I’m actually surprised there wouldn’t be one by default…
good point. I was in 2 minds as to make the swap encrypted too or not.
did you mean inside the main partition? lvm … ok so it should be possible to simply shrink the root and make space for an additional volume for the swap all within the encrypted partition. Is my reasoning on the right track here?
ya, I would have expected one too. Maybe there is a good reason why not.
I cam across this interesting thread about reasons why not to have swap partitions/files on high-RAM ssd systems. The author of the accepted answer suggest instead to have a suspend-to-ram which I believe my LIbrem15v3 is configured to do as the default suspend.
The initial argument to write less to an ssd would apparently be less valid with modern SSDs as their capacity for write-capacity is much higher. Anyone knows what kind of limits Librem SSDs are designed for?
Coming back to my initial question, my UPower.conf is set for,
Which according to this wiki page is possibly both a suspend-to-disk and a suspend-to-ram ? Can I do the following to simply suspend-to-ram,
I can now happily report that with the latest PureOS update, the critical battery action is working and my librem15 now gracefully shutsdown when battery % reaches the critical setting.
hi @mladen I am re-opening this thread as subsequent updates have broken this again. The laptop simply keeps running till the end of battery and finally switches off.
I see the issue mentioned by vrata doesn’t have any updates. I have had this problem repeatedly and want to fix this. I usually observe that the laptop turns off instantly (not suspended because on power on I return to disk encryption pass-phrase and login) when the battery is somewhere between 45 or 25%. I thought previously I had seen that disk encryption would prevent suspend from happening but haven’t read enough backlog just yet.
One of the issues is the battery used by Purism on Librems are pretty much closed-source and till date they have not had any alternatives that would allow them to better integrate the battery monitoring with the system. See this post by Purism CTO @nicole.faerber.
So my guess is that until some improvement in battery tech comes along, this issue won’t be resolved.
I found your post about things to do to extend battery life. My problem is that I’m never sure when the laptop will just instantly power off due to low battery. Sometimes it is 20% sometimes it is 50%. I’ll keep looking at this from time to time.