Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 156445

Summary: [patch] Add support to genkernel for userspace suspend/resume (uswsusp)
Product: Gentoo Hosted Projects Reporter: Daniel Drake (RETIRED) <dsd>
Component: genkernelAssignee: Gentoo Genkernel Maintainers <genkernel>
Status: IN_PROGRESS ---    
Severity: enhancement CC: alexey.kv, alonbl, bertrand, bjh-gentoobt, bugs_gentoo_org.Tim_OKelly, email, frares, fturco, funtoos, gfa, hramrach, igal.shnaider, jackdachef, jesse, jnerin, jonathan, js, marat, musikc, nic, res, serge, slong, sping, wschlich
Priority: High Keywords: Inclusion
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 168500    
Attachments: patch
ebuild patch
suspend-0.5-Makefile.patch
updated genkernel patch
genkernel-minimal-suspend.patch
dev_snapshot.patch
genkernel-minimal-suspend.patch
genkernel-minimal-suspend.patch
genkernel-3.4.9_pre9-uswsusp.patch
genkernel-3.4.9-uswsusp.patch
swsusp_resume func

Description Daniel Drake (RETIRED) gentoo-dev 2006-11-27 13:15:46 UTC
Linux 2.6.17 added a new way of hibernating (suspend-to-disk): exposing some more interface to userspace and then letting the snapshot image control be done as a user program.

Userspace utilities were developed to use this functionality: http://suspend.sourceforge.net

I intend to add an ebuild for this very soon: bug #156431

I haven't added support to the initrd generating code, is this still used/supported? It could be added easily if necessary.
Comment 1 Daniel Drake (RETIRED) gentoo-dev 2006-11-27 13:16:05 UTC
Created attachment 102863 [details, diff]
patch
Comment 2 Daniel Drake (RETIRED) gentoo-dev 2006-11-28 06:35:04 UTC
Created attachment 102918 [details, diff]
ebuild patch
Comment 3 Daniel Drake (RETIRED) gentoo-dev 2006-11-28 06:35:38 UTC
Created attachment 102919 [details, diff]
suspend-0.5-Makefile.patch
Comment 4 Daniel Drake (RETIRED) gentoo-dev 2006-11-29 07:22:50 UTC
Created attachment 102986 [details, diff]
updated genkernel patch

suspend.conf is now copied in gen_initramfs.sh rather than gen_compile.sh. This prevents it from being cached in the bincache.
Comment 5 Chris Gianelloni (RETIRED) gentoo-dev 2006-12-13 09:22:12 UTC
OK.  The patch has been added to genkernel's SVN.  The rest will need to be done in the ebuild when I roll up a new version.
Comment 6 Alon Bar-Lev (RETIRED) gentoo-dev 2006-12-19 13:00:18 UTC
Hi!
Will you consider supporting suspend2 in the same way?
I will create a patch to add sys-apps/suspend2-userui into the initramfs.

Comment 7 Chris Gianelloni (RETIRED) gentoo-dev 2006-12-20 08:47:31 UTC
File a new bug for new additions, please.
Comment 8 Chris Gianelloni (RETIRED) gentoo-dev 2007-01-04 09:21:36 UTC
Fixed in 3.4.6
Comment 9 Chris Gianelloni (RETIRED) gentoo-dev 2007-08-30 18:26:02 UTC
OK.  Per the discussion on bug #156431, I am removing this support from genkernel until the package is added to the tree.  Because of this, I am reopening this bug report until newer support can be added.
Comment 10 Alon Bar-Lev (RETIRED) gentoo-dev 2007-08-30 18:32:50 UTC
Which support do you wish we add?
You explicitly said that there is no relation between the ebuild and genkernel.
Comment 11 Chris Gianelloni (RETIRED) gentoo-dev 2007-08-30 18:33:32 UTC
OK.  This was removed with genkernel-3.4.9_pre2 which is now in the tree.  I guess we'll revisit this in the 3.5 branch, when I start working on it.
Comment 12 Alon Bar-Lev (RETIRED) gentoo-dev 2007-08-30 18:40:28 UTC
Created attachment 129631 [details, diff]
genkernel-minimal-suspend.patch

Please apply the following so that people can put resume in an overlay and initramfs will be capable of resuming.

No need to compile anything for this one.

Thanks.
Comment 13 Cyrill Helg 2007-09-03 10:48:49 UTC
So if I want to use uwsusp with my genkernel initrd (because of lvm2, my swap is a lvm2 volume) I need to just apply the latest patch to what? genkerel?
Comment 14 Alon Bar-Lev (RETIRED) gentoo-dev 2007-09-04 05:22:30 UTC
wolf31o2: Please apply the minimal support in init script (attachment#129631 [details, diff]), so people may introduce their own overlay as in suspend2 case.
Comment 15 Alon Bar-Lev (RETIRED) gentoo-dev 2007-09-04 05:26:39 UTC
For people intersting in making uswsusp work (bug#156431):
1. Apply patch for genkernel from attachment#129631 [details, diff] .
2. Do:
mkdir -p /tmp/initramfs-overlay/sbin
cp /usr/lib/suspend/resume /tmp/initramfs-overlay/sbin
genkernel <whatever> --initramfs-overlay=/tmp/initramfs-overlay <whatever>

Have fun!
Comment 16 Alon Bar-Lev (RETIRED) gentoo-dev 2007-09-05 03:39:42 UTC
[update]

For people intersting in making uswsusp work (bug#156431):
1. Apply patch for genkernel from attachment#129631 [details, diff] [edit] .
2. Do:
mkdir -p /tmp/initramfs-overlay/sbin
mkdir -p /tmp/initramfs-overlay/etc
cp /usr/lib/suspend/resume /tmp/initramfs-overlay/sbin
cp /etc/suspend.conf /tmp/initramfs-overlay/etc
genkernel <whatever> --initramfs-overlay=/tmp/initramfs-overlay <whatever>

Have fun!

Comment 17 Sergey Temerkhanov 2007-09-05 11:44:26 UTC
Created attachment 130076 [details, diff]
dev_snapshot.patch

Somehow udev on initrd does not create /dev/snapshot device on my system (genkernel-3.4.8, amd64) so resume can't do anything. This patch creates /dev/snapshot if it's missing before running /sbin/resume.
Comment 18 Alon Bar-Lev (RETIRED) gentoo-dev 2007-09-05 19:50:19 UTC
Created attachment 130111 [details, diff]
genkernel-minimal-suspend.patch

Thanks Sergey,
A minor update.
Comment 19 Jakub Moc (RETIRED) gentoo-dev 2007-09-08 15:34:50 UTC
*** Bug 191712 has been marked as a duplicate of this bug. ***
Comment 20 Chris Gianelloni (RETIRED) gentoo-dev 2007-09-14 15:44:12 UTC
Do not add 156431 here.  You do not need genkernel support to add an ebuild to the tree as genkernel is an independent Gentoo-hosted project which is independent to the tree.

Thanks
Comment 21 Alon Bar-Lev (RETIRED) gentoo-dev 2007-09-14 15:48:17 UTC
But people cannot use this until you at least add attachment#130111 [details, diff]
Adding the package to the tree will result in unusable package.
So it is dependent.

Please add the minimal patch, so we can drop the dependency.
Comment 22 Alon Bar-Lev (RETIRED) gentoo-dev 2007-09-14 16:19:55 UTC
BTW: The minimal support is identical to suspend2 support which already supported.
Comment 23 Chris Gianelloni (RETIRED) gentoo-dev 2007-09-14 20:58:00 UTC
What?

People can compile their own kernel and assemble their own initr{d,amfs} without genkernel.  There are tons of packages in the tree without support in genkernel.  What I am trying to explain to you is that genkernel is *not* blocking your package being added.  I've also made it clear that I'm not going to revisit this for some time.  I have no intentions on adding your patch to genkernel for reasons I have stated so many times I am starting to feel blue in the face.  I am not interested in supporting *any* new code which pulls from the running system.  

Period.

Now, please stop adding this bug as a blocker to your bug.  Your bug does not depend on genkernel any more than gentoo-sources does.  You have done your due diligence by adding a patch here that will allow users of your ebuild to use this support.  As upstream, I have rejected this patch.  Now, you have two choices here, you can either add the ebuild and be done with it and I'll add proper suspend support to the next genkernel in a manner that I think is best, which includes doing all of the building and such within genkernel, or you can sit on it for as long as you like.  I will not be adding any support for suspend until it is in the tree, and that support will be added in the manner of my choosing.  I am not meaning this to be rude, but genkernel is my package and I am the one that has to support it.  I'm not going to support code I do not with to support, so please take this opportunity to revisit your thoughts on this and understand that whatever pressure that you might think that you are putting on me as genkernel's upstream is unwarranted and unwanted.

Now, please do not add 156431 to this bug again.  I have no intentions on ever adding suspend support to genkernel until it is in the tree.  I thought that I had made this clear before when I said that I wish I had never added it.

Thanks
Comment 24 Alon Bar-Lev (RETIRED) gentoo-dev 2007-09-14 21:16:13 UTC
The patch for minimal support does not pull anyting from the tree!
So the reasons you keep mentioning are not true.
Please add the patch from attachment#130111 [details, diff], as people are waiting for it.

As in the livecd theme cases... I need to do your job in making users happy... The minimal patch will do nothing for your ego so please add it.
Comment 25 Chris Gianelloni (RETIRED) gentoo-dev 2007-09-14 23:18:00 UTC
*sigh*

What part of "I am not going to add it" do you not understand?  Trying to passive-aggressively threaten someone by adding devrel to a *technical discussion* sure isn't the way to win an upstream to your cause.

I'm sorry, but unless there is some interpersonal issue that I am unaware of here, Developer Relations has exactly zero authority here.  The closest team that would preside over this would be the QA team, but refusing to support something I don't feel like supporting isn't exactly a QA violation.  It is my right and privilege as the upstream maintainer of genkernel.

Now, I am trying to be as civil as I possible can with you, but you are starting to upset me with your single-mindedness on this issue.  I have requested that you stop and you have not.  In case you are wondering, that *is* a devrel-enforceable charge.  Of course, I think we can work this out like civil adults without involving Developer Relations, which is why I am removing them from this bug.  If you insist on bringing them in on a technical issue, I will be forced to play my hand and file a complaint against you for harassment.

Let me say this one more time.  I am not adding your patch.  Your continued persistence that I am somehow obligated to do so is bordering on harassment.  Stop your harassment *now* or I will be forced to take appropriate action.

Thank you.
Comment 26 Alon Bar-Lev (RETIRED) gentoo-dev 2007-10-27 20:04:23 UTC
Created attachment 134504 [details, diff]
genkernel-minimal-suspend.patch

[Update, no need for configuration file]

For people intersting in making uswsusp work with genkernel:

1. Apply this patch.
2. Do:
mkdir -p /tmp/initramfs-overlay/sbin
cp /usr/lib/suspend/resume /tmp/initramfs-overlay/sbin
genkernel <whatever> --initramfs-overlay=/tmp/initramfs-overlay <whatever>
3. Add resume=<device> at your kernel command-line.

Have fun!
Comment 27 Alon Bar-Lev (RETIRED) gentoo-dev 2007-11-15 22:15:34 UTC
Can we please have attachment#134504 [details, diff] for genkernel-3.4.9?
Thanks.
Comment 28 Andrew Gaffney (RETIRED) gentoo-dev 2007-11-16 00:07:26 UTC
Prodding like that on the bug just makes us (well, me) want to stick this bug at the very end of the queue. We're right in the middle of a release cycle, in addition to having jobs and real lives. You've done your part by creating the patch. We'll get around to doing our part.
Comment 29 Alon Bar-Lev (RETIRED) gentoo-dev 2007-11-16 06:42:38 UTC
Created attachment 136075 [details]
genkernel-3.4.9_pre9-uswsusp.patch

Rebase.
Comment 30 Alon Bar-Lev (RETIRED) gentoo-dev 2008-01-12 08:20:09 UTC
Why haven't you added this to 3.4.9?
Was it so hard to apply a simple patch?

From comment#28, it seems to be some kind of queue unrelated to technical priority. I did not bother you (as requested), in order to not get into the end of this strange queue...

Well... On genkernel-3.4.9 too, users will also won't be able to use uswsusp.

That means that whoever cares about his users ends up in getting comments like this... And our users not getting a solution.

Great work!
Comment 31 Alon Bar-Lev (RETIRED) gentoo-dev 2008-01-12 08:45:12 UTC
Created attachment 140761 [details, diff]
genkernel-3.4.9-uswsusp.patch

Rebase.

For people intersting in making uswsusp work with genkernel:

1. Apply this patch.
2. Do:
mkdir -p /tmp/initramfs-overlay/sbin
cp /usr/lib/suspend/resume /tmp/initramfs-overlay/sbin
genkernel <whatever> --initramfs-overlay=/tmp/initramfs-overlay <whatever>
3. Add real_resume=<device> at your kernel command-line.
Comment 32 Chris Gianelloni (RETIRED) gentoo-dev 2008-01-14 17:02:11 UTC
*sigh*

Allow me to explain to you *one more time* why this has not been added.  I am planning on writing the code for this support in such a manner as to not require it to pull files from the local filesystem when it is not necessary.  As such, it was not ready for inclusion in 3.4.9, as 3.4.9 was essentially a rollup release for things required for releases.  Since we weren't using this in our releases, it was deferred to a later date.  While I understand that you do not personally agree with this decision, I *am* upstream for this piece of software and it is up to me to decide what to do with it.  As such, you really need to have some patience and wait for me to include this *without* the attitude.  There is *no reason* for you to act in this way.

As such, consider this my "dev to dev" talk about your continued attitude problems towards me.  Stop your little personal crusade, now.  I don't care if I made you upset by not accepting your patches, as is.  That is my prerogative as the package maintainer.  It also isn't a QA violation to *not* add new code.  It *could* be a QA violation if I refused to fix broken code, but this is new support, and doesn't apply, as such.  Please take a step back and think about your interactions on this bug and think about it as if I were an external developer of an external piece of software.  Would that upstream even want to deal with you again after this sort of an attitude?  Of course not...

Since you seem determined to think that the inclusion in non-technical, allow me to point you to https://bugs.gentoo.org/show_bug.cgi?id=156431#c23 for my reasoning.  Whether you agree with it or not, it is a technical reason for why this has not been included.  If you would like to see this included much more quickly, I ask you to rewrite the patch to build and compile the necessary binaries within genkernel.  If there are any configuration files required for this, then the location of the config file should be a variable set in genkernel.conf, and should likely default to the default location.  If you are not willing to write this patch, then you will need to wait for me to do so.  That means you have to wait until it fits into *my* schedule.

I had thought that I had made this perfectly clear, but I guess not.

Also, new feature requests are *always* at the end of the queue.  New feature requests without patches acceptable to the author are lower priority than patches that are acceptable.  As such, this is already about as low of a priority as one can get, but your attitude makes me not want to work on this, so it *does* lower the priority and it *is* for a non-technical reason, but the main reason for it not being included is technical.  I'd add this support even if you were a supreme asshole, so long as the patch was acceptable.  In this case, the patch is not acceptable, and you're being a jerk about it.

Please try to *at least* have a respectful attitude.  I don't expect you to respect me or even to like me, but simply to respect that I am the current maintainer of this software and it is my call what does and doesn't go in and why.

Thank you
Comment 33 Alon Bar-Lev (RETIRED) gentoo-dev 2008-01-14 17:24:25 UTC
Until a perfect solution will come, you can provide users the same level of support you already have for suspend2/tuxonice, whose patch you accepted.

The minimal patch does not copy any binaries from local system as you requested, so I don't see what is wrong with it, it provides temporary solution, but makes some of Gentoo user happier.

I ignore all personal stuff.

If you want genkernel to be usable, you should rewrite it to be modular.
For example have /usr/share/genkernel/packages.d which have a script for each package that responsible to compile it... And at /etc/genkernel.conf specify which packages to compile.

The output of the packages is cpio file that merged into initramfs.

At the initramfs there should be /etc/initramfs.d (or any other) which will have initramfs init script parts, sorted by a numeric prefix and sourced by /init. This way every package may add its own functionality into the init script. There should also be hooks in /init to allow registration of init parts functionality, for example at startup, after device manager, before root mount, after root mount etc...

This way we can have app-genkernel/busybox, app-genkernel/uswusp, app-genkernel/splashutils which places the tarballs and builds script at the correct locations.

If you do this, people may add whatever they wish into their initramfs in a proper way.

But until then, adding a new package is a task only you can do to your satisfaction.
Comment 34 Alon Bar-Lev (RETIRED) gentoo-dev 2008-01-14 17:30:20 UTC
Forgot to mention that as packages builds them selves genkernel should also install their output to common root, so libraries may be found. For example, compiling with splashutils or libgcrypt libraries.
Comment 35 Chris Gianelloni (RETIRED) gentoo-dev 2008-01-14 18:35:52 UTC
(In reply to comment #33)
> If you want genkernel to be usable, you should rewrite it to be modular.

This is exactly our plan with 3.5's release.
Comment 36 xiando 2008-08-31 16:49:43 UTC
Half a year later and genkernel still does not support software suspend -- even though the solution has been in this bugreport a year.

Could someone please add the patch to genkernel? It's annoying to have to do it manually every time I upgrade to a new kernel (even though I've made a shell script which does it).

Alon Bar-Lev has retired for very good reasons (bug 233301 comment 128), Chris Gianelloni has also retired, so another developer assigned to genkernel suspend support is desired.
Comment 37 Christina Gianelloni (RETIRED) gentoo-dev 2008-08-31 21:53:21 UTC
The genkernel package is still being maintained (1) by the same group of maintainers (2), however the preliminary work is not done on Gentoo infrastructure. When the new version is ready it will be committed it to the Gentoo tree.

(1) http://git.wolf31o2.org/gitweb/?p=projs/genkernel.git;a=summary
(2) wolf31o2 - retired Gentoo developer, agaffney - current Gentoo developer, robbat2 - current Gentoo developer
Comment 38 Chris Gianelloni 2008-09-04 19:28:05 UTC
Correct.  As stated before, these patches are not sufficient for inclusion.  It doesn't matter how long the patch sits here in Bugzilla, it isn't going to magically become a candidate for inclusion without being reworked.
Comment 39 devsk 2009-07-11 07:00:43 UTC
(In reply to comment #38)
> Correct.  As stated before, these patches are not sufficient for inclusion.  It
> doesn't matter how long the patch sits here in Bugzilla, it isn't going to
> magically become a candidate for inclusion without being reworked.
> 

Does anybody have any idea who is doing the rework? Its a shame that this support is still not there in genkernel.
Comment 40 Matt 2010-04-02 18:42:19 UTC
any news on this patch ?

was it already included ?
Comment 41 Alon Bar-Lev 2010-11-24 11:03:49 UTC
ping?
Comment 42 Alon Bar-Lev 2010-11-24 11:09:21 UTC
Maybe just add:

 [ -e /etc/initrd.splash ] && . /etc/initrd.splash
+[ -e /etc/user.linuxrc ] && . /etc/user.linuxrc

So people can override functions, such as do_resume.

You cannot totally ignore mobile users, well you did since 2006.
Comment 43 Sebastian Pipping gentoo-dev 2011-01-05 22:37:49 UTC
(In reply to comment #38)
> Correct.  As stated before, these patches are not sufficient for inclusion.  It
> doesn't matter how long the patch sits here in Bugzilla, it isn't going to
> magically become a candidate for inclusion without being reworked.

Makes sense.

Could you describe what a good patch to this problem needs?

PS: Adding keywords Inclusion and "[patch] " prefix to better show this bugs nature in searches...
Comment 44 xiando 2011-01-06 09:07:46 UTC
The kernel supports parameter resume=/dev/swappartation, I recommend not using initrd image unless you really need it for some reason.

a) This bug was opened in 2006. Not yesterday. 2006.
b) Patches to genkernel 3.4 are not welcome beceause we are supposedly waiting for a 3.5 rewrite announced in 2007. Also not yesterday, that's 3 years ago. It will never happen.
c) Git shows no progress on genkernel 3.4.x and there is no 3.5 development being done.

I know this is not a solution for those who need initrd, but if you don't then just don't use genkernel or just comment out the initrd image it makes from grub.conf and suspend to disk works just fine.

Genkernel will apparently be broken until Alon Bar-Lev or some other developer(s) takes over the project. All other distributions support suspend to disk out of the box, users expect it and it is sad that Gentoo will never have genkernel support for it for really redicilous reasons.
Comment 45 Sebastian Pipping gentoo-dev 2011-01-06 19:27:47 UTC
(In reply to comment #44)
> a) This bug was opened in 2006. Not yesterday. 2006.
> b) Patches to genkernel 3.4 are not welcome beceause we are supposedly waiting
> for a 3.5 rewrite announced in 2007. Also not yesterday, that's 3 years ago. It
> will never happen.

I understand und share part of that frustration.


> c) Git shows no progress on genkernel 3.4.x and there is no 3.5 development
> being done.

lxnay and I are currently trying to bring his sabayon patches to genkernel to gentoo, see branch lxnay.  If you have time and will to join genkernel maintenance please contact genkernel@g.o. so we can add you to that mail alias and integrate you with the process.  We could use help on critical review of  patches for instance (bugs assigned to genkernel plus keyword "inclusion").


> I know this is not a solution for those who need initrd, but if you don't then
> just don't use genkernel or just comment out the initrd image it makes from
> grub.conf and suspend to disk works just fine.
> 
> Genkernel will apparently be broken until Alon Bar-Lev or some other
> developer(s) takes over the project. All other distributions support suspend to
> disk out of the box, users expect it and it is sad that Gentoo will never have
> genkernel support for it for really redicilous reasons.

Please help us port their approach over if you can.
I myself am no expert on this area, yet.
Comment 46 Matt 2011-01-19 12:04:32 UTC
a start would be to get the patch working with 3.4.10 or 3.4.11

so that the users (including me) could start / continue using uswsusp (including s2disk) again

I've looked at the patch but unfortunately stuff seems to have changed too much that it would work

anyone willing to help ?

thanks !
Comment 47 Aleksey Kunitskiy 2011-04-30 14:17:43 UTC
Posted new patch here http://bugs.gentoo.org/show_bug.cgi?id=303533
Comment 48 SpanKY gentoo-dev 2012-09-25 04:14:23 UTC
*** Bug 303533 has been marked as a duplicate of this bug. ***
Comment 49 Steve L 2014-06-20 16:23:50 UTC
Created attachment 379324 [details]
swsusp_resume func

(In reply to Aleksey Kunitskiy from comment #47)
> Posted new patch here http://bugs.gentoo.org/show_bug.cgi?id=303533

Thanks Aleksey.

Could you take a look at this rewrite of the swsusp_resume() function in defaults/initrd.scripts? It needs to be tested.

It should be a bit more efficient, though I just wanted to avoid eval. Hopefully it'll be easier to add things to as well.

I put the check for the actual device back in, in line with the older version, though not using ls (cf: http://mywiki.wooledge.org/ParsingLs ) I figured since we're checking /proc/cmdline, then we're bound to Linux, so readlink is permissible.

If the creation of /dev/snapshot is essential, then it should return on failure there, but I don't use any of this, so no idea.

Regards,
steveL.
Comment 50 nic 2018-04-16 04:32:12 UTC
Comment on attachment 379324 [details]
swsusp_resume func

Thank you for sharing this alternative function; I encountered issues with s2disk resumes not working when using swap files on the root of an encrypted luks disk, this deployment scenario requires --resume-offset be passed at boot. With some slight modifications this enabled the functionality for me and I just wanted to share further details if others are stumbling with similar issue.


busybox v1.27.2 readlink does not support -e or -s flags, I replaced with -f. However, since this passes the systems suspend.conf file, you can literally pass resume=garbage and resuming from s2disk will work -- invading that check.

Omitting "-f /etc/suspend.conf"  would add further complexities elsewhere for those needing to set the offset parameters when using swap files. ...some thoughts are to check that we have valid args set before running the resume command? Or why bother and just pass a resume=true arg and read the conf file? or are there scenarios in which one would need to override those values?? Anyway, this still works for me but isn't entirely clean.


Tested against genkernel 3.5.3.2 with an INITRAMFS_OVERLAY (as described within the previous comments to source the binary and config files)



(I apologize if I'm posting on the wrong / old thread, please point me to the latest discussion?)
Comment 51 Francesco Turco 2020-06-23 11:26:06 UTC
Can anyone confirm if this bug is still valid with recent genkernel versions (4.x)?
Comment 52 Mark 2021-05-02 15:15:19 UTC
Genkernel 4.2.1 is missing the resume in swsusp_resume and does neither include it nor the /etc/suspend.conf 

The gentoo wiki correctly displays a warning w/ steps to circumvent this issue (https://wiki.gentoo.org/wiki/Suspend_and_hibernate#Suspend_to_disk).

Not sure if this is the desired solution but patching initrd.scripts and provide an initramfs-overlay works for my gentoo box using LVM w/ encrypted root/swap.