<p dir="ltr"><br>
On 19 Apr 2016 08:05, "Andrei Borzenkov" <<a href="mailto:arvidjaar@gmail.com">arvidjaar@gmail.com</a>> wrote:<br>
><br>
> On Tue, Apr 19, 2016 at 9:45 AM, James Hogarth <<a href="mailto:james.hogarth@gmail.com">james.hogarth@gmail.com</a>> wrote:<br>
><br>
> ><br>
> > Seeing as systemd decides the swap to hibernate to in the first place, can't<br>
><br>
> No, it does not. Device to hibernate to is set by previous attempt to<br>
> resume from. This device must come from somewhere. Last device someone<br>
> attempted to resume from will be used in subsequent attempt to<br>
> hibernate.<br>
><br>
> So I would definitely be against anyone blindly poking around at every<br>
> available partition because later kernel will overwrite content of<br>
> this partition when hibernation is requested.<br>
></p>
<p dir="ltr">I agree that would be messy. What about the first hibernation when no previous resume has occurred?<br></p>
<p dir="ltr">> > the same logic be used to locate the swap to resume from?<br>
><br>
> There is no logic here. User decides where to resume from and later<br>
> the same device is used to hibernate to.<br>
><br>
> systemd already has all needed knobs to configure this. Is there any<br>
> reason you refuse to use these knobs?</p>
<p dir="ltr">Well it has to pick something the first time.</p>
<p dir="ltr">I would urge you to read the bug and the relevant blocker discussion notes.</p>
<p dir="ltr">I've added resume= to my cmdline and am happy with that, however every Fedora user who is not specifically aware of the need to do that has a broken hibernate, with the upower configuration being to hybrid sleep (so effectively hibernate) when battery levels are critical.</p>
<p dir="ltr">The "broken default application behaviour" could be "fixed" by changing upower to shutdown instead. The user would then be notified of the shutdown and not that hibernate would happen. This would satisfy the Fedora release criteria but would still leave a broken systemctl hibernate with an unintuitive fix. It would also mean the big "don't change this file" warning in Upower.conf would put people off enabling that behaviour, but to be honest is out of the scope of this issue.</p>
<p dir="ltr">It could also be fixed by anaconda adding resume= to the grub configuration like it already has to for the root device. The anaconda developers have already pushed against this and it would only fix fresh installs anyway.</p>
<p dir="ltr">Dracut thought they'd fix it in cmdline but of course that doesn't act in a way any others can tell the changes.</p>
<p dir="ltr">This leaves systemd as the component that has generator and the actual code that loads the resume image info the kernel.</p>
<p dir="ltr">Although I'm fine I'd like to see other Fedora users not have a broken behaviour on their systems.</p>
<p dir="ltr">Given your insights it would be valuable if you, or another systemd dev, would comment on the bug with the problem of "fixing the generator" so we can work out where the correct fix lies and the appropriate maintenance team to fix it.</p>