From unknown Thu Aug 21 12:09:56 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#49475 <49475@debbugs.gnu.org> To: bug#49475 <49475@debbugs.gnu.org> Subject: Status: [PATCH] linux-boot: Resume from hibernation after pre-boot. Reply-To: bug#49475 <49475@debbugs.gnu.org> Date: Thu, 21 Aug 2025 19:09:56 +0000 retitle 49475 [PATCH] linux-boot: Resume from hibernation after pre-boot. reassign 49475 guix-patches submitter 49475 Jack Hill severity 49475 normal tag 49475 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 08 22:49:18 2021 Received: (at submit) by debbugs.gnu.org; 9 Jul 2021 02:49:18 +0000 Received: from localhost ([127.0.0.1]:57963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1gZq-0007DR-2r for submit@debbugs.gnu.org; Thu, 08 Jul 2021 22:49:18 -0400 Received: from lists.gnu.org ([209.51.188.17]:35666) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1gZm-0007DI-GO for submit@debbugs.gnu.org; Thu, 08 Jul 2021 22:49:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1gZm-0004a9-43 for guix-patches@gnu.org; Thu, 08 Jul 2021 22:49:14 -0400 Received: from minsky.hcoop.net ([104.248.1.95]:52226) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1gZk-00039D-5q for guix-patches@gnu.org; Thu, 08 Jul 2021 22:49:13 -0400 Received: from libre-01.lib.duke.edu ([152.3.119.171] helo=guix-part-test.network) by minsky.hcoop.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1gZi-0008KE-A8; Thu, 08 Jul 2021 22:49:10 -0400 From: Jack Hill To: guix-patches@gnu.org Subject: [PATCH] linux-boot: Resume from hibernation after pre-boot. Date: Thu, 8 Jul 2021 22:48:53 -0400 Message-Id: <20210709024853.1170-1-jackhill@jackhill.us> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=104.248.1.95; envelope-from=jackhill@jackhill.us; helo=minsky.hcoop.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: Tobias Geerinckx-Rice X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) * gnu/build/linux-boot.scm (boot-system): Call resume-if-hibernated after pre-mount. --- This change allows resuming from a swap device that needs device-mapper to be set up first. In my case I tested swap on lvm on dm-crypt. I believe this change to be safe since pre-mount shouldn't mount or otherwise touch the filesystems. It it did, there would be data corruption, so special care should be taken when reviewing. gnu/build/linux-boot.scm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm index 461df9ff46..778ee99690 100644 --- a/gnu/build/linux-boot.scm +++ b/gnu/build/linux-boot.scm @@ -563,15 +563,6 @@ upon error." (load-linux-modules-from-directory linux-modules linux-module-directory) - (unless (or (member "hibernate=noresume" args) - ;; Also handle the equivalent old-style argument. - ;; See Documentation/admin-guide/kernel-parameters.txt. - (member "noresume" args)) - ;; Try to resume immediately after loading (storage) modules - ;; but before any on-disk file systems have been mounted. - (false-if-exception ; failure is not fatal - (resume-if-hibernated (find-long-option "resume" args)))) - (when keymap-file (let ((status (system* "loadkeys" keymap-file))) (unless (zero? status) @@ -606,6 +597,15 @@ upon error." (unless (pre-mount) (error "pre-mount actions failed"))) + (unless (or (member "hibernate=noresume" args) + ;; Also handle the equivalent old-style argument. + ;; See Documentation/admin-guide/kernel-parameters.txt. + (member "noresume" args)) + ;; Try to resume immediately after loading (storage) modules + ;; but before any on-disk file systems have been mounted. + (false-if-exception ; failure is not fatal + (resume-if-hibernated (find-long-option "resume" args)))) + (setenv "EXT2FS_NO_MTAB_OK" "1") (if root-device -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 08 23:36:01 2021 Received: (at submit) by debbugs.gnu.org; 9 Jul 2021 03:36:01 +0000 Received: from localhost ([127.0.0.1]:58024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1hJ2-0008MK-QO for submit@debbugs.gnu.org; Thu, 08 Jul 2021 23:36:00 -0400 Received: from lists.gnu.org ([209.51.188.17]:52694) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1hJ0-0008MC-Br for submit@debbugs.gnu.org; Thu, 08 Jul 2021 23:35:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40616) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1hIz-0005rL-W2 for guix-patches@gnu.org; Thu, 08 Jul 2021 23:35:58 -0400 Received: from tobias.gr ([2a02:c205:2020:6054::1]:58822) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1hIy-00009r-0d for guix-patches@gnu.org; Thu, 08 Jul 2021 23:35:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=hy0nQQrf/F9GS N6uG1heqny2TZQrP/trRmHmdN2nkaQ=; h=in-reply-to:date:subject:cc:to: from:references; d=tobias.gr; b=gxoeo0DCCWJoydVfermr+RurL7fRWoey6aGK5P 0E5J7dF8g9xVut+FCdwI/5DLxMUEO4UXPPCYwOQEPKn8gspzRQzCXX1UzmtKjJgT1QVr5i nos/ZKunkCl89V24qYa0Sql2+ntjq42MWe4pmlyYkn1Y9fO5ilLGkk8COiKKoMq+HFYXwH 9ltKYujh1aBo2ivM+/++5XRL9NeHzSIOXHYlek0onjUb81hc23SqhoNORS+QN/oZheUf/L XWagpeyiBTCnucAdJ/Kd37jPaW4+BSQdTTLcSHWCZfOnrQdSsa2IkPkQOc8aLZ8LP/hQkK TeYOgmwE+qYtbRqxs5+pBB3Q== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 0323885c (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Fri, 9 Jul 2021 03:35:48 +0000 (UTC) References: <20210709024853.1170-1-jackhill@jackhill.us> From: Tobias Geerinckx-Rice To: Jack Hill Subject: Re: [PATCH] linux-boot: Resume from hibernation after pre-boot. Date: Fri, 09 Jul 2021 05:21:50 +0200 In-reply-to: <20210709024853.1170-1-jackhill@jackhill.us> BIMI-Selector: v=BIMI1; s=default; Message-ID: <87a6mwgnvt.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=2a02:c205:2020:6054::1; envelope-from=me@tobias.gr; helo=tobias.gr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: guix-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Jack Hill =E5=86=99=E9=81=93=EF=BC=9A > * gnu/build/linux-boot.scm (boot-system): Call=20 > resume-if-hibernated > after pre-mount. All right! \o/ Whilst I'm glad it didn't eat your data, it was=20 still just an off-the-cuff suggestion on IRC & I'd like to take=20 the weekend to think about the whole picture. Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYOfEFg0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW155PUA/0XvlC1lk4repufb6af41nb9zjPn9RAKxVMGmg2A FwHmAQC3qkBVZa3EecQH3lcldu0+LLGodZyfUR8pdjMZ2WAxBg== =qcha -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 05 08:52:12 2022 Received: (at 49475) by debbugs.gnu.org; 5 Sep 2022 12:52:12 +0000 Received: from localhost ([127.0.0.1]:46756 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVBaC-00085K-SE for submit@debbugs.gnu.org; Mon, 05 Sep 2022 08:52:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53284) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVBa7-00084c-5s; Mon, 05 Sep 2022 08:52:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46310) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVBa0-0000PX-VT; Mon, 05 Sep 2022 08:51:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=mOP4xYNwBhxQgQQOvSX9qLqr8pIRBEW9ZQecCFlCfxs=; b=QFTLemV0I8gp1ZAw5wAP cqBHo2gGU/8kQdGracaUGNaDQ6SOqQUyTH8/Z4L2DG6rdbjo2Co748DNFuQwgLQrQHxguOEIbiGZm nvjk0L88tmOW/IE+duW71n63Ba9QMDZUIfSWMcils3eX0TX5LqUqByYARY6wkLo8Cp/8Yb3vndN1g KMJLACz58rAckypAouRiqppG89k9InqLrW8iusZKaD4wVXR8Qxg0QaL8qVTwS0BKoADNmE346QMWB gMqUZxbtZmJuJQd1Id74x1CxUJwKzQFEkEawlusLWYejr7TRHRfSNBM2wZBZDpaT01RQvLTuzbg/u IVNVfTwmk+vmGA==; Received: from [193.50.110.177] (port=40420 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVBa0-0004gh-Ie; Mon, 05 Sep 2022 08:51:56 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Josselin Poiret Subject: Re: bug#57583: Guix cannot resume after hibernation References: <87bkrvawgp.fsf@jpoiret.xyz> Date: Mon, 05 Sep 2022 14:51:54 +0200 In-Reply-To: <87bkrvawgp.fsf@jpoiret.xyz> (Josselin Poiret's message of "Sun, 04 Sep 2022 19:19:34 +0200") Message-ID: <87h71m3rx1.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 49475 Cc: 49475@debbugs.gnu.org, 57583@debbugs.gnu.org, Yusuf Talha , Tobias Geerinckx-Rice , jackhill@jackhill.us X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) Hi, Josselin Poiret skribis: > Yusuf Talha via Bug reports for GNU Guix writes: > >> I haven't encountered this problem on any other distros.=C2=A0 You proba= bly realized that I encrypted my disk.=C2=A0 Hibernation wasn't working whi= le I was using Guix without encryption a few months ago either.=C2=A0 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: https://issues.guix.gnu.org/49475 Jack, do I get it right? The patch in question fell through the cracks, but it actually LGTM. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 05 09:11:37 2022 Received: (at 49475-done) by debbugs.gnu.org; 5 Sep 2022 13:11:37 +0000 Received: from localhost ([127.0.0.1]:46806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVBt0-0000B9-G1 for submit@debbugs.gnu.org; Mon, 05 Sep 2022 09:11:37 -0400 Received: from tobias.gr ([80.241.217.52]:50102) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVBsu-0000As-IZ; Mon, 05 Sep 2022 09:11:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=97krIzOMp9oPI /ztkxLsCb8uVypZGcHDcBFo6IJS8zc=; h=in-reply-to:date:subject:cc:to: from:references; d=tobias.gr; b=Ae1iEhejxQKguDZ7xY6LeQSQGHcinjaXhFuohn gXyBU/CW20bpQnKohrgb0eGirAVATEdz8xRm+4ExASGVJxZ//5k3+xgs8k68NEwaEzonTu qI7PNsxdu1AFYPv0+kH0ioSdY5xyhdWJ9yMGmiHhyG0KfREP5XrRIO0tItInpwbZscO7fe qrGMoJRrXk9nI7WnL15n5ZqvwmRy9O+mN5ulvabANbe36FdBMSh/PX3U83O4nGDu6BufGi 1UDoW+ylYAaeESSJ/iiaspVaoWvC2rKI20ixjfKQQYLjUlsrnHJ6u+15KN8O+ZJ1cAAM8S nlm07BC0BQ+HQkUo3da6ljSA== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id dc206d3a (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Mon, 5 Sep 2022 13:11:22 +0000 (UTC) References: <87bkrvawgp.fsf@jpoiret.xyz> <87h71m3rx1.fsf@gnu.org> From: Tobias Geerinckx-Rice To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#57583: Guix cannot resume after hibernation Date: Mon, 05 Sep 2022 15:05:16 +0200 In-reply-to: <87h71m3rx1.fsf@gnu.org> BIMI-Selector: v=BIMI1; s=default; Message-ID: <87wnaiezj2.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 49475-done Cc: 49475-done@debbugs.gnu.org, 57583@debbugs.gnu.org, Josselin Poiret , jackhill@jackhill.us, Yusuf Talha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Jack, Yusuf, Ludo', Yusuf: you could try pulling, reconfiguring, hibernating, and=20 resuming, if you're brave-ish. Ludovic Court=C3=A8s =E5=86=99=E9=81=93=EF=BC=9A > I believe this is fixed by this: [=E2=80=A6] 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=20 trivially obviously correct =E2=80=94 because we now actually do something= =20 potentially useful (and hence, dangerous) during it =E2=80=94 but that's=20 unavoidable I suppose. It's certainly not the fault of this=20 patch. Pushed as ec16f88522041dc285a35705ff9ee95672b78143, thanks Jack! Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYxX1oQ0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW150cYA/3ZS6cUFlwn+9Q7MDVcWwHPe1Kbi4BHjtXrw5BZP ZS/fAQCId35XEGp8/W1LizS/imQg14KfTLyfPyddJ6Xs1hV2Dw== =uYzh -----END PGP SIGNATURE----- --=-=-=-- From unknown Thu Aug 21 12:09:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 04 Oct 2022 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator