unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Mekeor Melire <mekeor@posteo.de>
To: guix-devel@gnu.org
Cc: Ivan Vilata i Balaguer <ivan@selidor.net>,
	Tobias Geerinckx-Rice <me@tobias.gr>
Subject: Re: Status of hibernation (suspend to disk) in Guix
Date: Sat, 10 Dec 2022 01:00:24 +0000	[thread overview]
Message-ID: <87lengoymq.fsf@posteo.de> (raw)
In-Reply-To: <87bkockw84.fsf@posteo.de>

2022-12-09 23:10 mekeor@posteo.de:

> 2022-12-05 17:23 ivan@selidor.net:
>
> > in #59746 I skipped documenting `resume_offset` with more detail, even
> > if it's needed for resuming from a swap file. The reason is that
> > according to [swsusp doc][1], some specific tool may be needed to
> > compute the swap file offset. There is [swap-offset][2] from the
> > uswsusp suite, which is missing from Guix and no longer shipped with
> > Debian.
>
> What about the "filefrag" executable from the "e2fsprogs" package.
> According to this article, it can be used in place of the deprecated
> uswsusp suite:
>
> https://www.linuxuprising.com/2021/08/how-to-enable-hibernation-on-ubuntu.html

I just tried this out. And it worked like a charm! I have hibernated and
resumed successfully - first time with Guix System. I'm so happy :)

Would you like to add instructions for swap-files to your
patch-series #59746?

What I did: First, determine offset:

--8<---------------cut here---------------start------------->8---
$ sudo filefrag -v /swapfile
Filesystem type is: ef53
File size of /swapfile is 1717986918 (4194304 blocks of 4096 bytes)
 ext:     logical_offset:        physical_offset: length:   expected: flags:
   0:        0..       0:    5308416..   5308416:      1:
--8<---------------cut here---------------end--------------->8---

Then, use offset in operating-system declaration:

--8<---------------cut here---------------start------------->8---
  (kernel-arguments
    (cons*
      "resume=/dev/mapper/cryptroot"
      "resume_offset=5308416"
      %default-kernel-arguments))
--8<---------------cut here---------------end--------------->8---

Caveat: IIUC, this does not work with Btrfs.


  reply	other threads:[~2022-12-10  1:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02 20:12 Status of hibernation (suspend to disk) in Guix Ivan Vilata i Balaguer
2022-12-02 20:32 ` Tobias Geerinckx-Rice
2022-12-05 16:23   ` Ivan Vilata i Balaguer
2022-12-09 23:10     ` Mekeor Melire
2022-12-10  1:00       ` Mekeor Melire [this message]
2022-12-12 20:11         ` Ivan Vilata i Balaguer
2022-12-14  9:43           ` Ivan Vilata i Balaguer
2022-12-21 12:27             ` Ivan Vilata i Balaguer
2023-01-07 11:36               ` Ivan Vilata i Balaguer
2022-12-09 20:52   ` Mekeor Melire
2022-12-09 21:16     ` Jack Hill
  -- strict thread matches above, loose matches on Subject: below --
2022-12-15  6:55 Nathan Dehnel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lengoymq.fsf@posteo.de \
    --to=mekeor@posteo.de \
    --cc=guix-devel@gnu.org \
    --cc=ivan@selidor.net \
    --cc=me@tobias.gr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).