On Mi, 12.09.18 20:56, Hans de Goede (hdegoede@xxxxxxxxxx) wrote: > That commit does not really contain any rationale as to why this is a > good idea, the commit msg basically just says "it is available now, > lets use it". > > The kernel's hibernate paths are generally much less tested then > the suspend/resume paths and even suspend/resume already causes > a lot of problems. > > This is going to lead to some very "interesting" problems where > systems will not wakeup properly from suspend but only when suspended > during the night, etc. > > IMHO this is a bad idea and it should be reverted. At a minimum we > need to keep a close eye on this and disable this by default if > it causes to much problems. I am bit concerned about this too. The s2h code in systemd has been contributed by Ubuntu folks, but as I just learnt it doesn't even work entirely correctly there... The big issue afaics is that some non-trivial parts are still missing on the resume side of things (i.e. entering hibernation is mostly complete, but leaving hibernation is messy), and we need more safety checks to figure out when this all is known to be safe. The Ubuntu folks don't use dracut as ther initrd, but use some ubunut/debian specific initrd that doesn't use systemd, so they hacked the resume code fully into that, but we are still missing the same bits in our codepaths... Moreover, I really don't like the idea that resume= and resume_offset= has to be specified on the kernel cmdline for picking the swap partition/file. We really should make this nicer and automatically detect everything, so that this all works safely even with an empty kernel cmdline. Hence, I think this is too early to enable in Fedora I think. So far hibernation was something that Fedora/RH didn't care too much about as I understood, so it never was a priority for us to implement comprehensively, and only merged contributed patches. Before we hook this all into Fedora properly we should really do our homework comprehensively, and add the missing bits to make this safe. (And that's just the concerns on the systemd side of things. There's also the problem that the kernel code isn't the best tested in the world since afaik no bigger distribution defaulted to hibernation so far. But I guess this shouldn't stop us from turning it on in Rawhide at least) So, here's what I think needs to be dealt with first on the systemd side: 1. make systemd's resume support independent of resume= and resume_offset= on the kernel cmdline, i.e. add auto-detection of hibrenation images on boot, and add support for a "noresume" kernel cmdline option to disable that auto-detection and such. (i.e. make this automatic and independent of anaconda) 2. tighten the checks when this all is safe, i.e. filter out swap on weird storage 3. figure out what to do about swap on luks (maybe simply refuse in that case, i.e. treat as "weird storage") 4. make sure that resume from swap files works (it currently certainly does not) 5. add a nice way to disable this locally and revert back to plain suspend (with input from Zbigniew) With the above systemd changes it's probably fine to start enabling this in Rawhide for some testing, but it's definitely something that needs announcement and a clear path to reverting this before the release, and moving back to plain suspend. (i figure it might be something to file a fedora feature about, too) Also, I'd be interested in a fedora kernel maintainer's opinion on this, if they thing this is something supportable. Lennart -- Lennart Poettering, Red Hat _______________________________________________ desktop mailing list -- desktop@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to desktop-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/desktop@xxxxxxxxxxxxxxxxxxxxxxx