<p dir="ltr"><br>
On 15 May 2016 06:32, "Andrei Borzenkov" <<a href="mailto:arvidjaar@gmail.com">arvidjaar@gmail.com</a>> wrote:<br>
><br>
> 15.05.2016 06:36, Chris Murphy пишет:<br>
> > On Thu, May 12, 2016 at 12:38 PM, James Hogarth <<a href="mailto:james.hogarth@gmail.com">james.hogarth@gmail.com</a>> wrote:<br>
> >><br>
> >> On 2 May 2016 18:58, "James Hogarth" <<a href="mailto:james.hogarth@gmail.com">james.hogarth@gmail.com</a>> wrote:<br>
> >>><br>
> >>><br>
> >>> On 24 Apr 2016 21:31, "poma" <<a href="mailto:pomidorabelisima@gmail.com">pomidorabelisima@gmail.com</a>> wrote:<br>
> >>>><br>
> >>>> On 20.04.2016 22:42, Chris Murphy wrote:<br>
> >>>>> On Wed, Apr 20, 2016 at 1:50 PM, Tobias Hunger<br>
> >>>>> <<a href="mailto:tobias.hunger@gmail.com">tobias.hunger@gmail.com</a>> wrote:<br>
> >>>><br>
> >>>> [...]<br>
> >>>><br>
> >>>>> Anyway, the most complete solution for BIOS, UEFI, and UEFI Secure<br>
> >>>>> Boot systems, is fast startups as possible (which helps all kinds of<br>
> >>>>> use cases not just desktops), and then encourage DE's and app makers<br>
> >>>>> to support apps that save their own state without users having to<br>
> >>>>> manually save files, and default to power off in low battery cases.<br>
> >>>>><br>
> >>>>> I guess opensuse has some patches that aren't upstream yet that<br>
> >>>>> support signed hibernation images for UEFI Secure Boot?  Maybe there's<br>
> >>>>> a way forward at some point. But right now I'm just not seeing it.<br>
> >>>>> There's some kind of brick wall in every direction with hibernation.<br>
> >>>>><br>
> >>>><br>
> >>>> :)<br>
> >>>> "Lacus Hiemalis Edictum" patch-set actually existed for several years.<br>
> >>>><br>
> >>>> ...<br>
> >>><br>
> >>> <snip><br>
> >>><br>
> >>> There is something that can be done in systemd to avoid the data loss<br>
> >>> issue without having to add complexity to the generator.<br>
> >>><br>
> >>> Add to the logind conditions for suspend-to-disk an additional one to the<br>
> >>> existing ones to ensure resume= is in the kernel cmdline.<br>
> >>><br>
> >>> If it's not there refuse the hibernate and shutdown instead. At least then<br>
> >>> the processes would get shutdown properly with a TERM and not have a power<br>
> >>> cord pull situation (with sync) on them.<br>
> >>><br>
> >>> That would be minimal change from present but avoid writing a resume image<br>
> >>> that will never be read.<br>
> >><br>
> >> Since this seemed a nice solution to the problem, and it appeared to make<br>
> >> sense to validate the kernel argument would be there ready for the generator<br>
> >> for the resume before allowing the hibernate through logind there's patches<br>
> >> for Fedora and upstream systemd on this bug:<br>
> >><br>
> >> <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1332266">https://bugzilla.redhat.com/show_bug.cgi?id=1332266</a><br>
> >><br>
> >> I've tested the F23 build with the patch on my laptop and it behaves as I'd<br>
> >> expect for an invalid resume=, no resume= and as valid resume=<br>
> ><br>
> > Seems like resume= should be checked to make sure the specified device<br>
> > exists/is-valid for holding a hibernation image; just as important as<br>
> > checking /sys/power/state and /sys/power/disk.<br>
> ><br>
><br>
> Both dracut and initramfs-tools can embed resume device information into<br>
> initrd and do not require resume= on kernel command line. Refusing<br>
> hibernation in this case will break these configurations.</p>
<p dir="ltr">Perhaps a configuration entry in logind.conf in the event the kernel docs of resume= aren't going to be used, such as in the dracut or initramfs-tools examples you give?</p>
<p dir="ltr">Those who don't want to use the systemd hibernate generator to resume can disable the resume= check using that?</p>