Note (for future followers) that I had to add another step at the end of your process before hibernation would work for me. This is step 4 from this guide:
Namely:
RESUME_PARAMS="resume=UUID=$(findmnt / -o UUID -n) resume_offset=$(sudo filefrag -v /swapfile|awk 'NR==4{gsub(/\./,"");print $4;}') "
if grep resume /etc/default/grub>/dev/null; then echo -e "\nERROR: Hibernation already configured. Remove the existing configuration from /etc/default/grub and add these parameters instead:\n$RESUME_PARAMS";else sudo sed -i "s/GRUB_CMDLINE_LINUX_DEFAULT=\"/GRUB_CMDLINE_LINUX_DEFAULT=\"$RESUME_PARAMS/" /etc/default/grub;fi
sudo update-grub
The first step seems to circumvent the need to lookup the UUID and physical offset yourself.
The second step may throw an error, but should tell you how to resolve it (in my case, I had to change the UUID and physical offset).
After updating grub, reboot, then test to see if it hibernates (you can also ask the computer if it is able to hibernate by running busctl call org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager CanHibernate, to which it should hopefully answer “yes”).
How are you all getting the fingerprint reader to work out of the box? fprintd seems to see my reader okay but it doesn’t actually seem to register any of the times I touch it. I checked back through the posts I used when I originally tried to install Ubuntu last year and noticed that the Mint edge image is installing libfprint 1.90, while all of the Ubuntu fingerprint troubleshooting threads note that 1.94 is the first version that works with the Goodix reader on the Framework. Am I missing a step somewhere?
Everything else on Mint Edge is working great so far, no WiFi issues and I’m going to work on setting up hibernation tomorrow.
This is the first time a major upgrade did not destroy the previous installation. Usually I have to reinstall.
The tool is very thorough though. It will undo any changes you have made in /etc, uninstall any packages you have installed outside of the official repos and remove incompatible PPAs. You can tell it to ignore some packages and leave them though.
It removed the interim 5.15 kernels but installed finalized 5.15 kernels, so no real change there.
Same as @Fraoch my upgrade from Linux Mint 20.3 to 21 went smoothly. I was glad to see my hibernate setup survived the update process. (Hibernate writes the system state to my swap partition)
I did this yesterday on my much more complicated desktop and I got more experience with the migration tool. This is definitely the best migration tool they’ve ever developed and yes, I have a fully updated and fully working desktop system now.
But as I said - pay attention to 3rd party repositories, any customized files in /etc (for packages installed through the repos) and any programs you’ve installed yourself outside of the repos. It will want to uninstall all programs you’ve installed outside of the repos, downgrade any programs where you’ve installed a version more advanced than what’s in the repos, and deactivate any 3rd party repositories or PPAs not compatible with Ubuntu 22.04 “jammy” as opposed to 20.04 “focal”. If you put anything in the exclude list it will respect it, and it will keep 3rd party repos or PPAs in the sources list, just deactivated. Edit them later if you wish.
I’m also experiencing this issue on Mint 21. The temporary fixed provided in the comments of that github post works well enough. The two issues I’ve experienced with it have been that if I sudo apt update && sudo apt upgrade -y it will break the fix. Second, this fix prevents my framework from booting into the desktop environment from hibernation. Hibernation works again when I remove the fix but then my fractional scaling/display config resets.
I followed your instructions here, hibernate and suspend seem to work great now (fresh install of linux mint 21 XFCE on 12th gen) , thanks for putting this together! I’m still wondering:
Is there a way to test if suspend-then-hibernate works? I’m super new to linux, the only thing I can think to do is suspend laptop, shut lid, wait for two hours, then check system logs
what part of those steps tells the system to go from suspend to hibernate after 2 hours? Is this 2 hour window configurable? I wouldn’t want to change it necessarily, just want to make sure I understand what was done
EDIT: questions above were based on my misunderstanding of what the steps in @dhmsjs 's post were accomplishing. The steps described in that post allow hibernation and suspension, and they make both options available in the power menu, but they don’t automatically activate suspend-then-hibernate, I was mixed up because suspend-then-hibernate was mentioned in this post about idle drain.
In addition to the steps in the post quoted above, I followed steps described in the top answer here to enable suspend-then-hibernate on lid close. Will test tonight when I try to benchmark the drain to make sure it works.
I’m still not quite clear on how I can set the system to use suspend-then-hibernate after inactivity, rather than just suspend, I would appreciate any advice on that.
@Devraj I don’t think I can give you a useful answer to your specific questions. I’m still on 20.3 and as far as I remember I configured my suspend/hibernation behavior entirely in the GUI (under Power Settings). If it is plugged in, then it just suspends. If it is on battery only then closing the lid hibernates immediately.
Occasionally it will do some weirdness on resume (e.g. keyboard or trackpad not working right) – particularly if I close the lid and then reopen quickly. But generally if I just force it to re-hibernate by closing the lid again, it comes back okay. Or if that doesn’t work then holding down the power button to force power off will, when I power back up, generally go through the resume from disk process. So it’s like it thinks it has powered down, but actually hasn’t completely finished the process.
@dhmsjs I had edited my comment before I saw your reply, I’m still trying to work out the best approach for my usage habits but a couple things others may find useful:
I was getting prompted to authenticate if I let my screen lock before the suspend time (15 minutes on my system) elapsed, following the steps in the top answer here fixed that
I tested out using a symlink to make my laptop always suspend-then-hibernate whenever “suspend” is selected in the power-manager GUI as described here. This doesn’t fully fit my usecase as I would like to only suspend-then-hibernate when using battery power and just suspend when on AC power, but it works, in case it helps anyone else
Yes, this is not something included in the guide. But your work here is helpful and will definitely help others who might find themselves in a similar situation with Home folder encryption.
is no one else having an issue with the brightness controls? ive gone through all the guides related to it and none had any effect on it in any way, so i’m starting to think that the ryzen version of the framework 13 has some kind of driver issue with linux mint
Using the 2023 Intel version 13th gen 13" I have
module_blacklist=hid_sensor_hub
in the kernel parameter list since week 1, although I don’t remember what the problem was…
that one didnt affect it at all. eventually something did though, but im not sure what it was that did it. something with the recommended install stuff but i didnt really get what any of it was doing when i was doing it.