From unknown Mon Aug 18 11:30:44 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#40927] [PATCH] Allow resume from swap device during boot Resent-From: Jean-Baptiste Note Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 28 Apr 2020 09:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 40927 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 40927@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15880658693417 (code B ref -1); Tue, 28 Apr 2020 09:25:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 Apr 2020 09:24:29 +0000 Received: from localhost ([127.0.0.1]:38929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTMTc-0000sy-LQ for submit@debbugs.gnu.org; Tue, 28 Apr 2020 05:24:29 -0400 Received: from lists.gnu.org ([209.51.188.17]:55461) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTM4M-0000B7-82 for submit@debbugs.gnu.org; Tue, 28 Apr 2020 04:58:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55174) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTM1t-0007yp-7C for guix-patches@gnu.org; Tue, 28 Apr 2020 04:58:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTLvs-0005Cn-Ey for guix-patches@gnu.org; Tue, 28 Apr 2020 04:50:48 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:50268) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jTKdR-0000Wm-Ul for guix-patches@gnu.org; Tue, 28 Apr 2020 03:26:30 -0400 Received: by mail-wm1-x342.google.com with SMTP id x25so1527991wmc.0 for ; Tue, 28 Apr 2020 00:26:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:user-agent:mime-version; bh=v7ZhvYbvUTYrgj0wxY+58SvXoPamvvXAQnWz/NML49E=; b=UxTHj0ZwqOq7MoB4GL/yFYz2oV+sY0kXqLxpol9mTFsNvNJ37jLAUkdYVywtDtZQuS 0AXH3SYiAG9qwVdVxJbPYoQSkSWD4JHS10Jk7TzUHwjgHv/rEWEn4l81eYkBaZtKztgj 5pJUVCTgHCGqzvkK7b5qo1ihmbHJtR4hYuZl4Eqpng2WMDQ9bXhJtSxVp6CDOKySI48k qrQZ60jxkxSvqBpEsX/M72r/Hk9sSJJsdrjeixszfBrixYXyvN3IqJAZJmNjb5K1C213 n57ge1WZmwhfkDHKPSBx7jfLVE2h6Sj+ogyWVUAUJvesJD6v5N4URZdLLZeRbxWrLfCi HzMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :user-agent:mime-version; bh=v7ZhvYbvUTYrgj0wxY+58SvXoPamvvXAQnWz/NML49E=; b=AGJWJ8RsJqNRg4WuMV21tN5G03gfzydsABLW648fW5qHYOH8Q05N7oQ8CZkmQ6hwSJ /XmceC41bJ9y9bPheFPCenBY0GElS5R8XI6Jnw2sxMgXBWoY7nWKy5qjTG6NORznr3id OxnmiaFHjdAuZMkE1JfH21XY8rZ56cNFBl/sZcYgvIUSgtYTOiz4zTQQdbOf2jDgIqD9 QhnypkHWs9ZQrXLn99fHU8cnYy74wRkAvEY67UyBQJWBx0S+d9UGhH4DOBkkfG7WvqSO 3rrGbuH9s92ESjGIBz1GE6+rw3p5/LAHfCyZiiD1iVTLiTQ2EkHpa1kSDvrsT57KQmZu 4aow== X-Gm-Message-State: AGi0PubNSZ9M92onaNNlHprQkENmKNqT0K7QnqEFb84qbiLXkT9sE/Lj Z5nhc+ybr1X6qIDmz8tj1jq6Dq1lffI= X-Google-Smtp-Source: APiQypLO0zjXLFfarh9qEL23cCm3oBDnzDvz3nq6zGfKBCDEN2hIa7YuMMIVKNFfQF5fvhlKCGe3BA== X-Received: by 2002:a1c:668a:: with SMTP id a132mr3142826wmc.46.1588058787882; Tue, 28 Apr 2020 00:26:27 -0700 (PDT) Received: from guixrules ([2a01:e35:2e0b:a6b0:e2ce:c3ff:fe74:cec8]) by smtp.gmail.com with ESMTPSA id t20sm2716706wmi.2.2020.04.28.00.26.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2020 00:26:26 -0700 (PDT) From: Jean-Baptiste Note Date: Tue, 28 Apr 2020 07:26:15 +0000 Message-ID: <87zhawax60.fsf@m4x.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=2a00:1450:4864:20::342; envelope-from=jbnote@gmail.com; helo=mail-wm1-x342.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2a00:1450:4864:20::342 X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Dear GUIX maintainers, Current the GUIX SD boot process does not allow resuming from sleep, even thought sleep options are available through loginctl, eg: loginctl hybrid-sleep loginctl hibernate Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: m4x.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (jbnote[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 2.0 SPOOFED_FREEMAIL No description available. X-Mailman-Approved-At: Tue, 28 Apr 2020 05:24:24 -0400 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.8 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Dear GUIX maintainers, Current the GUIX SD boot process does not allow resuming from sleep, even thought sleep options are available through loginctl, eg: loginctl hybrid-sleep loginctl hibernate This is a very important feature for people like me using GUIX SD on a laptop (yes, it is possible, mine is a corebooted X230 running linux-libre!) This patch is based on a patch floating around. The core functionality has been isolated, the resume function isolated, the patch rebased and tested. I'm not taking credit for it, even though tracing the exact origin is hard. The resume hook is called if the resume= kernel argument is provided, which one can do during system configuration. My scheme level is zero, so please bear with me. In particular, some conditionals could maybe be moved within the function, or the function itself called within some already-available hooks. Also it is not clear if the commit log is adequate for such a change. Please let me know how to improve this and get this merged; I can also write some documentation (probably once the mechanism is in place) to explain how the feature can be used. Kind regards, Jean-Baptiste --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-linux-boot-Add-support-for-resuming-from-swap-device.patch Content-Transfer-Encoding: quoted-printable Content-Description: allow resume from swap From=202531d1d08dabb53ff15020aedcec2ad5d8e6c600 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Note Date: Mon, 27 Apr 2020 20:42:03 +0000 Subject: [PATCH] linux-boot: Add support for resuming from swap device. * gnu/build/linux-boot.scm (resume-from-device): Add function. * gnu/build/linux-boot.scm (boot-system): Add hook calling resume-from-devi= ce if specified on commandline, before mounting any actual disk filesystems. =2D-- gnu/build/linux-boot.scm | 43 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm index 4fb711b8f2..907c84276f 100644 =2D-- a/gnu/build/linux-boot.scm +++ b/gnu/build/linux-boot.scm @@ -357,6 +357,37 @@ the last argument of `mknod'." (compose (cut string=3D? program <>) basename)))) (filter-map string->number (scandir "/proc"))))) =20 +(define (resume-from-device resume-device) + "Resume from hibernation state on device DEVICE. This *must* happen befo= re +we mount any filesystems on disk. See +linux-libre/Documentation/swsusp.txt. Please note that this function will = not +return if resume happens successfully, and will return if swap device does= not +contain a valid resume signature." + (false-if-exception + (let* ((device-base-name + ;; The base name of the device file, after resolving + ;; symlinks. + (let loop ((file resume-device)) + (match (stat:type (lstat file)) + ('symlink + (let ((target (readlink file))) + (if (string-prefix? "/" target) + (loop target) + (loop (string-append (dirname file) "/" target))))) + (_ (basename file))))) + (major+minor + ;; The major:minor string (e.g. "8:2") corresponding + ;; to the resume device. + (call-with-input-file (string-append "/sys/class/block/" + device-base-name + "/dev") + read-line))) + ;; Write the major:minor string to /sys/power/resume + ;; to attempt resume from hibernation. + (when major+minor + (call-with-output-file "/sys/power/resume" + (cut display major+minor <>)))))) + (define* (mount-root-file-system root type #:key volatile-root? (flags 0) options) "Mount the root file system of type TYPE at device ROOT. If VOLATILE-ROO= T? is @@ -493,9 +524,10 @@ upon error." (call-with-error-handling (lambda () (mount-essential-file-systems) =2D (let* ((args (linux-command-line)) =2D (to-load (find-long-option "--load" args)) =2D (root (find-long-option "--root" args))) + (let* ((args (linux-command-line)) + (to-load (find-long-option "--load" args)) + (root (find-long-option "--root" args)) + (resume-device (find-long-option "resume" args))) =20 (when (member "--repl" args) (start-repl)) @@ -528,6 +560,11 @@ upon error." (unless (pre-mount) (error "pre-mount actions failed"))) =20 + (when (and resume-device + (file-exists? resume-device) + (file-exists? "/sys/power/resume")) + (resume-from-device resume-device)) + (setenv "EXT2FS_NO_MTAB_OK" "1") =20 (if root =2D-=20 2.26.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEPxcq3dp4FVY5UpckkC0pVsuz75YFAl6n2pcACgkQkC0pVsuz 75alJhAAgVioSCWGAi3lUwiYvDIM6KaZLFDMbORZGFnGF5qtI82i1EvOs7GMk8QV fLyUfepbIRMPLnJtmIcQb1Cnqz1dG45168Gr0BcTNY1L3YiFhjnxlKQrAoa0KgK/ o1hO1T/6uR3QiRpCNwCrcV5ouk4cZVnnNx2JKKeQAOlgHn8eSFwO6dIRnbfL54p7 tFhg6si2QqrxPnY1exeZ0LFxLbzivel4OCRNja03VGv0CTQnK+htls496rkqtZEx 84a/7LT1P8dtmq9bv0CACfDfU7VIKVnozQOJhx0Ek2yfV34127xvfIU8alF1TWpe yzthVSJ8uzS83c/ximcAi7uNrEszQqoEPoOnJBqRuzuPXfWgroCNnOUrQbETMD/g APYYvSruXcbWkZd5VIBNo6fZZUzYFdI6y/DU2bK2X2Y4hsT8hendt3/pSFv8bv55 yexEWmrxEuDCm0Mb2P8DewxOTnPvSH0N2VLizTb4ZPg6vjHbzuvdzY3QzquTclk6 5SI5C4XlNPYNp1rSjMJnG1uv7BN771yfWnbQQQKg/0jWP0NIZ2REU27p/G4YbNcA ZhbS74upz/iEsEGBRWkyPEnSKtGgCbLDiT3VDeJ+Dbhae3egxiiQ0KBEfXUjqkLX a8sgx66ZhmgxO5IubMTsoJrc1e+u7IRSmB9dmfunxOisryxG7sY= =db63 -----END PGP SIGNATURE----- --==-=-=-- From unknown Mon Aug 18 11:30:44 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#40927] [PATCH] Allow resume from swap device during boot Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 01 May 2020 14:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40927 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Jean-Baptiste Note Cc: 40927@debbugs.gnu.org Received: via spool by 40927-submit@debbugs.gnu.org id=B40927.15883446666635 (code B ref 40927); Fri, 01 May 2020 14:52:01 +0000 Received: (at 40927) by debbugs.gnu.org; 1 May 2020 14:51:06 +0000 Received: from localhost ([127.0.0.1]:50411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUX07-0001iP-Du for submit@debbugs.gnu.org; Fri, 01 May 2020 10:51:06 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:58756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUX06-0001iH-8w for 40927@debbugs.gnu.org; Fri, 01 May 2020 10:50:50 -0400 Received: from localhost (80-110-127-207.cgn.dynamic.surfer.at [80.110.127.207]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 644503361552; Fri, 1 May 2020 16:50:48 +0200 (CEST) Date: Fri, 1 May 2020 16:50:45 +0200 From: Danny Milosavljevic Message-ID: <20200501165045.3d845900@scratchpost.org> In-Reply-To: <87zhawax60.fsf@m4x.org> References: <87zhawax60.fsf@m4x.org> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/YZXpJ2nMjG+aipRkpIAIR.s"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Spam-Score: -0.7 (/) 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 (-) --Sig_/YZXpJ2nMjG+aipRkpIAIR.s Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Jean-Baptiste Note, On Tue, 28 Apr 2020 07:26:15 +0000 Jean-Baptiste Note wrote: > linux-libre/Documentation/swsusp.txt Should be linux-libre/Documentation/power/swsusp.txt . Otherwise OK. Please try to find the names of the actual authors so we can commit the par= ts they wrote with them as author. Who provides the "resume=3D" argument eventually? Also, if we want to support this, what would the Guix installer have to do? Add a swap partition? Does it have to be exactly as big as the amount of R= AM or does it need to be bigger because of overhead? --Sig_/YZXpJ2nMjG+aipRkpIAIR.s Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl6sN0UACgkQ5xo1VCww uqXbRAgAinDDgaDbLc9m725ME3G6AQUm40PLCaTOZkIH8ywVrUvw0J1Ww1oIXfgD 87SDbZnIjQWQk2yf5k7VqLGV/LixupQbnIl8ysX8K1nsUt6y4YZZWoxHkICw0+on sGVUGe2CJfcjp6xFhXDKbGXIUxAonNj2RgvR16Uva2B6ZCgbFY3LpGdTOgrfZJfk v2s3nj9h9WBYq9OjQurowEMYYTvO9EYtctwbEh/PXqxdvdGg6dWi+Q/CDIFIc57t dD+UazvF915lwlrdo5/+LCV7ZTtNzZ83bngJR5MLz50wl6uZGRSXXuoML93DvKxB W/6bsRiugsab8tvgR3tMWDXpW55ZDw== =8MsL -----END PGP SIGNATURE----- --Sig_/YZXpJ2nMjG+aipRkpIAIR.s-- From unknown Mon Aug 18 11:30:44 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#40927] [PATCH] Allow resume from swap device during boot Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 01 May 2020 16:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40927 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 40927@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Cc: 40927@debbugs.gnu.org Received: via spool by 40927-submit@debbugs.gnu.org id=B40927.158835093624536 (code B ref 40927); Fri, 01 May 2020 16:36:01 +0000 Received: (at 40927) by debbugs.gnu.org; 1 May 2020 16:35:36 +0000 Received: from localhost ([127.0.0.1]:50525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUYdF-0006NN-0W for submit@debbugs.gnu.org; Fri, 01 May 2020 12:35:36 -0400 Received: from tobias.gr ([80.241.217.52]:35332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUYdD-0006NC-3Q for 40927@debbugs.gnu.org; Fri, 01 May 2020 12:35:19 -0400 Received: by tobias.gr (OpenSMTPD) with ESMTP id 49131a35; Fri, 1 May 2020 16:35:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tobias.gr; h=from:to:cc :subject:references:in-reply-to:date:message-id:mime-version :content-type; s=2018; i=me@tobias.gr; bh=Dg16dHMq7hxz9cPZtd4pXO eevmmBwIFJiAsWH28V2QA=; b=jK3JcdJNLSxtt/B5LXDTPssTVIaJ9btLxOWvSL vtuXzBH6SBRa0L6MbqlgIco23ql1HWLH/MYWaRt5gCRb0ehgLx/+sA19U08PGyo2 NokHMhyiOzfOnET81sXC/iAtm3MJEEucwKR45UbKO9jlWL65sjeADAsey4j42Tfj XcGud2wSPemfBcGFqY/snPas4PLDCgDodoAupGRJU1o80O7haJ35IPuNjoFgt+I7 iUZEs0HyDXHr+uWncu5VojAkRRBdun99EKlaeLbJgieFoNEKxk29yI0XBZyKYZwR xTLLahIzXpnhpLCUgq83YUk++6UzZ4gA5wgxPoVFyxvDnDRg== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 79ef74f2 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Fri, 1 May 2020 16:35:16 +0000 (UTC) From: Tobias Geerinckx-Rice References: <87zhawax60.fsf@m4x.org> In-reply-to: <87zhawax60.fsf@m4x.org> Date: Fri, 01 May 2020 18:35:28 +0200 Message-ID: <87o8r7ehpr.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) 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 Jean-Baptiste, Jean-Baptiste Note =E5=86=99=E9=81=93=EF=BC=9A > This is a very important feature for people like me using GUIX=20 > SD on a > laptop (yes, it is possible, mine is a corebooted X230 running > linux-libre!) Greetings, brother in hardware. Note that hibernation and resumption already work fine if you rely=20 on the kernel's built-in support. I've been hibernating my X230T=20 for years without patches. This explicit initramfs support is only needed if your storage=20 drivers aren't available when the kernel itself tries to resume,=20 and the initramfs has to retry later. That's slower but allows=20 things like ahci to be modular instead of built-in. > This patch is based on a patch floating around. The core=20 > functionality > has been isolated, the resume function isolated, the patch=20 > rebased and > tested. I'm not taking credit for it, even though tracing the=20 > exact > origin is hard. Heh. It's certainly very similar to a patch of mine that's =E2=80=98out=20 there=E2=80=99 although it's probably not the only one. > The resume hook is called if the resume=3D kernel argument is=20 > provided, > which one can do during system configuration. This patch ignores the =E2=80=98noresume=E2=80=99 flag, which is bad. If i= t's=20 present anywhere on the command line resumption should be skipped: + (when (and (not (member "noresume" args)) + resume-device + (file-exists? resume-device) + (file-exists? "/sys/power/resume")) + (resume-from-device resume-device)) > My scheme level is zero, so please bear with me. In particular,=20 > some > conditionals could maybe be moved within the function, I'd like to see everything moved into a self-contained DTRT=20 [try-to-]resume procedure, except for the =E2=80=98noresume=E2=80=99 check = (so=20 callers are free to explicitly resume if they so please): + (unless (member "noresume" args) + (resume-if-hibernated (find-long-option "resume"=20 args))) This is what the last iteration of my patch does. If (find-long-option "resume" args) is #f, fall back to=20 CONFIG_PM_STD_PARTITION. This is what the kernel does: even if=20 =E2=80=98resume=3D=E2=80=99 is missing, it will try to resume from that dev= ice if=20 specified. We should match that behaviour if we can. Problem is, I forgot how to get that value from user space, or if=20 it's even possible. I gave up on Linux's built-in hibernation=20 (swsusp) years ago. It's poorly written and maintained, and the=20 author fiercely defends it from all improvement. Instead I use TuxOnIce, which exposes it under=20 /sys/power/tuxonice/=E2=80=A6. That's obviously not an option here,=20 although it would be friendly to fall back to it for us ToI users=20 :-) *user. I think ToI even exposes the =E2=80=98last used hibernation device=E2=80=99= =20 somewhere, so user space can just use that instead of=20 CONFIG_PM_STD_PARTITION. This is obviously the right thing to do.=20 Again, not sure if swsusp does. > or the function itself called within some already-available=20 > hooks. We don't have a concept of =E2=80=98initramfs hooks=E2=80=99 and I think th= at's a=20 good thing. Gives me dracut flashbacks. Don't lets bother with=20 them until we need them, which is never. > Also it is not clear if the commit log is adequate for such a=20 > change. It's all right :-) If anything, it's too long: linux-boot: Add support for resuming from swap device. * gnu/build/linux-boot.scm (resume-from-device): New procedure. * gnu/build/linux-boot.scm (boot-system): Call it, unless=20 =E2=80=98noresume=E2=80=99 is present on the kernel command line. > Please let me know how to improve this and get this merged; I=20 > can also > write some documentation (probably once the mechanism is in=20 > place) to > explain how the feature can be used. If this works properly no documentation is needed. The kernel by=20 default writes to the first swap device; we should magically=20 resume from it. Forcing users to know (or care) about part 2 is=20 asymmetrical and wrong. Not sure if that's possible with vanilla Linux-Libre=E2=80=A6 Will stop shilling ToI for now, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXqxP0AAKCRANsP+IT1Vt eXVJAP96WL9Wax3vlM72BnZTz9xN4HEz+gKGzzYM7+krnn3aDgD/R7XEZA7wmsAJ wttBqY9Eev3URVpL+tcvziEfAH1bIQI= =AkBZ -----END PGP SIGNATURE----- --=-=-=-- From unknown Mon Aug 18 11:30:44 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#40927] [PATCH] Allow resume from swap device during boot Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 03 May 2020 11:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40927 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 40927@debbugs.gnu.org Received: via spool by 40927-submit@debbugs.gnu.org id=B40927.15885039452657 (code B ref 40927); Sun, 03 May 2020 11:06:01 +0000 Received: (at 40927) by debbugs.gnu.org; 3 May 2020 11:05:45 +0000 Received: from localhost ([127.0.0.1]:54779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVCRN-0000gm-4A for submit@debbugs.gnu.org; Sun, 03 May 2020 07:05:45 -0400 Received: from tobias.gr ([80.241.217.52]:50256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVCRK-0000gb-GD for 40927@debbugs.gnu.org; Sun, 03 May 2020 07:05:43 -0400 Received: by tobias.gr (OpenSMTPD) with ESMTP id cb671759 for <40927@debbugs.gnu.org>; Sun, 3 May 2020 11:05:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tobias.gr; h=from:to :subject:message-id:references:in-reply-to:date:mime-version :content-type; s=2018; i=me@tobias.gr; bh=p9Lka5/WbunurGAh7EVl3D 4UlNJPHNze5FPUqSUqo9k=; b=pmGQjf566Op6HcGe5SUWd5Dzm4PrIflQslgq2c LPTFpuQSWmwVEx7DCJba4e9freychDOfvEgQwh03Tmv2kEUV9hFgWY1DPLfaXglh VP9OkUHZiQOBgJDpIzGuMEwoiE/LAv1d2hP1XZBShLfJkPJL9RBSqPkaMajgUoRU mwUExuF+vUCIIhikt9HMLbKtMHiHaa+aF81xW4kEBLZwKbaxqnAtmltb1l2OPvon y8Qxhm5wILvJlzHsSHOCJZWb0OjXfd8lM8Veai8gAT9ZA4hhDr3rv8rbRK5zO2d1 EK4LUK0TZXisKakwSkt2eIjGF1rh+ifrfPlsQ/iu8KyL+d5A== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id f99687bf (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <40927@debbugs.gnu.org>; Sun, 3 May 2020 11:05:39 +0000 (UTC) From: Tobias Geerinckx-Rice Message-ID: <874ksxnurk.fsf@nckx> References: <87zhawax60.fsf@m4x.org> <87o8r7ehpr.fsf@nckx> In-reply-to: <87o8r7ehpr.fsf@nckx> Date: Sun, 03 May 2020 13:05:52 +0200 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) 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: -3.3 (---) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hullo again, Tobias Geerinckx-Rice =E5=86=99=E9=81=93=EF=BC=9A > This is what the last iteration of my patch does. I managed to find it! Long live dusty back-ups. It uses native procedures to divine the device number, instead of=20 =E2=80=94 clever! =E2=80=94 /sys/blockery that supports only a subset of sp= ecs=20 (and reminds me too much of =E2=80=98look what I found lying around=E2=80= =99 shell=20 scripting). If any are missing we can add them to=20 CANONICALIZE-DEVICE-SPEC to the benefit of all. Tested with both built-in & modular ATA drivers =C3=97 mainline swsusp=20 & TuxOnIce. More welcome. These copyright dates are downright embarrassing. Let's Get=20 (something like) This Merged! Kind regards, T G-R --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-linux-boot-Resume-from-hibernation.patch Content-Transfer-Encoding: quoted-printable From=2046c4c1010d9257f3d1d1ddb201dc7f7519d42ba0 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Fri, 26 Feb 2016 17:57:07 +0100 Subject: [PATCH] linux-boot: Resume from hibernation. MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit * gnu/build/linux-boot.scm (resume-if-hibernated): New procedure. (boot-system): Call it unless =E2=80=98noresume=E2=80=99 was specified. =2D-- gnu/build/linux-boot.scm | 52 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm index 05e833c0c6..74e76b6a31 100644 =2D-- a/gnu/build/linux-boot.scm +++ b/gnu/build/linux-boot.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Cour= t=C3=A8s +;;; Copyright =C2=A9 2016, 2017, 2019 Tobias Geerinckx-Rice ;;; Copyright =C2=A9 2017 Mathieu Othacehe ;;; Copyright =C2=A9 2019 Guillaume Le Vaillant ;;; @@ -110,6 +111,51 @@ OPTION doesn't appear in ARGUMENTS." (substring arg (+ 1 (string-index arg #\=3D))))) arguments))) =20 +(define (resume-if-hibernated device) + "Resume from hibernation if possible. This is safe ONLY if no on-disk f= ile +systems have been mounted; calling it later risks severe file system corru= ption! +See in the kernel source directory. This is the +caller's responsibility, as is catching exceptions if resumption was suppo= sed to +happen but didn't. + +Resume only from DEVICE if it's a string. If it's #f, use the kernel's de= fault +hibernation device (CONFIG_PM_STD_PARTITION). Never return if resumption +succeeds. Return nothing otherwise. The kernel logs any details to dmesg= ." + + (define (string->major:minor string) + "Return a string with MAJOR:MINOR numbers of the device specified by S= TRING" + + ;; The "resume=3D" kernel command-line option always provides a string= , which + ;; can represent a device, a UUID, or a label. Check for all three. + (let* ((spec (cond ((string-prefix? "/" string) string) + ((uuid string) =3D> identity) + (else (file-system-label string)))) + ;; XXX kernel's swsusp_resume_can_resume() waits if =E2=80=98re= sumewait=E2=80=99 is + ;; found on the command line; our canonicalize-device-spec give= s up + ;; after 20 seconds. We could loop (ew!) if someone relies on = it=E2=80=A6 + (device (canonicalize-device-spec spec)) + (rdev (stat:rdev (stat device))) + (minor (modulo rdev 256)) + (major (/ (- rdev minor) 256))) + (format #f "~a:~a" major minor))) + + ;; Write the MAJOR:MINOR numbers of the specified or default resume DEVI= CE to + ;; this magic file. The kernel will immediately try to resume from it. + (let ((resume "/sys/power/resume")) + (when (file-exists? resume) ; this kernel supports hibernation + ;; Honour the kernel's default device (only) if none other was given. + (let ((major:minor (if device + (string->major:minor device) + (let ((default (call-with-input-file resume + read-line))) + ;; Don't waste time echoing =E2=80=98nothin= g=E2=80=99 to /sys. + (if (string=3D? "0:0" default) + #f + default))))) + (when major:minor + (call-with-output-file resume ; may throw an =E2=80=98Invalid ar= gument=E2=80=99 + (cut display major:minor <>))))))) ; may never return + (define* (make-disk-device-nodes base major #:optional (minor 0)) "Make the block device nodes around BASE (something like \"/root/dev/sda= \") with the given MAJOR number, starting with MINOR." @@ -504,6 +550,12 @@ upon error." (load-linux-modules-from-directory linux-modules linux-module-directory) =20 + (unless (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) =2D-=20 2.25.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXq6lkAAKCRANsP+IT1Vt ee7FAQCNQZKsTJRLSao1EPowujl4UuFGwfr1+Fmi4ZHY9TufmAEAspCjwJTFCj7b FyN4w91UguXucRUo/pzAEb6jQ9MEegE= =gREP -----END PGP SIGNATURE----- --==-=-=-- From unknown Mon Aug 18 11:30:44 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#40927] [PATCH] Allow resume from swap device during boot Resent-From: Jean-Baptiste Note Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 05 May 2020 18:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40927 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Danny Milosavljevic Cc: 40927@debbugs.gnu.org Received: via spool by 40927-submit@debbugs.gnu.org id=B40927.158870205226290 (code B ref 40927); Tue, 05 May 2020 18:08:01 +0000 Received: (at 40927) by debbugs.gnu.org; 5 May 2020 18:07:32 +0000 Received: from localhost ([127.0.0.1]:37378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jW1ye-0006py-Aj for submit@debbugs.gnu.org; Tue, 05 May 2020 14:07:32 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:36732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jW1yb-0006pj-OK for 40927@debbugs.gnu.org; Tue, 05 May 2020 14:07:30 -0400 Received: by mail-wm1-f68.google.com with SMTP id u127so3380035wmg.1 for <40927@debbugs.gnu.org>; Tue, 05 May 2020 11:07:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=imEEVfKFPJnSLL4yP/VwGVdvXzz3pc/m3Z2bK8eVIm0=; b=Sx5wp8quWsX4z+DpbFeVDM2HeP6LralgZSUS//kWWf3Ichm4hhTqN253Shv5JnwZmE fidQVdr4UFYodvk/xYzlthDxfFCDY/U/SanTUOnCfuw0MXWIQl3c9Yr2zoQzZnIPVhys zREQ5y7WnwMySj+lkv+PJrdck1LUGHymIr5Tiw5dzbk82ZiWJZ+Z6YOKgcvRSVVgFSNC B6mfAY+i/FBKKhjMvS2BsRJz78qaIrQrYJ7t38LSGE+K0YTmEi1M4OvpHx62OGSFsJgD HyGn9qjucSafmxBPa9uhPEFQd2zjUjlTWBtCCJI+T/KVtryA8Dd2B675rNjm2guTp2XL YzDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=imEEVfKFPJnSLL4yP/VwGVdvXzz3pc/m3Z2bK8eVIm0=; b=Sb4ZULbFWRgWI9tPkn8z9uDrhkQXlPJGd4dZJpSwYovvG4fSLwbZ3hhmTauZrAaBhN Rvy754xMMdRNLQLGf99ma1z09kTlQmYDcbRLyAIZsQLhApUoMm004J+bShEN6lGdNyOs 8w2mO+bteikwtPGcayytJSRpSuzqtiL1MHKETAItYME6bk9a9+UYJosZB1Jx4XH/70I8 aGz1p8adW5rhxNBhNamViUDAXbYgulETcaDVlQ0GtmmxP4ftiXTzX9G2bsGcn8JYYFZR 5zEisZFNhYQTzr1HfgLoOBZyhqsHwFoYox5saMIpl99bJHjl6EcAjCuCId2W5/AsDn69 t5NQ== X-Gm-Message-State: AGi0PuZbS7q/t/DV/UV037/qzXW3B+oaRKmus+Pckm5L3LOuuPSrUrIx vB4EBFR7SaXglifh8cyfTH1RchjJpOw= X-Google-Smtp-Source: APiQypLlvtBu0j/5eFLqdY7ZVewqzfSEalLt3FWyvh6jPUQUfkJqsQxADFmHUf8kZZiAE8CHpX31SA== X-Received: by 2002:a1c:bd89:: with SMTP id n131mr4660419wmf.3.1588702043349; Tue, 05 May 2020 11:07:23 -0700 (PDT) Received: from guixrules ([2a01:e35:2e0b:a6b0:e2ce:c3ff:fe74:cec8]) by smtp.gmail.com with ESMTPSA id 185sm5759238wmc.32.2020.05.05.11.07.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2020 11:07:22 -0700 (PDT) From: Jean-Baptiste Note References: <87zhawax60.fsf@m4x.org> <20200501165045.3d845900@scratchpost.org> Date: Tue, 05 May 2020 18:07:15 +0000 In-Reply-To: <20200501165045.3d845900@scratchpost.org> (Danny Milosavljevic's message of "Fri, 1 May 2020 16:50:45 +0200") Message-ID: <87d07ixnl8.fsf@m4x.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.5 (/) 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: -0.5 (/) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Hi Danny, Thanks for being so guix in answering the original report. Your questions prompted me to take a bit of time before answering. Regarding attribution, i've dug two instances of this patch: https://git.pantherx.org/mirror/guix/commit/af8d58efa05927b24694c87379cccc378f3fdde7 https://issues.guix.gnu.org/issue/37290 https://lists.gnu.org/archive/html/bug-guix/2019-09/msg00017.html Both instances of the patch are given by author Mark H Weaver As you can see there's already an open issue in GUIX regarding resume; i'm sorry i missed that. Maybe for attribution it would make sense for me to resend the patch there; let me know how to proceed. Regarding the patch itself and your questions: - for comparison to the original patch: elogind currently has the configurability required to make the second half of the original patch moot, and I think it would be better to split the work anyways; - i've addressed the reference to swsusp.txt - the resume argument is provided by (in my case) the system definition, so I basically have something like that: #+begin_src scheme (operating-system (kernel-arguments (cons (string-append "modprobe.blacklist=" (comma-separated %redundant-linux-modules)) '("--resume=/dev/sdb3" "quiet")))) #end_src - in order to support this in the GUIX installer, I guess adding such a line in the generated system definition, along with a swap partition, would be sufficient. My knowledge of the workings of the guix installer is null, tough :) - please note that if you have a suspend signature on your swap partition, and fail to resume from it (for instance because of a missing kernel commandline argument...), then shepherd will fail bringing up the swap device, and you will need to handle this situation by hand currently; - My knowledge of the details of swsusp is rather limited: I don't know, for instance, how this would translate in case of a more complex setup of multi-swap devices; - However, it seems very clear from the documentation that a mere resume= argument syntax can trigger specific initialization paths within the kernel itself leading to a resume. I find it better style, ultimately, to properly separate the responsibilities of kernel and initrd, follow the GUIX conventions with a --resume argument. - therefore I propose the following, updated patch, with a more GUIX-like --resume argument; I've tested it on my laptop, which happens to have an encrypted /home partition (but only one swap device). - as far as I can understand the documentation, the swap partition does not have to be as big as the RAM; by default the kernel will strive to make the suspend image 2/5 of the physical RAM, but this can be tuned more aggressively. There's actually less than overhead: some parts of the memory can be discarded (shared MMAPd files, the buffer cache); and even then you can hope compression will reduce the needs. If the swap space is not large enough, suspend will simply fail. This probably raises more issues than it solves, however i'd rather you have the whole picture. Let me know how to proceed; I'm willing to follow-up with other patches to get the feature up to the required standards of quality. Kind regards, Jean-Baptiste --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-linux-boot-Add-support-for-resuming-from-swap-device.patch Content-Transfer-Encoding: quoted-printable Content-Description: updated resume patch From=206cf0833a93bede5fe41e0f126267876fefbb3672 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Note Date: Mon, 27 Apr 2020 20:42:03 +0000 Subject: [PATCH] linux-boot: Add support for resuming from swap device. * gnu/build/linux-boot.scm (resume-from-device): Add function. * gnu/build/linux-boot.scm (boot-system): Add hook calling resume-from-devi= ce if specified on commandline, before mounting any actual disk filesystems. =2D-- gnu/build/linux-boot.scm | 43 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm index 05e833c0c6..2febe61ec1 100644 =2D-- a/gnu/build/linux-boot.scm +++ b/gnu/build/linux-boot.scm @@ -357,6 +357,37 @@ the last argument of `mknod'." (compose (cut string=3D? program <>) basename)))) (filter-map string->number (scandir "/proc"))))) =20 +(define (resume-from-device resume-device) + "Resume from hibernation state on RESUME-DEVICE. This *must* happen befo= re +we mount any filesystems on disk. See +linux-libre/Documentation/power/swsusp.txt. Please note that this function +will not return if resume happens successfully, and will return if swap de= vice +does not contain a valid resume signature." + (false-if-exception + (let* ((device-base-name + ;; The base name of the device file, after resolving + ;; symlinks. + (let loop ((file resume-device)) + (match (stat:type (lstat file)) + ('symlink + (let ((target (readlink file))) + (if (string-prefix? "/" target) + (loop target) + (loop (string-append (dirname file) "/" target))))) + (_ (basename file))))) + (major+minor + ;; The major:minor string (e.g. "8:2") corresponding + ;; to the resume device. + (call-with-input-file (string-append "/sys/class/block/" + device-base-name + "/dev") + read-line))) + ;; Write the major:minor string to /sys/power/resume + ;; to attempt resume from hibernation. + (when major+minor + (call-with-output-file "/sys/power/resume" + (cut display major+minor <>)))))) + (define* (mount-root-file-system root type #:key volatile-root? (flags 0) options) "Mount the root file system of type TYPE at device ROOT. If VOLATILE-ROO= T? is @@ -493,9 +524,10 @@ upon error." (call-with-error-handling (lambda () (mount-essential-file-systems) =2D (let* ((args (linux-command-line)) =2D (to-load (find-long-option "--load" args)) =2D (root (find-long-option "--root" args))) + (let* ((args (linux-command-line)) + (to-load (find-long-option "--load" args)) + (root (find-long-option "--root" args)) + (resume-device (find-long-option "--resume" args))) =20 (when (member "--repl" args) (start-repl)) @@ -528,6 +560,11 @@ upon error." (unless (pre-mount) (error "pre-mount actions failed"))) =20 + (when (and resume-device + (file-exists? resume-device) + (file-exists? "/sys/power/resume")) + (resume-from-device resume-device)) + (setenv "EXT2FS_NO_MTAB_OK" "1") =20 (if root =2D-=20 2.26.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEPxcq3dp4FVY5UpckkC0pVsuz75YFAl6xq1MACgkQkC0pVsuz 75aSCg//SmzFeJeO6Z1Tcek0yq1pEsuK0BxFoMBs9Lt269yl3ehZZSj/O8Uu7KO/ FJVDtUU5ge+DaSKW8S9rCUFstdMHkCVRHqK6fA37YGHdjJy5nNCa6JaRHExOfSUP BikygFAerkGu+8q5Y12c3EAC+QLYgntjwIF2tJTqjbZP2JMOhA913rvGyC/Vpqm1 9fMR+pSXHrtYXwUbbAsAeCgPNO3lim7REIAsHG+hjw1aFr20XYgfhr2DOdVA3wz6 2m0f0ycYr9mRyoJcAOrQpv0yXRoC81bECbsYPYHxERhKV5JQ0s9zbGa8teYPzzG/ 6QMuSnAPHYS6lDMOrH2OK7w2LJCQ3gohwJ3Q8AFH8ASau/ETopao4URHUhOsjLnL sE7U8RwAHlUQqC48H4xhX59vAD4OZl0w6bR0RIo367PHAcn5PzXQWgjtcakCo9Pa fS9NKGO/tmie+ngQcv2X7XwM4ecCugtxAZ0Zsdg6GoFxOua3xqRFQiHbXbh55LaL VRa34XKq/WgMFbQSmI1iA2qb/jwXrnIuoxSD9V9W1O9Jgz8YqM5xc68sipmFy0fO aEyT5HYyanYSdcT3h1jjvtV/VUqx7Syfxr6q8UOZyWpGvfEeq4s/D37Xr1Hftyq/ QhGxkcZSmXknuNIRf3in9AgX9BRjy6CZguRs+Zxv7ICEcun7zbY= =Wx+h -----END PGP SIGNATURE----- --==-=-=-- From unknown Mon Aug 18 11:30:44 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#40927] [PATCH] Allow resume from swap device during boot Resent-From: Jean-Baptiste Note Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 05 May 2020 19:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40927 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Danny Milosavljevic Cc: 40927@debbugs.gnu.org Received: via spool by 40927-submit@debbugs.gnu.org id=B40927.158870699918419 (code B ref 40927); Tue, 05 May 2020 19:30:02 +0000 Received: (at 40927) by debbugs.gnu.org; 5 May 2020 19:29:59 +0000 Received: from localhost ([127.0.0.1]:37589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jW3GM-0004mw-GL for submit@debbugs.gnu.org; Tue, 05 May 2020 15:29:58 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:45862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jW3GL-0004mj-4I for 40927@debbugs.gnu.org; Tue, 05 May 2020 15:29:53 -0400 Received: by mail-wr1-f67.google.com with SMTP id k1so4086293wro.12 for <40927@debbugs.gnu.org>; Tue, 05 May 2020 12:29:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=f+AbIuUGq9mdzeXRewOz/5zZ8yY7EAtC1rnB8HnGdeo=; b=CSb37mZqLVInot2LG5gtwQVta2jqTxJbrsUqeMZhlE9OjUAcXQ/leGhJg7zDHzMgua E2fHpU0jxms0CC0FIYY6vIyLoihf04eFlfEJPQiMAseAEmCN55cHbTfLoTWwhX2TArH/ LhMdta4pjX2DsKt8uXR9hQ05nqjGcKKMccT6w63s9hSZWdjfkYPpkOUC5CvHTJPVZM7p mLwwRAB98W9wpdKd84qDm7QZ2XdRMR1hcrO48Lg49kMJStajT/ftjl1sMFmiL9uNC9Wr v6AJbbJMeORWpjh2z6caDzQZ45ajFVGkPCoWmky1oQCOw3AZ9sWvSvyzXj5/NxWI9FuD 0pvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=f+AbIuUGq9mdzeXRewOz/5zZ8yY7EAtC1rnB8HnGdeo=; b=gMfB2v12loh7B4a+Fq8uHs9/+6R3EKnbrI1V//Tq8HMQV1hxbNT8YAKi+Qu4476IUp dslY7pExBCoplPDOYeS1dRx17A909xILH4paer7gagF8av37j7MNV6nSC5fRAYsM3NfE BmVPI+dINLuuMjRCXk61ROOLoufL/SKYzdlHdkoihstnFJ7dF9XA2uNGBdCzDFUgpphU LK0VvoLx9svCr/RBHZTRYHdIRIXLUWB36G7BNrD7Ak9SNM1lTEpu+RyBv6DA580KkY58 YvE2mxD4NPVC2BVIBHQ4o3glMS7vLGUmhsPf1NZqwvCpM6KkyM1rOhNR/9PBINugTKSx 41Mw== X-Gm-Message-State: AGi0PuaroHpO6/MpeDaFSsqtnJ7ETPNIuGdMj3ZhAkN2oszSDU2p3Lzs lKMe92WHwrpT/zdX6Jt8AZ9W7K3x8OI= X-Google-Smtp-Source: APiQypLufPY2OakcSpeWl+IjfbF18U5/BUba5TBNAu3AKf/LoCjTTXbrzpZ3OR8vP7erD5fl2B0z/g== X-Received: by 2002:adf:fccc:: with SMTP id f12mr5202042wrs.267.1588706986873; Tue, 05 May 2020 12:29:46 -0700 (PDT) Received: from guixrules ([2a01:e35:2e0b:a6b0:e2ce:c3ff:fe74:cec8]) by smtp.gmail.com with ESMTPSA id n6sm5102225wmc.28.2020.05.05.12.29.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2020 12:29:45 -0700 (PDT) From: Jean-Baptiste Note References: <87zhawax60.fsf@m4x.org> <20200501165045.3d845900@scratchpost.org> <87d07ixnl8.fsf@m4x.org> Date: Tue, 05 May 2020 19:29:36 +0000 In-Reply-To: <87d07ixnl8.fsf@m4x.org> (Jean-Baptiste Note's message of "Tue, 05 May 2020 18:07:15 +0000") Message-ID: <87mu6mw57j.fsf@m4x.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.5 (/) 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: -0.5 (/) --=-=-= Content-Type: text/plain Hi there, As i'm not subscribed to the list, I completely missed on Tobias' messages -- and my previous one must seem strange in hindsight. Sorry about this. I'm now subscribed, but still can't reply directly to his email. Though I still won't be able to answer directly to Tobias' latest email, I will test the patch, and /somehow/ report back on Thursday. For now I must say that on my kernel -- official guix linux-libre-5.4 -- the built-in support does not seem to be working (I'm pretty sure i've tested this); I will double-check however. Kind regards, Jean-Baptiste --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEPxcq3dp4FVY5UpckkC0pVsuz75YFAl6xvqAACgkQkC0pVsuz 75aXrg//ZyTJJq0hEju8EIW2DOu5Q3fz9cxjtKM3guF3Dg9NWi0wLh4vLHd26yGW 6uw1lB9DEvqTHm4kwmpEFW2CTALQy2bx1Cq9Uy1qr/AXMXXjPdDvpqe6ttj+pL5d UuF28VXMlXM+aEB+D8HDigv84odrhwqW8j/kSXrw6GLIszb33KqjKz+0IwaT59KL Ri+N1JAEagv3xSerVwn5BpPcxRinxE0efkaWrse80UOn/wP6NdTwzhpdA8+SFwIR Iwq5EZ2cfCSavUNtzlWvcf6a8C2Fe7fP4xcmjgJ+tfzSbBTpZZMPqgeDX7EbsT2C jFDsNWUkpbad7/zLushDcihbn++5/IbSj2jQ5v3Dl4gsG+nDOj4BukKu8Epe5g5w xsxMobBSh+t0yRWhDWpRP70frsgBEGKav5I2HbZD0f372zjDjCFGBgD/NCUndlgD g7rtexzbsT0LdbqXhQ7OLJZdBx/xyd1uhMB2V2G8xKPjP74pb2vyDdzXbNiRPaub ZG9FCaOjqHh9INTudTNcVgEOVWLed7M6z05skBHDVeQxbuRrH15DG8rfKaQNuhAQ R9B+pZGpZHSaJgls2HKchSuRpEObEudWx3emkW7y6ozjpqi2JQMuFf2XEjGa4LFV tm70MY0fDdxxF0sesxGs2DWpUz1zqZPD2F/Qbfo33EvFkIYp1zg= =vwT5 -----END PGP SIGNATURE----- --=-=-=-- From unknown Mon Aug 18 11:30:44 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#40927] Subject=[bug#40927] [PATCH] Allow resume from swap device during boot References: <87zhawax60.fsf@m4x.org> Resent-From: Jean-Baptiste Note Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 07 May 2020 21:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40927 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: me@tobias.gr, Danny Milosavljevic Cc: 40927@debbugs.gnu.org Received: via spool by 40927-submit@debbugs.gnu.org id=B40927.158888514321793 (code B ref 40927); Thu, 07 May 2020 21:00:02 +0000 Received: (at 40927) by debbugs.gnu.org; 7 May 2020 20:59:03 +0000 Received: from localhost ([127.0.0.1]:44053 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWnbj-0005fQ-72 for submit@debbugs.gnu.org; Thu, 07 May 2020 16:59:03 -0400 Received: from mail-wm1-f42.google.com ([209.85.128.42]:53375) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWnbg-0005es-SR for 40927@debbugs.gnu.org; Thu, 07 May 2020 16:59:01 -0400 Received: by mail-wm1-f42.google.com with SMTP id k12so8060999wmj.3 for <40927@debbugs.gnu.org>; Thu, 07 May 2020 13:59:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:in-reply-to:date:message-id:user-agent :mime-version; bh=mCEmIBe0AJkZ8Wes/QnqGwgWBK62F7eXNYiXrYl6Jmw=; b=piDYMRa5Tph2x0VS7/v/BdhssjncISd1+qiygdamIcP4pmFmAT0VAzsbCQaktcJV4e joAKnWQZoLzI1ThEvpbTcZb/KwJ2KmS8E6GJP34tcJSefGArxMQwAdZPKT75hNd1xU42 qOBkjX9vaIIbdp1khYkUf3tcaB9cvoj9+NdfyrVzy7WP9wXcM6jFS8kPJ9UbnjwEBLNQ lkOe7YCYfy6gWQou/1w4Skn3NaKav0OiBoI/BPXKV4QVNDONxIzYovHP87BbS87J43Ec vdxmVH3x7k4dHT4ONOyj+oMetdB1N5WsXQt2ramfRpDUkJDAfnez8xEgpTBuKOiF6U+4 9Orw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:date :message-id:user-agent:mime-version; bh=mCEmIBe0AJkZ8Wes/QnqGwgWBK62F7eXNYiXrYl6Jmw=; b=n3yv50VNoufjnunwRWrI2AIenax7tSVcLNfZJwW7Tfl0mZeIi0hEPIk5YOnmdadw/l Y8Ue8yVN8LW15uJh29RR/YJl/Nr4DF9h3UGZFW0HK8hQQN8dsd/OeDyLaYR0An+rdBFA NHdNFyVIGVVRuU9GL4WxX+MM2+KgyvgqZiAn8h4hLjI8pAUAHX9h08tFdQVPaqbXluP6 wWQC6v5hBsMkvygDqnyJjW5xLhQbidLyrfT80aMkmjG6hEzlAk157OaA1LFOCyuiqtHr h1zKEabr5avs455dMBwZo9zJ1LTri28Btr+xyTZbu9ydM1Zy7zOBVm15LOPWVefzPoB6 NUCw== X-Gm-Message-State: AGi0PuZvt4kkkzPbjr3POcGw4/T8A4P0umX0cDVxtoqU1BcIo9b20Ubj 67C2DD+xJJdTzn3ExdFUVCmviPcDG6Y= X-Google-Smtp-Source: APiQypKCWxa5XzF4wNTZPAUyle5KO7QuqKOpF066384x0xvqtMIOqhh8SmRdr3thkL/RE31TqVKgdQ== X-Received: by 2002:a1c:b4d4:: with SMTP id d203mr2930881wmf.188.1588885134145; Thu, 07 May 2020 13:58:54 -0700 (PDT) Received: from guixrules ([2a01:e35:2e0b:a6b0:e2ce:c3ff:fe74:cec8]) by smtp.gmail.com with ESMTPSA id z1sm9955030wmf.15.2020.05.07.13.58.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 13:58:53 -0700 (PDT) From: Jean-Baptiste Note In-reply-to: 874ksxnurk.fsf@nckx Date: Thu, 07 May 2020 20:58:45 +0000 Message-ID: <87o8qz798a.fsf@m4x.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.5 (/) 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: -0.5 (/) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Dear Tobias, I hopefully found a way to reply to your message directly. I've checked resume with your patch -- actually a slightly reworked version of it; a few remarks: =2D I've amended it as per Danny's suggestions regarding documentation loca= tion =2D I've adjusted it to take the guixy --resume and --noresume options rather than the kernel norm resume and noresume. In particular this allows me to test the 'kernel' resume path and the 'initrd' resume path with the same os definition quickly, only adjusting the GRUB cmdline within GRUB. =2D I find the added copyright years on top strange -- shouldn't it be 2020 ?=20 The results of my tests are attached as a separate file. In a nutshell: =2D I can confirm that on my kernel (default guix linux-libre-5.4) the resume=3D option by itself does not resume at all. This seems to have been reported already: https://lists.gnu.org/archive/html/bug-guix/2016-11/msg00060.html =2D resume-by-uuid from userspace does not work =2D resume-by-label from userspace does not work either (as much as I'd like them to). (please note that, on top of this, I found no way to specify the swap devices in the os definition by UUID or LABEL either -- so the limitation does not bother me in the current state). Each time these loop for 20 seconds, waiting for the partition to appear (the partition is there, from dmesg, but somehow is not in the database looked for in (canonicalize-device-spec spec) -- weird). Regarding the interface, I'm not sure we should feel bound by the argument naming convention of the kernel for resume handling from userspace -- we could leave its own namespace for the kernel to handle, for those kernels that can, and separate the resume handling as done by initrd in a separate, more guixy namespace. Actually I don't really understand why we would want overlapping of names for two different codepaths; I think separating the names brings more flexibility (you can control from the GRUB commandline which resume path you want to take) and less confusion (it is clearer from the commandline where the resuming will/should be handled). To summarize: * I still think that this feature is greatly needed: we can hibernate with the current software stack, but the default kernel won't resume, leaving the system in a bad state (swap is not activated by shepherd, see logs), and we need manual swapon to leave this bad state; * This version of the patch looks like it can handle UUID and LABEL, while it can't -- for reasons that i've not dug; * Meanwhile I find resume-by-uuid or resume-by-label currently pointless, given the limited ways we have to specify swap devices in the OS definition file. I'd be in favor of doing the following: * Dropping support for UUID and LABEL in the code *OR* signalling clearly in some comment that the path is currently non-functional; * Including the patch ASAP to avoid the really bad state we're in currently after a suspend. * Using the guixy --resume and --noresume options rather than the kernel ones Please let me know how to proceed, and let me know how to handle the copyright notice. Kind regards, Jean-Baptiste --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=tests_resume.txt Content-Transfer-Encoding: quoted-printable Content-Description: resume tests logs # by device node -- does work jb@guixrules ~$ sudo loginctl hibernate jb@guixrules ~$ cat /proc/cmdline=20 BOOT_IMAGE=3D/gnu/store/bkpkbms3mp8s45kpir4f2cnvxvgdvssp-linux-libre-5.4.39= /bzImage --root=3Ded73cc09-aff3-41e4-90b6-51fb41a7d225 --system=3D/gnu/stor= e/xcdn9naivwxhr4x0cq669zzn9f02x706-system --load=3D/gnu/store/xcdn9naivwxhr= 4x0cq669zzn9f02x706-system/boot modprobe.blacklist=3Dpcspkr,snd_pcsp --resu= me=3D/dev/sda3 quiet # by UUID -- does not work jb@guixrules ~$ sudo swaplabel /dev/sdb3 swaplabel: /dev/sdb3: not a valid swap partition jb@guixrules ~$ sudo swapon /dev/sdb3 swapon: /dev/sdb3: software suspend data detected. Rewriting the swap signa= ture. jb@guixrules ~$ sudo swaplabel /dev/sdb3 LABEL: resume_device UUID: 446c81d4-efcf-4508-a9ab-bb38f74ff77d jb@guixrules ~$ cat /proc/cmdline=20 BOOT_IMAGE=3D/gnu/store/bkpkbms3mp8s45kpir4f2cnvxvgdvssp-linux-libre-5.4.39= /bzImage --root=3Ded73cc09-aff3-41e4-90b6-51fb41a7d225 --system=3D/gnu/stor= e/xcdn9naivwxhr4x0cq669zzn9f02x706-system --load=3D/gnu/store/xcdn9naivwxhr= 4x0cq669zzn9f02x706-system/boot modprobe.blacklist=3Dpcspkr,snd_pcsp --resu= me=3D446c81d4-efcf-4508-a9ab-bb38f74ff77d quiet jb@guixrules ~$ diff <(echo 446c81d4-efcf-4508-a9ab-bb38f74ff77d) <(echo 44= 6c81d4-efcf-4508-a9ab-bb38f74ff77d) jb@guixrules ~$ echo $? 0 # by LABEL -- does not work jb@guixrules ~$ sudo swaplabel /dev/sdb3 swaplabel: /dev/sdb3: not a valid swap partition jb@guixrules ~$ sudo swapon /dev/sdb3 swapon: /dev/sdb3: software suspend data detected. Rewriting the swap signa= ture. jb@guixrules ~$ sudo swaplabel=20 swaplabel: no device specified Try 'swaplabel --help' for more information. jb@guixrules ~$ sudo swaplabel /dev/sdb3 LABEL: resume_device UUID: 446c81d4-efcf-4508-a9ab-bb38f74ff77d jb@guixrules ~$ cat /proc/cmdline=20 BOOT_IMAGE=3D/gnu/store/bkpkbms3mp8s45kpir4f2cnvxvgdvssp-linux-libre-5.4.39= /bzImage --root=3Ded73cc09-aff3-41e4-90b6-51fb41a7d225 --system=3D/gnu/stor= e/xcdn9naivwxhr4x0cq669zzn9f02x706-system --load=3D/gnu/store/xcdn9naivwxhr= 4x0cq669zzn9f02x706-system/boot modprobe.blacklist=3Dpcspkr,snd_pcsp --resu= me=3Dresume_device quiet # leaving it to the kernel -- does not work jb@guixrules ~$ sudo swaplabel /dev/sdb3 swaplabel: /dev/sdb3: not a valid swap partition jb@guixrules ~$ sudo swapon /dev/sdb3 swapon: /dev/sdb3: software suspend data detected. Rewriting the swap signa= ture. jb@guixrules ~$ cat /proc/cmdline=20 BOOT_IMAGE=3D/gnu/store/bkpkbms3mp8s45kpir4f2cnvxvgdvssp-linux-libre-5.4.39= /bzImage --root=3Ded73cc09-aff3-41e4-90b6-51fb41a7d225 --system=3D/gnu/stor= e/xcdn9naivwxhr4x0cq669zzn9f02x706-system --load=3D/gnu/store/xcdn9naivwxhr= 4x0cq669zzn9f02x706-system/boot modprobe.blacklist=3Dpcspkr,snd_pcsp resume= =3D/dev/sdb3 quiet --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-linux-boot-Resume-from-hibernation.patch Content-Transfer-Encoding: quoted-printable Content-Description: resume patch with longopt From=20889fc647a84289747ae840778f0313193eca1316 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Note Date: Wed, 6 May 2020 20:38:21 +0000 Subject: [PATCH] linux-boot: Resume from hibernation. MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit * gnu/build/linux-boot.scm (resume-if-hibernated): New procedure. (boot-system): Call it unless =E2=80=98noresume=E2=80=99 was specified. =2D-- gnu/build/linux-boot.scm | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm index 05e833c0c6..be1cda0181 100644 =2D-- a/gnu/build/linux-boot.scm +++ b/gnu/build/linux-boot.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Cour= t=C3=A8s +;;; Copyright =C2=A9 2016, 2017, 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright =C2=A9 2017 Mathieu Othacehe ;;; Copyright =C2=A9 2019 Guillaume Le Vaillant ;;; @@ -110,6 +111,52 @@ OPTION doesn't appear in ARGUMENTS." (substring arg (+ 1 (string-index arg #\=3D))))) arguments))) =20 +(define (resume-if-hibernated device) + "Resume from hibernation if possible. This is safe ONLY if no on-disk f= ile +systems have been mounted; calling it later risks severe file system +corruption! See in the kernel source +directory. This is the caller's responsibility, as is catching exceptions= if +resumption was supposed to happen but didn't. + +Resume only from DEVICE if it's a string. If it's #f, use the kernel's de= fault +hibernation device (CONFIG_PM_STD_PARTITION). Never return if resumption +succeeds. Return nothing otherwise. The kernel logs any details to dmesg= ." + + (define (string->major:minor string) + "Return a string with MAJOR:MINOR numbers of the device specified by S= TRING." + + ;; The "resume=3D" kernel command-line option always provides a string= , which + ;; can represent a device, a UUID, or a label. Check for all three. + (let* ((spec (cond ((string-prefix? "/" string) string) + ((uuid string) =3D> identity) + (else (file-system-label string)))) + ;; XXX kernel's swsusp_resume_can_resume() waits for the resume + ;; device to appear if =E2=80=98resumewait=E2=80=99 is found on= the command line; + ;; our canonicalize-device-spec gives up after 20 seconds. We + ;; could loop (ew!) if someone relies on it=E2=80=A6 + (device (canonicalize-device-spec spec)) + (rdev (stat:rdev (stat device))) + (minor (modulo rdev 256)) + (major (/ (- rdev minor) 256))) + (format #f "~a:~a" major minor))) + + ;; Write the MAJOR:MINOR numbers of the specified or default resume DEVI= CE to + ;; this magic file. The kernel will immediately try to resume from it. + (let ((resume "/sys/power/resume")) + (when (file-exists? resume) ; this kernel supports hibernation + ;; Honour the kernel's default device (only) if none other was given. + (let ((major:minor (if device + (string->major:minor device) + (let ((default (call-with-input-file resume + read-line))) + ;; Don't waste time echoing =E2=80=98nothin= g=E2=80=99 to /sys. + (if (string=3D? "0:0" default) + #f + default))))) + (when major:minor + (call-with-output-file resume ; may throw an =E2=80=98Invalid ar= gument=E2=80=99 + (cut display major:minor <>))))))) ; may never return + (define* (make-disk-device-nodes base major #:optional (minor 0)) "Make the block device nodes around BASE (something like \"/root/dev/sda= \") with the given MAJOR number, starting with MINOR." @@ -504,6 +551,12 @@ upon error." (load-linux-modules-from-directory linux-modules linux-module-directory) =20 + (unless (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) =2D-=20 2.26.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEPxcq3dp4FVY5UpckkC0pVsuz75YFAl60doUACgkQkC0pVsuz 75bf4A//SgQPn8X66AT1smg6yuue4f4dr+yuoptzl3uSgo0VqbhhgcYHU5sUN+u6 0fVmII0LtUqqN7bRCIJZQpPR6zh6A0cXRhtGe/6wtoVz4y4PlUleMIRcuZgtK79g kCNEoKmSv6WHxU8jwdd3kmoXZ0gPwdxs9cJRII+Z6kveT09rlMkCrDAMIMw0sJBX PWZxChp12hbPqvFLb0vlUXQH43CNjdJecJPzH2y49z/ZryBsW4S4QPvahyd03y3K 4TKyF/KYTSoKy+x3c1Nae2LhOvLz4eSuiNyMJM2KUuNdCd2AELYzBmB2usoZbEpl cJtFkualiMfPmW1BXBKWmATlZUPWAOLVM3fnTcPPar7OwnPSaQWVJo5E/Ha18yeh ChLf92OZ/mqallTNJ8bARI/c0BVs1XLdbjL96dVGz4dZLNShMQPYi38NdFjRnNDf 9b6ZVucP9l/Diar+ev0xHO1T/CtH+TpFcLJwnBbn5L96OSNtAYZrw72G3RRhoAox ZcQ0NhsRhVMMo7BlwkzfrNDoGQJjJwL+WvM49pQ2z+uWrHKv7IZ+taKR2fXPqi+4 QH6YqO79SiQdZ0KT+3MnMnwkcldVLHzIVHRDd6xDQ/kneY4tqP/mwGf/hGriUE+M E6AqSL95lZ4Gh55KkPxJoYs7jOhQx9UUOebHW9Od8Gus4M4nOHg= =1l4t -----END PGP SIGNATURE----- --==-=-=-- From unknown Mon Aug 18 11:30:44 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Jean-Baptiste Note Subject: bug#40927: closed (Close hibernation bugs) Message-ID: References: <878s4n66qs.fsf@nckx> <87zhawax60.fsf@m4x.org> X-Gnu-PR-Message: they-closed 40927 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 40927@debbugs.gnu.org Date: Sun, 09 May 2021 19:35:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1620588903-3431-1" This is a multi-part message in MIME format... ------------=_1620588903-3431-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #40927: [PATCH] Allow resume from swap device during boot which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 40927@debbugs.gnu.org. --=20 40927: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D40927 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1620588903-3431-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 40927-done) by debbugs.gnu.org; 9 May 2021 19:34:56 +0000 Received: from localhost ([127.0.0.1]:56631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lfpCa-0000sY-0Z for submit@debbugs.gnu.org; Sun, 09 May 2021 15:34:56 -0400 Received: from tobias.gr ([80.241.217.52]:35978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lfpCY-0000sM-DL; Sun, 09 May 2021 15:34:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tobias.gr; s=2018; bh=ilqLFflMU6emAIagwYwARiYoSKIz8Rod4juTtMhJb88=; h=date:subject:to: from; b=VaB+50cqkVp6BwvuILPBYPedcTVzR2LKbaAxdhDGH5wD/Y7hT62UrYVer/ou0o TiuXpKIzBwM5dH+q8fThPwHYYC9e5xCxGKO6Hiw0NOSEtAKiqHOoURO7HapdS9mattCf7B 2IAf1y0UrbBDWzGAMfjB6qU0ek2/nRdkQvfeBVlN/1ky0yzRxZC4stP3kE93I2O0mSFB0h qD6CGcx+6NQBTajcII/nYZTy+vtsgxyWxAdD5Q0ZammPSbLP7iKnIEWzS9tZkHfhjhDrEl RgT7tKihxoTYBLNMuqqT80v+cDddIVSqEy+jJVuRLYu2+lMHXYq3iDpEadw7gvQraYR5fw == Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id caaa75fa (TLSv1.2:ECDHE-ECDSA-AES256-GCM-SHA384:256:NO); Sun, 9 May 2021 19:35:05 +0000 (UTC) From: Tobias Geerinckx-Rice To: 37290-done@debbugs.gnu.org, 40927-done@debbugs.gnu.org Subject: Close hibernation bugs BIMI-Selector: v=BIMI1; s=default; Date: Sun, 09 May 2021 21:34:51 +0200 Message-ID: <878s4n66qs.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40927-done 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: -3.3 (---) --=-=-= Content-Type: text/plain; format=flowed Hibernation has been supported on Guix Systems for a very long time now. I'm not aware of any, but any failures to hibernate are probably configuration or hardware-specific and should be reported as new bugs. Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYJg5Ww0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW15dlMA/jBmkNM5arayRiPDSQwa9LCL57WUZwxneWgWTD5e rl6rAQC55QAK30qLaO99EamcXHWq4G8Lp58hvOwJpbd7gZktBQ== =6OBF -----END PGP SIGNATURE----- --=-=-=-- ------------=_1620588903-3431-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 28 Apr 2020 09:24:29 +0000 Received: from localhost ([127.0.0.1]:38929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTMTc-0000sy-LQ for submit@debbugs.gnu.org; Tue, 28 Apr 2020 05:24:29 -0400 Received: from lists.gnu.org ([209.51.188.17]:55461) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTM4M-0000B7-82 for submit@debbugs.gnu.org; Tue, 28 Apr 2020 04:58:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55174) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTM1t-0007yp-7C for guix-patches@gnu.org; Tue, 28 Apr 2020 04:58:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTLvs-0005Cn-Ey for guix-patches@gnu.org; Tue, 28 Apr 2020 04:50:48 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:50268) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jTKdR-0000Wm-Ul for guix-patches@gnu.org; Tue, 28 Apr 2020 03:26:30 -0400 Received: by mail-wm1-x342.google.com with SMTP id x25so1527991wmc.0 for ; Tue, 28 Apr 2020 00:26:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:user-agent:mime-version; bh=v7ZhvYbvUTYrgj0wxY+58SvXoPamvvXAQnWz/NML49E=; b=UxTHj0ZwqOq7MoB4GL/yFYz2oV+sY0kXqLxpol9mTFsNvNJ37jLAUkdYVywtDtZQuS 0AXH3SYiAG9qwVdVxJbPYoQSkSWD4JHS10Jk7TzUHwjgHv/rEWEn4l81eYkBaZtKztgj 5pJUVCTgHCGqzvkK7b5qo1ihmbHJtR4hYuZl4Eqpng2WMDQ9bXhJtSxVp6CDOKySI48k qrQZ60jxkxSvqBpEsX/M72r/Hk9sSJJsdrjeixszfBrixYXyvN3IqJAZJmNjb5K1C213 n57ge1WZmwhfkDHKPSBx7jfLVE2h6Sj+ogyWVUAUJvesJD6v5N4URZdLLZeRbxWrLfCi HzMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :user-agent:mime-version; bh=v7ZhvYbvUTYrgj0wxY+58SvXoPamvvXAQnWz/NML49E=; b=AGJWJ8RsJqNRg4WuMV21tN5G03gfzydsABLW648fW5qHYOH8Q05N7oQ8CZkmQ6hwSJ /XmceC41bJ9y9bPheFPCenBY0GElS5R8XI6Jnw2sxMgXBWoY7nWKy5qjTG6NORznr3id OxnmiaFHjdAuZMkE1JfH21XY8rZ56cNFBl/sZcYgvIUSgtYTOiz4zTQQdbOf2jDgIqD9 QhnypkHWs9ZQrXLn99fHU8cnYy74wRkAvEY67UyBQJWBx0S+d9UGhH4DOBkkfG7WvqSO 3rrGbuH9s92ESjGIBz1GE6+rw3p5/LAHfCyZiiD1iVTLiTQ2EkHpa1kSDvrsT57KQmZu 4aow== X-Gm-Message-State: AGi0PubNSZ9M92onaNNlHprQkENmKNqT0K7QnqEFb84qbiLXkT9sE/Lj Z5nhc+ybr1X6qIDmz8tj1jq6Dq1lffI= X-Google-Smtp-Source: APiQypLO0zjXLFfarh9qEL23cCm3oBDnzDvz3nq6zGfKBCDEN2hIa7YuMMIVKNFfQF5fvhlKCGe3BA== X-Received: by 2002:a1c:668a:: with SMTP id a132mr3142826wmc.46.1588058787882; Tue, 28 Apr 2020 00:26:27 -0700 (PDT) Received: from guixrules ([2a01:e35:2e0b:a6b0:e2ce:c3ff:fe74:cec8]) by smtp.gmail.com with ESMTPSA id t20sm2716706wmi.2.2020.04.28.00.26.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2020 00:26:26 -0700 (PDT) From: Jean-Baptiste Note To: guix-patches@gnu.org Subject: [PATCH] Allow resume from swap device during boot Date: Tue, 28 Apr 2020 07:26:15 +0000 Message-ID: <87zhawax60.fsf@m4x.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=2a00:1450:4864:20::342; envelope-from=jbnote@gmail.com; helo=mail-wm1-x342.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2a00:1450:4864:20::342 X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Dear GUIX maintainers, Current the GUIX SD boot process does not allow resuming from sleep, even thought sleep options are available through loginctl, eg: loginctl hybrid-sleep loginctl hibernate Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: m4x.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (jbnote[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 2.0 SPOOFED_FREEMAIL No description available. X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 28 Apr 2020 05:24:24 -0400 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.8 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Dear GUIX maintainers, Current the GUIX SD boot process does not allow resuming from sleep, even thought sleep options are available through loginctl, eg: loginctl hybrid-sleep loginctl hibernate This is a very important feature for people like me using GUIX SD on a laptop (yes, it is possible, mine is a corebooted X230 running linux-libre!) This patch is based on a patch floating around. The core functionality has been isolated, the resume function isolated, the patch rebased and tested. I'm not taking credit for it, even though tracing the exact origin is hard. The resume hook is called if the resume= kernel argument is provided, which one can do during system configuration. My scheme level is zero, so please bear with me. In particular, some conditionals could maybe be moved within the function, or the function itself called within some already-available hooks. Also it is not clear if the commit log is adequate for such a change. Please let me know how to improve this and get this merged; I can also write some documentation (probably once the mechanism is in place) to explain how the feature can be used. Kind regards, Jean-Baptiste --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-linux-boot-Add-support-for-resuming-from-swap-device.patch Content-Transfer-Encoding: quoted-printable Content-Description: allow resume from swap From=202531d1d08dabb53ff15020aedcec2ad5d8e6c600 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Note Date: Mon, 27 Apr 2020 20:42:03 +0000 Subject: [PATCH] linux-boot: Add support for resuming from swap device. * gnu/build/linux-boot.scm (resume-from-device): Add function. * gnu/build/linux-boot.scm (boot-system): Add hook calling resume-from-devi= ce if specified on commandline, before mounting any actual disk filesystems. =2D-- gnu/build/linux-boot.scm | 43 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm index 4fb711b8f2..907c84276f 100644 =2D-- a/gnu/build/linux-boot.scm +++ b/gnu/build/linux-boot.scm @@ -357,6 +357,37 @@ the last argument of `mknod'." (compose (cut string=3D? program <>) basename)))) (filter-map string->number (scandir "/proc"))))) =20 +(define (resume-from-device resume-device) + "Resume from hibernation state on device DEVICE. This *must* happen befo= re +we mount any filesystems on disk. See +linux-libre/Documentation/swsusp.txt. Please note that this function will = not +return if resume happens successfully, and will return if swap device does= not +contain a valid resume signature." + (false-if-exception + (let* ((device-base-name + ;; The base name of the device file, after resolving + ;; symlinks. + (let loop ((file resume-device)) + (match (stat:type (lstat file)) + ('symlink + (let ((target (readlink file))) + (if (string-prefix? "/" target) + (loop target) + (loop (string-append (dirname file) "/" target))))) + (_ (basename file))))) + (major+minor + ;; The major:minor string (e.g. "8:2") corresponding + ;; to the resume device. + (call-with-input-file (string-append "/sys/class/block/" + device-base-name + "/dev") + read-line))) + ;; Write the major:minor string to /sys/power/resume + ;; to attempt resume from hibernation. + (when major+minor + (call-with-output-file "/sys/power/resume" + (cut display major+minor <>)))))) + (define* (mount-root-file-system root type #:key volatile-root? (flags 0) options) "Mount the root file system of type TYPE at device ROOT. If VOLATILE-ROO= T? is @@ -493,9 +524,10 @@ upon error." (call-with-error-handling (lambda () (mount-essential-file-systems) =2D (let* ((args (linux-command-line)) =2D (to-load (find-long-option "--load" args)) =2D (root (find-long-option "--root" args))) + (let* ((args (linux-command-line)) + (to-load (find-long-option "--load" args)) + (root (find-long-option "--root" args)) + (resume-device (find-long-option "resume" args))) =20 (when (member "--repl" args) (start-repl)) @@ -528,6 +560,11 @@ upon error." (unless (pre-mount) (error "pre-mount actions failed"))) =20 + (when (and resume-device + (file-exists? resume-device) + (file-exists? "/sys/power/resume")) + (resume-from-device resume-device)) + (setenv "EXT2FS_NO_MTAB_OK" "1") =20 (if root =2D-=20 2.26.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEPxcq3dp4FVY5UpckkC0pVsuz75YFAl6n2pcACgkQkC0pVsuz 75alJhAAgVioSCWGAi3lUwiYvDIM6KaZLFDMbORZGFnGF5qtI82i1EvOs7GMk8QV fLyUfepbIRMPLnJtmIcQb1Cnqz1dG45168Gr0BcTNY1L3YiFhjnxlKQrAoa0KgK/ o1hO1T/6uR3QiRpCNwCrcV5ouk4cZVnnNx2JKKeQAOlgHn8eSFwO6dIRnbfL54p7 tFhg6si2QqrxPnY1exeZ0LFxLbzivel4OCRNja03VGv0CTQnK+htls496rkqtZEx 84a/7LT1P8dtmq9bv0CACfDfU7VIKVnozQOJhx0Ek2yfV34127xvfIU8alF1TWpe yzthVSJ8uzS83c/ximcAi7uNrEszQqoEPoOnJBqRuzuPXfWgroCNnOUrQbETMD/g APYYvSruXcbWkZd5VIBNo6fZZUzYFdI6y/DU2bK2X2Y4hsT8hendt3/pSFv8bv55 yexEWmrxEuDCm0Mb2P8DewxOTnPvSH0N2VLizTb4ZPg6vjHbzuvdzY3QzquTclk6 5SI5C4XlNPYNp1rSjMJnG1uv7BN771yfWnbQQQKg/0jWP0NIZ2REU27p/G4YbNcA ZhbS74upz/iEsEGBRWkyPEnSKtGgCbLDiT3VDeJ+Dbhae3egxiiQ0KBEfXUjqkLX a8sgx66ZhmgxO5IubMTsoJrc1e+u7IRSmB9dmfunxOisryxG7sY= =db63 -----END PGP SIGNATURE----- --==-=-=-- ------------=_1620588903-3431-1--