Guix cannot resume after hibernation

  • Done
  • quality assurance status badge
Details
5 participants
  • Josselin Poiret
  • Ludovic Courtès
  • Tobias Geerinckx-Rice
  • Mekeor Melire
  • Yusuf Talha
Owner
unassigned
Submitted by
Yusuf Talha
Severity
normal
Y
Y
Yusuf Talha wrote on 4 Sep 2022 18:37
(name . Bug Guix)(address . bug-guix@gnu.org)
NB8MLyo--3-2@tuta.io
Hello.  I'm using Guix System on my Librebooted Thinkpad X200 laptop.  Suspending to RAM works perfectly.  The problem is, when I run "loginctl hibernate" it writes to the swap partition and powers off successfully.  But when I try to boot up and resume from swap, it just ignores it and starts up like it wasn't hibernated before.  And also I have to run "sudo swapon /dev/mapper/matrix-swapvol" to re-enable my swap partition.  swapon says:
"swapon: /dev/mapper/matrix-swapvol: software suspend data detected. Rewriting the swap signature."

I have added "resume=/dev/mapper/matrix-swapvol" to the kernel-arguments list in config.scm.
In addition to that, I see these messages on the dmesg log (I have no idea what they mean):

[    0.068782] PM: hibernation: Registered nosave memory: [mem 0x00000000-0x00000fff]
[    0.068788] PM: hibernation: Registered nosave memory: [mem 0x000a0000-0x000fffff]
[    0.068791] PM: hibernation: Registered nosave memory: [mem 0x7d74a000-0x7d7fffff]
[    0.068794] PM: hibernation: Registered nosave memory: [mem 0x7d800000-0x93ffffff]
[    0.068796] PM: hibernation: Registered nosave memory: [mem 0x94000000-0xefffffff]
[    0.068798] PM: hibernation: Registered nosave memory: [mem 0xf0000000-0xf3ffffff]
[    0.068800] PM: hibernation: Registered nosave memory: [mem 0xf4000000-0xffffffff]
I haven't encountered this problem on any other distros.  You probably realized that I encrypted my disk.  Hibernation wasn't working while I was using Guix without encryption a few months ago either.  So I don't think LUKS is the problem here.

I would be glad if you can help me with that.  Thanks in advance.
J
J
Josselin Poiret wrote on 4 Sep 2022 19:19
87bkrvawgp.fsf@jpoiret.xyz
Hi Yusuf,

Yusuf Talha via Bug reports for GNU Guix <bug-guix@gnu.org> writes:

Toggle quote (2 lines)
> I haven't encountered this problem on any other distros.  You probably realized that I encrypted my disk.  Hibernation wasn't working while I was using Guix without encryption a few months ago either.  So I don't think LUKS is the problem here.

From what I can tell, resuming from an encrypted partition isn't
currently supported. This could potentially be done, though it's not my
priority right now (and testing these kinds of features is dangerous,
you could make a wrong move and incur heavy data loss).

Best,
--
Josselin Poiret
T
T
Tobias Geerinckx-Rice wrote on 5 Sep 2022 14:13
(name . Yusuf Talha)(address . yusuftalha@tuta.io)
87a67egfvv.fsf@nckx
Hi Yusuf, Ludo',

Josselin is right that resuming from encrypted swap isn't
supported.

Yusuf Talha via Bug reports for GNU Guix ???
Toggle quote (4 lines)
> Hibernation wasn't working
> while I
> was using Guix without encryption a few months ago either.

To have any hope of debugging this one, we'll need information.

For example, what *exactly* did you specify as resume partition?
IIRC we try parsing it as /dev/name, UUID, or file system label
(almost certainly not in that order, obviously).

In #guix, Ludovic recently noted the same in passing, but so far
has managed to dodge my pleas for moreinfo :-)

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYxXslA0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15eCYBAOG4BoFXN84smDVA/GFzY6uS4HULDYaR/s2Q4ZSb
FVTHAP4ujpzb2W2mRLGfGUxOIPGj2Kg55LSrN0oN59H68X0RDw==
=kzMy
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 5 Sep 2022 14:51
(name . Josselin Poiret)(address . dev@jpoiret.xyz)
87h71m3rx1.fsf@gnu.org
Hi,

Josselin Poiret <dev@jpoiret.xyz> skribis:

Toggle quote (9 lines)
> Yusuf Talha via Bug reports for GNU Guix <bug-guix@gnu.org> writes:
>
>> I haven't encountered this problem on any other distros.  You probably realized that I encrypted my disk.  Hibernation wasn't working while I was using Guix without encryption a few months ago either.  So I don't think LUKS is the problem here.
>
>>From what I can tell, resuming from an encrypted partition isn't
> currently supported. This could potentially be done, though it's not my
> priority right now (and testing these kinds of features is dangerous,
> you could make a wrong move and incur heavy data loss).

I believe this is fixed by this:


Jack, do I get it right?

The patch in question fell through the cracks, but it actually LGTM.

Thanks,
Ludo’.
T
T
Tobias Geerinckx-Rice wrote on 5 Sep 2022 14:38
(name . Josselin Poiret)(address . dev@jpoiret.xyz)
871qsqgexl.fsf@nckx
Hi again,

Josselin Poiret via Bug reports for GNU Guix ???
Toggle quote (4 lines)
> (and testing these kinds of features is
> dangerous,
> you could make a wrong move and incur heavy data loss)

I couldn't agree moEXT4-fs ext4_get_branch:171: inode #8: block
30343695: comm jbd2/sdb7-8: invalid block
Aborting journal on device sdb7-8.

…ya know, I actually wrote a patch that I thought I'd submitted,
but apparently not? Or I'm failing to use Mumi again.

We should scan all swap areas for the S1SUSPEND signature, and do
a much better thing than the current behaviour if we find one.

I'll see if I can find it in a backup somewhEXT4-fs (sdb7):
Remounting filesystem read-only

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYxXxZg0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15Na0BAOyMzF+/MeWvmcL0QLtFiVZYtVJsBJ6tvXrl9apN
JXi7APwLmL6CLtCinI1oR+JExID5J9CQo5cGgxYnH+VmUCuXDg==
=kYl7
-----END PGP SIGNATURE-----

T
T
Tobias Geerinckx-Rice wrote on 5 Sep 2022 15:05
(name . Ludovic Courtès)(address . ludo@gnu.org)
87wnaiezj2.fsf@nckx
Jack, Yusuf, Ludo',

Yusuf: you could try pulling, reconfiguring, hibernating, and
resuming, if you're brave-ish.

Ludovic Courtès ???
Toggle quote (3 lines)
> I believe this is fixed by this: […] The patch in question fell
> through the cracks

It should and it had, sorry.

I *dislike* the fact that this makes the resume path no longer
trivially obviously correct — because we now actually do something
potentially useful (and hence, dangerous) during it — but that's
unavoidable I suppose. It's certainly not the fault of this
patch.

Pushed as ec16f88522041dc285a35705ff9ee95672b78143, thanks Jack!

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYxX1oQ0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW150cYA/3ZS6cUFlwn+9Q7MDVcWwHPe1Kbi4BHjtXrw5BZP
ZS/fAQCId35XEGp8/W1LizS/imQg14KfTLyfPyddJ6Xs1hV2Dw==
=uYzh
-----END PGP SIGNATURE-----

Y
Y
Yusuf Talha wrote on 6 Sep 2022 04:23
(address . 57583@debbugs.gnu.org)
NBFaw2H--3-2@tuta.io
I installed Guix again on unencrypted partition and now it works.  I guess I forgot to add necessary kernel arguments at the previous unencrypted setup.  Encryption decreased system's performance significantly anyway...

You know the best about what to do with this issue.  Thanks for your precious time.
M
M
Mekeor Melire wrote on 10 Dec 2022 02:11
(address . 57583@debbugs.gnu.org)
87h6y4oy92.fsf@posteo.de
2022-09-05 15:05 bug-guix@gnu.org:

Toggle quote (5 lines)
> Jack, Yusuf, Ludo',
>
> Yusuf: you could try pulling, reconfiguring, hibernating, and resuming, if
> you're brave-ish.

I also use an X200 (but not with Libreboot, yet). I just tried out
hibernation (I didn't even know I had to be brave for that :D) and it
worked like a charm. So, I'll attempt to close this bug now. Feel free
to re-open, if you're still experiencing the bug, Yusuf.

Toggle quote (5 lines)
> Ludovic Courtès ???
> > I believe this is fixed by this: […] The patch in question fell
> > through the cracks
>
> Pushed as ec16f88522041dc285a35705ff9ee95672b78143, thanks Jack!
?