pop-os / pop

A project for managing all Pop!_OS sources
https://system76.com/pop
2.46k stars 87 forks source link

Hibernation support on encrypted install #1966

Open thomas-zimmerman opened 3 years ago

thomas-zimmerman commented 3 years ago

Distribution (run cat /etc/os-release): Should work on all supported releases of Pop!OS

Issue/Bug Description: Hibernation is not currently enabled on Pop!OS given partition layout, use of a non persistent encryption key on swap, and the additional drive IO used on solid state drives. This is a requested feature where intermittent use of suspend uses a significant percentage of the overall battery. Depending on memory size of the system and size of NVMe/SSD drive, hibernation could add notable delay on resuming a hibernation session and wear out the OS drive prematurely.

Steps to convert a encrypted install to enable hibernation:

[Enable hibernate in logind] Identity=unix-user:* Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions;org.freedesktop.login1.hibernate-ignore-inhibit ResultActive=yes


`sudo nano /etc/polkit-1/localauthority/10-vendor.d/com.ubuntu.pkla`

**Expected behavior:**
This should allow you to have a hibernate option from the power menu.

**Other Notes:**
You can test if hibernation works on your system: `sudo systemctl hibernate`. Hibernation, if used often, will add a decent amount of additional write traffic on solid state drives.
jacobgkau commented 3 years ago

This looks like a guide (and is well-written.) Would this be something to have a support doc for, or is it here as a feature request to have this configured out-of-the-box?

thomas-zimmerman commented 3 years ago

Carl asked me to document this as I got this working on an lemp9. I think this would be something that we may want to build in as out-of-box use. We likely will be turning this into a support article to cover for users that want to enable this when hibernation would be a better fit for their use case.

storyaddict commented 3 years ago

I plan on creating a support article on this today or tomorrow. :)

storyaddict commented 3 years ago

Can also confirm that we've got this working on the Oryx 6, and my Oryx 1.