Bug#890950: Bug#902416: Bug#890950: RE: Bug#902416: systemd: systemctl hibernate: unable to resume after upgrade

2019-03-10 Thread Ben Hutchings
On Mon, 2019-03-11 at 00:20 +0100, Michael Biebl wrote:
> Hi Ben
> 
> Am 10.03.19 um 23:17 schrieb Ben Hutchings:
> > I think it would make sense for systemd to only set the hibernation
> > device if it's not already set (i.e. if /sys/power/resume contains
> > "0:0\n").
> 
> I get $ cat /sys/power/resume
> 8:4
> 
> which part is responsible for setting that?

initramfs-tools, or any alternative that implements resume from
hibernation.  This is because writing to /sys/power/resume is the way
to resume from hibernation, as well as the way to set the device for
the next hibernation.  (systemd writes the number of an active swap
device, so it won't cause an immediate resume.)

Ben.

-- 
Ben Hutchings
The program is absolutely right; therefore, the computer must be wrong.




signature.asc
Description: This is a digitally signed message part


Bug#890950: Bug#902416: Bug#890950: RE: Bug#902416: systemd: systemctl hibernate: unable to resume after upgrade

2019-03-10 Thread Michael Biebl
Hi Ben

Am 10.03.19 um 23:17 schrieb Ben Hutchings:
> I think it would make sense for systemd to only set the hibernation
> device if it's not already set (i.e. if /sys/power/resume contains
> "0:0\n").

I get $ cat /sys/power/resume
8:4

which part is responsible for setting that?

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#890950: RE: Bug#902416: systemd: systemctl hibernate: unable to resume after upgrade

2019-03-10 Thread Ben Hutchings
On Sun, 2019-03-10 at 19:25 +0100, Michael Biebl wrote:
> Hi Mario,
> 
> 
> On Fri, 6 Jul 2018 12:41:37 +  wrote:
[...]
> > Yes I could see two swap partitions causing the wrong one to be picked.
> > It's trying to select the bigger of the two.
> > 
> > If they don't match the one you're putting in 
> > /etc/initramfs-tools/conf.d/resume
> > then that would cause problems.  Please do confirm if you switch what's in
> > initramfs conf.d/resume that the problem is fixed.
> > 
> > Really matching code is needed for the initramfs-tools.  I submitted some 
> > patches
> > that may help here.  You can refer to them at the end of this bug report:
> > 
> 
> Somehow we dropped the ball here.
> What's the state regarding those initramfs-tools patches?
> Is there a chance to get them into buster?
> If not, should we revert commit
> https://github.com/systemd/systemd/commit/17c40b3a8fbfb797110c88d749bd5
> 
> What do you suggest? The current situation doesn't seem ideal.

I think it would make sense for systemd to only set the hibernation
device if it's not already set (i.e. if /sys/power/resume contains
"0:0\n").

Ben.

-- 
Ben Hutchings
The program is absolutely right; therefore, the computer must be wrong.




signature.asc
Description: This is a digitally signed message part


Bug#890950: RE: Bug#902416: systemd: systemctl hibernate: unable to resume after upgrade

2019-03-10 Thread Michael Biebl
Hi Mario,


On Fri, 6 Jul 2018 12:41:37 +  wrote:
> > -Original Message-
> > From: Michael Biebl [mailto:bi...@debian.org]
> > Sent: Friday, July 6, 2018 5:46 AM
> > To: Joel Cross; 902...@bugs.debian.org; Limonciello, Mario
> > Subject: Re: Bug#902416: systemd: systemctl hibernate: unable to resume 
> > after
> > upgrade
> > 
> > Am 06.07.2018 um 12:32 schrieb Joel Cross:
> > > On Thu, 5 Jul 2018, at 1:17 PM, Michael Biebl wrote:
> > >> Am 05.07.2018 um 13:46 schrieb Joel Cross:
> > >>> Yes, I can confirm, after downgrading to 238-5 (I also downgraded the
> > libsystemd0, udev and libudev0 packages) that I no longer experience the 
> > issue.
> > >>
> > >> Do you know how to use git bisect? If so, it would be great if you can
> > >> find the offending commit in systemd-sleep. There aren't that many.
> > >>
> > >> If not, please upgrade to v239 again, unpack the binary from the
> > >> attached zip file and run
> > >> sudo ./systemd-sleep hibernate
> > >>
> > >> (this binary disables a certain commit which I suspect might be what's
> > >> causing your trouble).
> > > Hibernate seems to work fine with the binary that you attached.
> > >
> > 
> > So, the offending commit seems to be
> > 
> > https://github.com/systemd/systemd/commit/17c40b3a8fbfb797110c88d749bd5
> > d37e6ee6e3c#diff-f1a8ef48b9daffd7280cdacb9044c80f
> > 
> > I'm bringing Mario into the loop here, the author of this commit.
> > Mario, please see
> > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=902416 for the
> > complete bug report.
> > Do you have any idea why this commit could break hibernate/resume for Joel?
> > 
> > Joel, I see you have multiple swap partitons defined in
> > https://bugs.debian.org/cgi-
> > bin/bugreport.cgi?att=4;bug=902416;filename=fstab;msg=5
> > 
> > Which one of those is setup as your resume partition in
> > /etc/initramfs-tools/conf.d/resume?
> > 
> > Mario, could the systemd code be confused by the existence of two swap
> > partitions and pick the wrong one?
> > 
> > --
> > Why is it that all of the instruments seeking intelligent life in the
> > universe are pointed away from Earth?
> 
> Yes I could see two swap partitions causing the wrong one to be picked.
> It's trying to select the bigger of the two.
> 
> If they don't match the one you're putting in 
> /etc/initramfs-tools/conf.d/resume
> then that would cause problems.  Please do confirm if you switch what's in
> initramfs conf.d/resume that the problem is fixed.
> 
> Really matching code is needed for the initramfs-tools.  I submitted some 
> patches
> that may help here.  You can refer to them at the end of this bug report:
> 

Somehow we dropped the ball here.
What's the state regarding those initramfs-tools patches?
Is there a chance to get them into buster?
If not, should we revert commit
https://github.com/systemd/systemd/commit/17c40b3a8fbfb797110c88d749bd5

What do you suggest? The current situation doesn't seem ideal.

Regards,
Michael

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature