<p dir="ltr"><br>
On 19 Apr 2016 04:53, "Andrei Borzenkov" <<a href="mailto:arvidjaar@gmail.com">arvidjaar@gmail.com</a>> wrote:<br>
><br>
> 19.04.2016 01:19, James Hogarth пишет:<br>
> > Hi all,<br>
> ><br>
> > There's been some discussion today about the impact of<br>
> > <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1206936">https://bugzilla.redhat.com/show_bug.cgi?id=1206936</a> and where the problem<br>
> > actually lies.<br>
> ><br>
> > The issue lies specifically with hibernate and affects all Fedora systems<br>
> > regardless of hardware (it's reproducible in a VM).<br>
> ><br>
> > The hibernate image gets written to swap correctly<br>
> > but hibernate-resume-generator.c looks specifically for 'resume' in<br>
> > /proc/cmdline to determine a) if any check shoudl even happen and b) which<br>
> > block device to check.<br>
> ><br>
> > When Fedora is installed anaconda does not write a resume= line<br>
> > to GRUB_CMDLINE_LINUX in /etc/default/grub or to the default kernel stanza<br>
> > for grubby to later duplicate.<br>
> ><br>
> > Dracut cmdline module does produce a resume= line but it appears this<br>
> > occurs too late for the generator to pick up.<br>
> ><br>
><br>
> dracut cmdline is internal to dracut, so external programs do not see it.<br>
></p>
<p dir="ltr">That would explain it, however it's somewhat confusing on the bug that dracut was pointed to as a place for a fix and the requests for dracut --print-cmdline if it had no affect.</p>
<p dir="ltr">> > The end result is that without manual intervention to add an appropriate<br>
> > resume= line it's impossible to resume from hibernation on Fedora, and the<br>
> > critical battery behaviour (configured via /etc/Upower/Upower.conf and<br>
> > visible in upower -d) is to HybridSleep.<br>
> ><br>
> > Is it feasible for systemd to have the generator pick a swap image<br>
> > regardless of resume being present or not? If so the dracut cmdline coming<br>
> > later than the hibernate generator wouldn't be a problem.<br>
> ><br>
><br>
> Well, TBH the simplest solution is really to add resume= to kernel<br>
> command line. Otherwise let dracut install own generator that does<br>
> exactly the same when resume= is missing as real kernel parameter. In<br>
> both cases I do not think it is something that needs to be implemented<br>
> in systemd.</p>
<p dir="ltr">The generator and the actual resume is already in systemd and the anaconda folks on the bug did not think it should be with them and that adding resume= would not be the correct fix (of course that additionally has the issue if fixed there of the current broken installs and how anaconda only creates that file on install).</p>
<p dir="ltr">Seeing as systemd decides the swap to hibernate to in the first place, can't the same logic be used to locate the swap to resume from?<br>
</p>