Librem 5 possibility of Hibernation

Do we know if hibernation is possible with the Librem 5?

1 Like

So you mean like “suspend-to-disk”?

Possible? I don’t see why it wouldn’t be. You’ll have to set things up manually though - repartition the disk, add some swap partition, point the kernel’s cmdline to it and make the userspace use it in a way you want it to. Good luck!

1 Like


If you are seriously going down this road then don’t forget about encryption. You want the swap file encrypted one way or another.


Yep. Doesn’t look particularly easy to get working without breaking your phone a few times. :wink:

1 Like

If you add encryption into the picture, then don’t forget about “make sure you can decrypt the swap with just a touchscreen” :wink:


Yeah, on my Framework I am using encryption and a swap file. It works great. If I could get that working on the L5, that would be awesome!

So after looking briefly, the L5 is using a 1gb swap. I don’t know if this is a swap partition or file but disks does not show a swap partition. This means I should be able to resize the swap file, and once it is big enough trigger hibernation via systemctl. When I have a bit more time, I’ll try to do this. If I can really get it to work it would be EXCELLENT!

It does not. If it does, you must have set it up manually. By default there’s only zram.

1 Like

Why does the Usage app show a 1gb swap under memory?

purism@evergreen:~$ swapon -s
Filename                                Type            Size    Used    Priority
/dev/zram0                              partition       1530876 509716  100

Ahh ok, I believe I did follow your instructions about getting zram setup. Ok, well I’ll need to look at setting up a swap file then. Then I don’t need to unlock two partitions at boot.

Since you are infinitely more familiar with these types of things, do you think this is something you could maybe just test out real quick?

The reason I am asking is because I think this is going to be a bit more difficult than we are anticipating. On the MNT Reform using a 1 TB NVME, with a 10GB swap partition I am finding that the hibernate package isn’t even available for arm64. So I’m kind of doubtful the pieces are in place for hibernation to work. Although I think getting hibernation work would be a great thing for conserving power while also maintaining a workflow.

Maybe you have a unique workflow. Suspend-to-disk is not something that I would want for a phone, since it is effectively pulling the phone off the mobile network, so it is no longer acting as a phone and probably can’t be woken up remotely either.

So what you are getting is: shutting the phone down (in order to conserve power) while preserving your application state.

That certainly makes sense but it just isn’t what I would want for a phone.

Yeah, I think the Librem 5 is such a unique product that acting like it isn’t a computer is just counter productive. I mean if hibernation isn’t your thing, just don’t use it. But for me, especially for large parts of my day, where I am unable to use my phone, being able to save my workflow and power off the device would be great. In this situation I can’t use the phone, and the notification and calls would be pointless. However, when I want to use the phone, being able to come back and turn it all back on and be right where I was, would be great.

I am hopeful something like this is possible, but I am ok if it isn’t. I think the SoC here doesn’t quite have much work done on sleep states by the manufacturer, or at least compared to other SoCs of a similar nature.

1 Like

Shouldn’t be relevant for suspend-to-disk. The sleep state is just “off”.

You would think, but who knows if some kind of special state is required to properly restore from disk.

The fact that hibernation doesn’t seem to even have been thought of on the SoC there are a lot of reasons that could have lead to that.

It’s just a kernel thing, the SoC has nothing to do with it. That said, you still need to make sure that all the drivers and userspace can handle it correctly, and since I’m not aware of anyone testing it on Librem 5 already, there may be some things on the way that need to be fixed. Sounds like you may be the one to find out if that’s the case :stuck_out_tongue:


Oh, ok, good to know that hibernation is all on the kernel, and it makes sense. Now, regarding what is available in the repos, how does one get the missing software for the kernel to use hibernation on the L5?

Already answered above.

1 Like

Perhaps, but I am under the impression that the elements the kernel needs to know how to hibernate and how to resume from it are missing. I could get pm-utils but not hibernate. The output when trying to hibernate is that hibernate is an unsupported sleep verb or something like that.