Re: Support for hibernation 2/2: questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Fri, Feb 14, 2020 at 4:06 AM Kamil Paral <kparal@xxxxxxxxxx> wrote:
>
> On Thu, Feb 13, 2020 at 11:16 PM Chris Murphy <lists@xxxxxxxxxxxxxxxxx> wrote:
>
>> Reproduce steps for hibernation failing. I don't know if it's as easy
>> as "Launch Firefox, and load 34 pages of bbc.com, then try to
>> hibernate with 'systemctl hibernate'" - and voila, not enough memory
>> error.
>
>
> Yes, in my experience it is that easy. If I look into htop before hibernating and I'm over 50% usage (not counting buffers/cache

I'm not familiar with htop. If I run it without options, I see on the
top left my CPUs followed by "Mem" which seems to be the same thing as
/proc/meminfo's "Active(file):" value (if I divide by 1MiB). Is your
50% usage based on this "Mem" reporting?

There isn't a corresponding value in top, the "Mem ... Used" value is
totally different there.

> Feb 14 12:03:28 titan kernel: PM: hibernation exit
> Feb 14 12:03:28 titan systemd-sleep[3424]: Failed to suspend system. System resumed again: Cannot allocate memory

This is a systemd error, without a corresponding kernel message. So is
it really a kernel complaint or problem? Looking at systemd
./src/sleep/sleep.c

   220            r = write_state(&f, states);
   221            if (r < 0)
   222                    log_struct_errno(LOG_ERR, r,
   223                                     "MESSAGE_ID="
SD_MESSAGE_SLEEP_STOP_STR,
   224                                     LOG_MESSAGE("Failed to
suspend system. System resumed again: %m"),
   225                                     "SLEEP=%s", arg_verb);

I don't see where "Cannot allocate memory" comes from in systemd, but
in the kernel:

./Documentation/admin-guide/sysctl/vm.rst:864:"fork: Cannot allocate
memory". which is in
https://www.kernel.org/doc/html/v5.5/admin-guide/sysctl/vm.html under
user_reserve_kbytes

Default value on Fedora is
$ cat /proc/sys/vm/user_reserve_kbytes
131072
$ cat /proc/sys/vm/overcommit_memory
0

Hmm. Anyway, I'm not sure what's running out of memory or why. Right
before this, hibernation exit comes from

./power/hibernate.c:781:    pr_info("hibernation exit\n");

Looks like it got to here:

   732        error = hibernation_snapshot(hibernation_mode ==
HIBERNATION_PLATFORM);
   733        if (error || freezer_test_done)
   734            goto Free_bitmaps;

*shrug*

It definitely didn't get to writing out the hibernation image.


-- 
Chris Murphy
_______________________________________________
desktop mailing list -- desktop@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to desktop-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/desktop@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Users]     [Fedora KDE]     [Fedora Announce]     [Fedora Docs]     [Fedora Config]     [PAM]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux