Re: Support for hibernation 2/2: questions

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



On Thu, Feb 20, 2020 at 10:33 AM Kamil Paral <kparal@xxxxxxxxxx> wrote:
>
> On Wed, Feb 19, 2020 at 10:13 PM Chris Murphy <lists@xxxxxxxxxxxxxxxxx> wrote:
>>
>> My test: Fedora Workstation 31, laptop with 8G RAM, 8G swap partition,
>> fill up memory using Firefox tabs pointed to various websites, and
>> then I followed [1] to issue two commands:
>>
>> # echo reboot > /sys/power/disk
>> # echo disk > /sys/power/state
>>
>> I experience twice as many failures as successes. Curiously, the
>> successes show pageout does happen. Before hibernate there is no swap
>> in-use, but after resume ~2GiB swap is in-use and RAM usage is about
>> 50%.
>
>
> Sigh. Turns out this is "my" mistake. 🤦 Hibernation apparently gets affected by sysctl value vm.swappiness, in my case vm.swappiness=0. When the value is zero, the hibernation never swaps out the extra memory over 50% and therefore can't hibernate. When I set it to any positive value (including 1), it works as you described. And all those people on kernel mailing lists probably also used vm.swappiness=0 and didn't realize. This might even be a kernel bug, because the documentation doesn't specify this should affect hibernation behavior, and I'd expect it _should_ affect only live system usage and not hibernation. But I can't really tell.

It can still fail with vm.swappiness=60

https://lore.kernel.org/linux-mm/CAA25o9Q=36fiYHtbpcPPmGEPnORm2ZM7MfqRcsvNxsO0Sys9ng@xxxxxxxxxxxxxx/T/#m68bc843d84284cbd1ea11b543b735ae33e0a8696




-- 
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