• Pop!_Planet is still very much under development. Data for the wiki is being sourced from the Arch Linux and Ubuntu wikis, along with a bunch of completely unique content specific to Pop!_OS, and sourcing, converting and updating that content takes time; please be patient. If you can't find what you're looking for here, check the Arch Linux and Ubuntu wikis.
  • Welcome!

    I'll get straight to the point.

    When I started Pop!_Planet, I launched it because I saw a need for a centralized community for Pop!_OS. To be frank, I never expected the level of popularity it has achieved. Over the last year, we have gone from under 50 users, to almost 400 users. That's awesome! However... it also comes with a downside. We are rapidly running out of disk space on our server, and the bandwidth costs go up every month.

    Pop!_Planet is not affiliated with System76 in any way, and is funded completely out of pocket. From day one, I said that I'd never use on-site ads (I hate them as much as you do), so the only monetization we get is through donations. Right now, the donations we receive don't even cover our overhead.

    I know that most users will ignore this message, and that's ok. However, if even a few of our users are willing and able to donate a few dollars to help offset our expenses, it would be greatly appreciated.

    Support Pop!_Planet

    Thank you for your time,

    Dan Griffiths
    Pop!_Planet Founder

Question Guide Guide to hibernate? (Answer is a guide)

wrhgw

New member
Oct 24, 2019
17
0
4
29
Hi, I did get hibernate and resume to work with grub on a Legacy install but I don know how to do it exactly with systemd and kernelstub. I followed some guides on reddit but I never managed to get resume from hibernation to work.

Is there an official guide? Why is this not an option in the installation or settings?
Thanks!
 

bwat47

Member
Feb 27, 2019
6
0
9
30
I've got it working on mine with an EFI installation

You can add the resume parameter with kernelstub like so:

sudo kernelstub -a "resume=UUID=25fe928e-8214-4177-9d79-5fad2edefc11"

Where the UUID= part is the UUID of your Swap partition

Also edit /etc/initramfs-tools/conf.d/resume to add the same line

and update the initramfs: sudo update-initramfs -u

NOTE: I have an un-encrypted installation, and I also disabled the encrypted swap partition (for some reason pop defaults to encrypted swap even if you install without full disk encryption). I'm not sure how to get it to work with encrypted swap.
 
With some help from the above comment by @bwat47 I was able to get this working on my Darter Pro with full disk encryption.

I believe a very similar process would have worked using the swap partition, by I opted for a swap file on my root partition instead (since I have plenty of free space and I could make it as big as I wanted).

I more or less followed the Arch Wiki instructions here, i.e.:
Code:
fallocate -l [N]G /swapfile           # [N] = swapfile size in GB
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
Then added /swapfile none swap defaults 0 0 to my /etc/fstab and followed the instructions here (i.e. ran filefrag -v /swapfile) to get the disk offset for the swapfile.

After that I had the kernel options I needed:
Code:
resume=/dev/mapper/data-root resume_offset=[offset]
Which I added to the GRUB_CMDLINE_LINUX_DEFAULT line of my /etc/default/grub, then ran grub-mkconfig -o /boot/grub/grub.cfg. I expected this to work but when it didn't I went searching more and found this thread and learned about kernelstub. Given that the rest of the steps duplicate this information it's possible this step isn't necessary, but I haven't tested that.

So after toying around with kernelstub and figuring out how to modify the kernel boot options line to have the options I wanted, something like:
Code:
kernelstub -a "resume=.... resume_offset=..."
I then created /etc/initramfs-tools/conf.d/resume and added the same resume/resume_offset line there and ran sudo update-initramfs -u.

After rebooting and testing hibernate using sudo systemctl hibernate, it worked. My computer shut off and when I started it back up and entered by encryption password and it resumed from the swap file. I also updated /etc/systemd/logind.conf to set HandleLidSwitch to hibernate so my laptop automatically hibernates when I close my laptop.

I was very surprised I couldn't find any official System76 guides to get hibernation working but hopefully this will help someone else get things set up the way they want.
 

Members online

No members online now.

Latest projects

Forum statistics

Threads
784
Messages
3,563
Members
721
Latest member
HarryPEthan