Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 835866 - sys-auth/elogind: hibernate with loginctl fails with "cannot allocate memory"
Summary: sys-auth/elogind: hibernate with loginctl fails with "cannot allocate memory"
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-23 21:25 UTC by Adam
Modified: 2022-04-20 02:54 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam 2022-03-23 21:25:47 UTC
I've recently been encountering errors hibernating with loginctl hibernate. It tries for about 15 seconds and then just returns me to my lock screen. I am on kernel 5.15.26 and my swap/root are mounted in separate LUKS partitions, but that shouldn't be a problem as this configuration has worked fine for me in the past.

dmesg -W reports the following:

[45496.827344] elogind-daemon[3619]: Suspending system...
[45496.827382] PM: hibernation: hibernation entry
[45496.827525] Loading firmware: iwlwifi-3160-17.ucode
[45496.827681] Loading firmware: regulatory.db
[45496.827687] Loading firmware: regulatory.db.p7s
[45496.855240] Filesystems sync: 0.002 seconds
[45496.855251] Freezing user space processes ... (elapsed 0.002 seconds) done.
[45496.857797] OOM killer disabled.
[45496.857996] PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff]
[45496.858002] PM: hibernation: Marking nosave pages: [mem 0x0009f000-0x000fffff]
[45496.858008] PM: hibernation: Marking nosave pages: [mem 0x7aa59000-0xffffffff]
[45496.863257] PM: hibernation: Basic memory bitmaps created
[45496.863269] PM: hibernation: Preallocating image memory
[45524.789601] PM: hibernation: Image allocation is 146105 pages short
[45525.009955] PM: hibernation: Basic memory bitmaps freed
[45525.009958] OOM killer enabled.
[45525.009959] Restarting tasks ... done.
[45525.010684] video LNXVIDEO:00: Restoring backlight state
[45525.156368] PM: hibernation: hibernation exit
[45526.394990] elogind-daemon[3619]: Failed to suspend system. System resumed again: Cannot allocate memory
[45528.480151] (sd-executor)[1940]: /lib64/elogind/system-sleep/50-intel-undervolt failed with exit status 1.

I suspect it may have something to do with a recent kernel upgrade I made, because It was working a couple of months ago with a previous kernel, but I tried a couple of different kernels and it doesn't work anymore. So the problem is probably with elogind or something
Comment 1 Jonas Stein gentoo-dev 2022-03-23 21:41:07 UTC
It is sad to read that you have problems with the software. The situation seems to be a bit more complicate and requires some analysis.
We can not help you efficiently via bug tracker. The bug tracker aims rather on specific problems in .ebuilds and less on individual systems. 

I have had very good experience on the gentoo IRC [1] with questions like this. Of course there are also forums and mailing lists [2,3].
I hope you understand, that I will close the bug here therefore and wish you good luck on one of the mentioned channels [4].
Please reopen the ticket in order to provide an indication for an specific error in an ebuild or any gentoo related product.

[1] https://www.gentoo.org/get-involved/irc-channels/
[2] https://forums.gentoo.org/
[3] https://www.gentoo.org/get-involved/mailing-lists/all-lists.html
[4] https://www.gentoo.org/support/
Comment 2 Adam 2022-04-20 02:54:18 UTC
I decided to take another look at this. Turns out this issue was on this line:

[45528.480151] (sd-executor)[1940]: /lib64/elogind/system-sleep/50-intel-undervolt failed with exit status 1.

I had mis-configured the sys-power/intel-undervolt package and there's a script at that location (You'd think that anything in /lib64 is a 64-bit binary, no?) that evidently fails and causes OpenRC to panic. As insult to injury it would also unload my damn wifi firmware as indicated by a previous line.

I know you've closed the issue (next time I should just post my issues on OpenRC's bug tracker or another relevant forum) but I'd like to leave my solution here for anyone who might stumble across a similar issue.