Talk:Custom Initramfs/Hibernation

From Gentoo Wiki
Jump to:navigation Jump to:search
Note
This is a Talk page - please see the documentation about using talk pages. Add newer comments below older ones, sign comments using four tildes (~~~~), and indent successive comments with colons (:). Add new sections at the bottom of the page, under a heading (== ==). Please remember to mark sections as "open for discussion" using {{talk|open}}, so they will show up in the list of open discussions.

Article status

Talk status
This discussion is still ongoing as of 2021-07-13.

Hi frostschutz, Did you make more progress on this? My laptop never hibernated 'cos of its AMDGPU driver; reading around, that might now be fixed, but in the meantime I've started using an initramfs, so your article would be useful, if it were complete...

My first question is to wonder why the initramfs is involved - at least for the swap partition case. I'd like to believe the kernel saw it was resuming, loaded memory from the resume partition, and away it goes - anything else seems madness... But as there seem to be initramfs hooks for resume in Arch, Debian, Systemd, etc. I presume it's not that simple, hence your article.

If the initramfs needs to support resume, at least for swap partition, I'd presume it should look to see if resume is possible, and if so, do it, as above, and should not get its fingers dirty with anything else at all (eg fsck, LVM, crypto (unless needed to read the swap partition)).

Not using a real swap partition for resume strikes me as really scary - the initramfs will need to do fs-related stuff to locate the hibernation data, which is dangerously close to transgressing the rules on touching filesystems. Goverp (talk) 08:36, 13 July 2021 (UTC)

Sorry for the incomplete article, I never got around to writing it properly, and nowadays I'm not using Gentoo at all anymore. Under /Examples someone contributed a resume from hibernate script, I haven't tried it but maybe it can give you some ideas. If you or anyone else wishes to take over the article, please feel free to do so. Frostschutz (talk) 09:05, 13 July 2021 (UTC)