From unknown Fri Aug 08 15:19:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38809] [PATCH] bootloader: grub: Add resolution override. Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 30 Dec 2019 10:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 38809 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 38809@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.1577702001555 (code B ref -1); Mon, 30 Dec 2019 10:34:02 +0000 Received: (at submit) by debbugs.gnu.org; 30 Dec 2019 10:33:21 +0000 Received: from localhost ([127.0.0.1]:60511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilsMO-00008o-8L for submit@debbugs.gnu.org; Mon, 30 Dec 2019 05:33:21 -0500 Received: from lists.gnu.org ([209.51.188.17]:48857) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilsMM-00008e-6M for submit@debbugs.gnu.org; Mon, 30 Dec 2019 05:33:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58866) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilsMK-0007Vc-Hr for guix-patches@gnu.org; Mon, 30 Dec 2019 05:33:14 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED,BAYES_50, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33030) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ilsMK-000239-Cy; Mon, 30 Dec 2019 05:33:12 -0500 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=58498 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ilsMJ-0007p9-SI; Mon, 30 Dec 2019 05:33:12 -0500 From: Jan Nieuwenhuizen Date: Mon, 30 Dec 2019 11:33:09 +0100 Message-ID: <87lfquhzmi.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: text/plain Hi, With this patch I finally have a readable GRUB menu. I am not sure about the name and semantics of `resolution': Better to use `gfxmode', and/or use a list of strings '("1024x768x32" "auto"), ... WDYT? Greetings, janneke --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-bootloader-grub-Add-resolution-override.patch Content-Transfer-Encoding: quoted-printable >From dfceb5702b0de5787f79e1098b4787e9d3adbe4e Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 30 Dec 2019 11:25:40 +0100 Subject: [PATCH] bootloader: grub: Add resolution override. * gnu/bootloader/grub.scm (): Add `resolution' entry. (eye-candy): Use it. * doc/guix.texi (Bootloader Configuration): Document it. --- doc/guix.texi | 26 ++++++++++++++++++++++++-- gnu/bootloader/grub.scm | 11 +++++++---- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index efc59c1aaf..02cecae043 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -25923,9 +25923,20 @@ must @emph{not} be an OS device name such as @file= {/dev/sda1}. @end table @end deftp =20 +@cindex HDPI +@cindex resolution @c FIXME: Write documentation once it's stable. -For now only GRUB has theme support. GRUB themes are created using -the @code{grub-theme} form, which is not documented yet. +For now only GRUB has theme support. GRUB themes are created using +the @code{grub-theme} form, which is not fully documented yet. + +@deftp {Data Type} grub-theme +Data type representing the configuration of the GRUB theme. + +@table @asis +@item @code{resolution} (default: @code{"auto"}) +The @code{gfxmode} to set (@pxref{gfxmode,,, grub, GNU GRUB manual}). +@end table +@end deftp =20 @defvr {Scheme Variable} %default-theme This is the default GRUB theme used by the operating system if no @@ -25936,6 +25947,17 @@ It comes with a fancy background image displaying = the GNU and Guix logos. @end defvr =20 +For example, to override the default resolution, you may use something +like + +@lisp +(bootloader + (grub-configuration + ;; @dots{} + (theme (grub-theme + (inherit %default-theme) + (resolution "1024x786x32;auto"))))) +@end lisp =20 @node Invoking guix system @section Invoking @code{guix system} diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index fd62f627a0..70de3edeb5 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -3,6 +3,7 @@ ;;; Copyright =C2=A9 2016 Chris Marusich ;;; Copyright =C2=A9 2017 Leo Famulari ;;; Copyright =C2=A9 2017 Mathieu Othacehe +;;; Copyright =C2=A9 2019 Jan (janneke) Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -88,7 +89,9 @@ denoting a file name." (color-normal grub-theme-color-normal (default '((fg . cyan) (bg . blue)))) (color-highlight grub-theme-color-highlight - (default '((fg . white) (bg . blue))))) + (default '((fg . white) (bg . blue)))) + (resolution grub-resolution + (default "auto"))) =20 (define %background-image (grub-image @@ -149,8 +152,8 @@ system string---e.g., \"x86_64-linux\"." ;; most other modern architectures have no other mode and therefore do= n't ;; need to be switched. (if (string-match "^(x86_64|i[3-6]86)-" system) - " - # Leave 'gfxmode' to 'auto'. + (string-append " + set gfxmode=3D" (grub-resolution (bootloader-configuration-theme config)= ) " insmod video_bochs insmod video_cirrus insmod gfxterm @@ -166,7 +169,7 @@ system string---e.g., \"x86_64-linux\"." insmod vbe insmod vga fi -" +") "")) =20 (define (setup-gfxterm config font-file) --=20 2.24.0 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-=-- From unknown Fri Aug 08 15:19:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38809] [PATCH] bootloader: grub: Add resolution override. Resent-From: Brett Gilio Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 04 Jan 2020 04:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38809 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Jan Nieuwenhuizen Cc: 38809@debbugs.gnu.org Received: via spool by 38809-submit@debbugs.gnu.org id=B38809.15781127934810 (code B ref 38809); Sat, 04 Jan 2020 04:40:01 +0000 Received: (at 38809) by debbugs.gnu.org; 4 Jan 2020 04:39:53 +0000 Received: from localhost ([127.0.0.1]:42353 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inbE8-0001FV-Qf for submit@debbugs.gnu.org; Fri, 03 Jan 2020 23:39:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inbE7-0001FH-Qc for 38809@debbugs.gnu.org; Fri, 03 Jan 2020 23:39:52 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1inbE2-0004lV-Ka; Fri, 03 Jan 2020 23:39:46 -0500 Received: from [2605:6000:1a0d:4c95::3d] (port=48910 helo=oryx) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1inbE2-0005q9-4h; Fri, 03 Jan 2020 23:39:46 -0500 From: Brett Gilio References: <87lfquhzmi.fsf@gnu.org> Date: Fri, 03 Jan 2020 22:39:57 -0600 In-Reply-To: <87lfquhzmi.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Mon, 30 Dec 2019 11:33:09 +0100") Message-ID: <87eewfzvfm.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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 (---) Jan Nieuwenhuizen writes: > Hi, > > With this patch I finally have a readable GRUB menu. I am not sure > about the name and semantics of `resolution': Better to use `gfxmode', > and/or use a list of strings '("1024x768x32" "auto"), ... WDYT? > > Greetings, > janneke > >>>From dfceb5702b0de5787f79e1098b4787e9d3adbe4e Mon Sep 17 00:00:00 2001 > From: Jan Nieuwenhuizen > Date: Mon, 30 Dec 2019 11:25:40 +0100 > Subject: [PATCH] bootloader: grub: Add resolution override. > > * gnu/bootloader/grub.scm (): Add `resolution' entry. > (eye-candy): Use it. > * doc/guix.texi (Bootloader Configuration): Document it. > --- > doc/guix.texi | 26 ++++++++++++++++++++++++-- > gnu/bootloader/grub.scm | 11 +++++++---- > 2 files changed, 31 insertions(+), 6 deletions(-) > > diff --git a/doc/guix.texi b/doc/guix.texi > index efc59c1aaf..02cecae043 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -25923,9 +25923,20 @@ must @emph{not} be an OS device name such as @fi= le{/dev/sda1}. > @end table > @end deftp >=20=20 > +@cindex HDPI > +@cindex resolution > @c FIXME: Write documentation once it's stable. > -For now only GRUB has theme support. GRUB themes are created using > -the @code{grub-theme} form, which is not documented yet. > +For now only GRUB has theme support. GRUB themes are created using > +the @code{grub-theme} form, which is not fully documented yet. > + > +@deftp {Data Type} grub-theme > +Data type representing the configuration of the GRUB theme. > + > +@table @asis > +@item @code{resolution} (default: @code{"auto"}) > +The @code{gfxmode} to set (@pxref{gfxmode,,, grub, GNU GRUB manual}). > +@end table > +@end deftp >=20=20 > @defvr {Scheme Variable} %default-theme > This is the default GRUB theme used by the operating system if no > @@ -25936,6 +25947,17 @@ It comes with a fancy background image displayin= g the GNU and Guix > logos. > @end defvr >=20=20 > +For example, to override the default resolution, you may use something > +like > + > +@lisp > +(bootloader > + (grub-configuration > + ;; @dots{} > + (theme (grub-theme > + (inherit %default-theme) > + (resolution "1024x786x32;auto"))))) > +@end lisp >=20=20 > @node Invoking guix system > @section Invoking @code{guix system} > diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm > index fd62f627a0..70de3edeb5 100644 > --- a/gnu/bootloader/grub.scm > +++ b/gnu/bootloader/grub.scm > @@ -3,6 +3,7 @@ > ;;; Copyright =C2=A9 2016 Chris Marusich > ;;; Copyright =C2=A9 2017 Leo Famulari > ;;; Copyright =C2=A9 2017 Mathieu Othacehe > +;;; Copyright =C2=A9 2019 Jan (janneke) Nieuwenhuizen > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -88,7 +89,9 @@ denoting a file name." > (color-normal grub-theme-color-normal > (default '((fg . cyan) (bg . blue)))) > (color-highlight grub-theme-color-highlight > - (default '((fg . white) (bg . blue))))) > + (default '((fg . white) (bg . blue)))) > + (resolution grub-resolution > + (default "auto"))) >=20=20 > (define %background-image > (grub-image > @@ -149,8 +152,8 @@ system string---e.g., \"x86_64-linux\"." > ;; most other modern architectures have no other mode and therefore = don't > ;; need to be switched. > (if (string-match "^(x86_64|i[3-6]86)-" system) > - " > - # Leave 'gfxmode' to 'auto'. > + (string-append " > + set gfxmode=3D" (grub-resolution (bootloader-configuration-theme confi= g)) " > insmod video_bochs > insmod video_cirrus > insmod gfxterm > @@ -166,7 +169,7 @@ system string---e.g., \"x86_64-linux\"." > insmod vbe > insmod vga > fi > -" > +") > "")) >=20=20 > (define (setup-gfxterm config font-file) > --=20 > 2.24.0 Hi Jan, This seems like a sensible change, and is something other distributions seem to implement in their own manner, as well. I am in favor of this change, and will test it ASAP. --=20 Brett M. Gilio GNU Guix, Contributor | GNU Project, Webmaster [DFC0 C7F7 9EE6 0CA7 AE55 5E19 6722 43C4 A03F 0EEE] From unknown Fri Aug 08 15:19:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38809] [PATCH] bootloader: grub: Add resolution override. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 04 Jan 2020 10:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38809 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 38809@debbugs.gnu.org, Jan Nieuwenhuizen Received: via spool by 38809-submit@debbugs.gnu.org id=B38809.15781345077061 (code B ref 38809); Sat, 04 Jan 2020 10:42:02 +0000 Received: (at 38809) by debbugs.gnu.org; 4 Jan 2020 10:41:47 +0000 Received: from localhost ([127.0.0.1]:42507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ingsN-0001pp-4X for submit@debbugs.gnu.org; Sat, 04 Jan 2020 05:41:47 -0500 Received: from tobias.gr ([80.241.217.52]:42230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ingsK-0001pf-Mo for 38809@debbugs.gnu.org; Sat, 04 Jan 2020 05:41:45 -0500 Received: by tobias.gr (OpenSMTPD) with ESMTP id 28dc8237; Sat, 4 Jan 2020 10:41:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tobias.gr; h=from:to :subject:references:in-reply-to:date:message-id:mime-version :content-type; s=2018; i=me@tobias.gr; bh=JOBoxHDY3H9vNVc9ugeskm XrWv6rv5c/lpl79BQWJ68=; b=ZVZ8qAXbCW9ubhcZKRlrOHpTU2vCVdE37fKCF1 iOw+uovdf3W3YBdY24knG4xTVMz47cTCYGykkEMnzQYjTX4W7U2Dw/xyv78OaXb6 +cUA7l3mjZQoyJLetr1ivUkSodVwpwZ+tRihUJRJ1UxjftDjKkqMEu0nNgbSix0/ UhbYhWUOB/FDJlwXvkjCvEoZsVr1Z5Bh6bMB+9eT+tLX1bqGxdL4UxGgWm7c3ZUn 0ed+VjsupWd+ofVZH3kHPL9Vs46mIj0I66+smXE3Ip3VaRik2ct5zeqWdxqyJv7n mqZtaPcZmaCjzcOWuledarn44eaJD6DP7C/IWZ33iWWLNGsg== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 4c82cc84 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 4 Jan 2020 10:41:38 +0000 (UTC) From: Tobias Geerinckx-Rice References: <87lfquhzmi.fsf@gnu.org> In-reply-to: <87lfquhzmi.fsf@gnu.org> Date: Sat, 04 Jan 2020 11:41:36 +0100 Message-ID: <87lfqn8pwf.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: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Jan Nieuwenhuizen =E5=86=99=E9=81=93=EF=BC=9A > With this patch I finally have a readable GRUB menu. Thanks! Perhaps it will help solve my EFI framebuffer woes=20 (probably not but who knows. > I am not sure about the name and semantics of `resolution': > Better to use `gfxmode', and/or use a list of strings > '("1024x768x32" "auto"), ... WDYT? Yes please, on both counts. Grub-theme should expose the GRUB=20 variable, not a lossy abstraction. Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEfo+u0AlEeO9y5k0W2Imw8BjFSTwFAl4Qa+AACgkQ2Imw8BjF STxfzw//U0NLd2qwRyWJGE238fw1jEuj7STLag921qyR4qKVZRuw3xNkgG4DZBf/ gUvYcbjQfevgPmtYsq/qF5yOlDSbYqQX9f/40I8tTTO94t7D1GD5G7cZcWoppZe4 VUr0FDmTpmAjZh85KkeznOcTxx1RGg0sFXcPMtF7H5cPlyPN4VaZch1mkChdxEET gISQd9T7sMwkZiP73NwrHOk60WKazFuVKjQAUve1AGqBHGwVu8p0MdF9VJ4DV1Va wnbOEOsj0cqBpYDsN2dTZGYwT5arM6W2Kebi1hxE/QacsIaJznRHobAC9zlD1G1z liXauQ4aqJdmMoX8i/QYeh4MQ80IeTfoodZ6EL91F7nwDbTB1KqfVYtaXylWx52L Qx38BMyiyx7DQ0ZRIE/q8Kq22NgxWxUMinLUAImGNT1wHmRCqFWxquoRW1AcalMP r/mKGyC2nJN2ID4LmM438jwLxkO3thzi33ITF1RTUwK02JDLJXz+gMptI/vWGYka tJfhWjcKcHBRjWF7Z7KSTYi29t6ugjVhNFJ24BPsu8Bjzz/L2ie1orvdx7nrtPWz VLsCVa2giLlmqTAfQ2W5UTQdl2DgTF+JKebq2hlzk1N817XB/sQ7d+YCGB38+3q0 h6Lc+bA1xqxrQhmd7v+IlivyLJJ8rszH+T3o230R4P28oQQknyw= =ClaN -----END PGP SIGNATURE----- --=-=-=-- From unknown Fri Aug 08 15:19:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38809] [PATCH] bootloader: grub: Add resolution override. Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 04 Jan 2020 11:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38809 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tobias Geerinckx-Rice Cc: 38809@debbugs.gnu.org Received: via spool by 38809-submit@debbugs.gnu.org id=B38809.157813851113440 (code B ref 38809); Sat, 04 Jan 2020 11:49:02 +0000 Received: (at 38809) by debbugs.gnu.org; 4 Jan 2020 11:48:31 +0000 Received: from localhost ([127.0.0.1]:42522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inhus-0003Ub-Nk for submit@debbugs.gnu.org; Sat, 04 Jan 2020 06:48:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38237) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inhuq-0003UN-8X for 38809@debbugs.gnu.org; Sat, 04 Jan 2020 06:48:24 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50959) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1inhui-0004pR-9v; Sat, 04 Jan 2020 06:48:16 -0500 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=35652 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1inhuh-0003LF-Ro; Sat, 04 Jan 2020 06:48:16 -0500 From: Jan Nieuwenhuizen References: <87lfquhzmi.fsf@gnu.org> <87lfqn8pwf.fsf@nckx> Date: Sat, 04 Jan 2020 12:48:06 +0100 In-Reply-To: <87lfqn8pwf.fsf@nckx> (Tobias Geerinckx-Rice's message of "Sat, 04 Jan 2020 11:41:36 +0100") Message-ID: <87ftgvv3wp.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Tobias Geerinckx-Rice writes: > Jan Nieuwenhuizen =E5=86=99=E9=81=93=EF=BC=9A >> With this patch I finally have a readable GRUB menu. > > Thanks! Perhaps it will help solve my EFI framebuffer woes (probably > not but who knows. > >> I am not sure about the name and semantics of `resolution': >> Better to use `gfxmode', and/or use a list of strings >> '("1024x768x32" "auto"), ... WDYT? > > Yes please, on both counts. Grub-theme should expose the GRUB > variable, not a lossy abstraction. Okay, I think I just wished the GRUB name would be more meaningful for casual users (such as myself). I'm terrible with TLAwords, and very happy I found and fixed this ;-) Greetings, janneke --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-bootloader-grub-Add-gfxmode-resolution-override.patch Content-Transfer-Encoding: quoted-printable >From 333ba3ee53e1c359a01aed80c24d17ece39ad975 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 30 Dec 2019 11:25:40 +0100 Subject: [PATCH] bootloader: grub: Add gfxmode (resolution) override. * gnu/bootloader/grub.scm (): Add `gfxmode' entry. (eye-candy): Use it. * doc/guix.texi (Bootloader Configuration): Document it. --- doc/guix.texi | 27 +++++++++++++++++++++++++-- gnu/bootloader/grub.scm | 13 +++++++++---- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 70e3dfea6a..eaa4e7ab97 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -25923,9 +25923,21 @@ must @emph{not} be an OS device name such as @file= {/dev/sda1}. @end table @end deftp =20 +@cindex HDPI +@cindex resolution @c FIXME: Write documentation once it's stable. -For now only GRUB has theme support. GRUB themes are created using -the @code{grub-theme} form, which is not documented yet. +For now only GRUB has theme support. GRUB themes are created using +the @code{grub-theme} form, which is not fully documented yet. + +@deftp {Data Type} grub-theme +Data type representing the configuration of the GRUB theme. + +@table @asis +@item @code{gfxmode} (default: @code{'("auto")}) +The GRUB @code{gfxmode} to set (a list of screen resolution strings, see +@pxref{gfxmode,,, grub, GNU GRUB manual}). +@end table +@end deftp =20 @defvr {Scheme Variable} %default-theme This is the default GRUB theme used by the operating system if no @@ -25936,6 +25948,17 @@ It comes with a fancy background image displaying = the GNU and Guix logos. @end defvr =20 +For example, to override the default resolution, you may use something +like + +@lisp +(bootloader + (grub-configuration + ;; @dots{} + (theme (grub-theme + (inherit %default-theme) + (gfxmode '("1024x786x32" "auto")))))) +@end lisp =20 @node Invoking guix system @section Invoking @code{guix system} diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index adcdbdbab0..229bba96ad 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -3,6 +3,7 @@ ;;; Copyright =C2=A9 2016 Chris Marusich ;;; Copyright =C2=A9 2017 Leo Famulari ;;; Copyright =C2=A9 2017 Mathieu Othacehe +;;; Copyright =C2=A9 2019 Jan (janneke) Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -88,7 +89,9 @@ denoting a file name." (color-normal grub-theme-color-normal (default '((fg . cyan) (bg . blue)))) (color-highlight grub-theme-color-highlight - (default '((fg . white) (bg . blue))))) + (default '((fg . white) (bg . blue)))) + (gfxmode grub-gfxmode + (default '("auto")))) ;list of string =20 (define %background-image (grub-image @@ -149,8 +152,10 @@ system string---e.g., \"x86_64-linux\"." ;; most other modern architectures have no other mode and therefore do= n't ;; need to be switched. (if (string-match "^(x86_64|i[3-6]86)-" system) - " - # Leave 'gfxmode' to 'auto'. + (string-append " + set gfxmode=3D" (string-join + (grub-gfxmode (bootloader-configuration-theme config)) + ";") " insmod video_bochs insmod video_cirrus insmod gfxterm @@ -166,7 +171,7 @@ system string---e.g., \"x86_64-linux\"." insmod vbe insmod vga fi -" +") "")) =20 (define (setup-gfxterm config font-file) --=20 2.24.0 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-=-- From unknown Fri Aug 08 15:19:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38809] [PATCH] bootloader: grub: Add resolution override. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 04 Jan 2020 15:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38809 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Jan Nieuwenhuizen Cc: 38809@debbugs.gnu.org Received: via spool by 38809-submit@debbugs.gnu.org id=B38809.157815272120683 (code B ref 38809); Sat, 04 Jan 2020 15:46:02 +0000 Received: (at 38809) by debbugs.gnu.org; 4 Jan 2020 15:45:21 +0000 Received: from localhost ([127.0.0.1]:43267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inlc8-0005NX-MH for submit@debbugs.gnu.org; Sat, 04 Jan 2020 10:45:20 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:34834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inlc6-0005NJ-Cw for 38809@debbugs.gnu.org; Sat, 04 Jan 2020 10:45:18 -0500 Received: from localhost (unknown [185.17.13.127]) by dd26836.kasserver.com (Postfix) with ESMTPSA id ACD8033652E3; Sat, 4 Jan 2020 16:45:16 +0100 (CET) Date: Sat, 4 Jan 2020 16:45:12 +0100 From: Danny Milosavljevic Message-ID: <20200104164512.7589fa36@scratchpost.org> In-Reply-To: <87lfquhzmi.fsf@gnu.org> References: <87lfquhzmi.fsf@gnu.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/uyGIZSUVxpecB_//qGdWnh0"; 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.7 (-) --Sig_/uyGIZSUVxpecB_//qGdWnh0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi janneke, On Mon, 30 Dec 2019 11:33:09 +0100 Jan Nieuwenhuizen wrote: > With this patch I finally have a readable GRUB menu. I am not sure > about the name and semantics of `resolution': Better to use `gfxmode', > and/or use a list of strings '("1024x768x32" "auto"), ... WDYT? Especially with HiDPI, the word "resolution" is ambiguous. Also, gfxmode values are not standardized (f.e. u-boot would not know what to do with them), so using a non-grub-specific key doesn't bring us anythin= g. I much prefer lists instead of one string. But grub apparently has "," and ";" as separators--presumably with the same meaning? It also has the special value "keep" as possible first item. In view of this complication it's maybe better not to use lists. --Sig_/uyGIZSUVxpecB_//qGdWnh0 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl4QswgACgkQ5xo1VCww uqXyWwf/QRLaIhas5nDXA6Vzeg9mC7O5ByxEGCAHX6NWr7aA6PmN8pkcbLKbgnZB /kKEKeBkCVmDDxyRdV2Ee44vfe2pi9IQx5jWDJN7UyYSudGbBtMpD7UQcmzd6OjQ qMGdwjhBbj45WX/yLMfDcRyCTiHQxTf1Tm0e3vB+KeJKQfL797QQpHf/ssin3J+v 8oSSv0ba+0FG5yjvlk22hgNq4fGF5ZKogV3R+VcDLGZQazDHqoOwfg7o7a2SJmtx LDTkAzwpwwNjj5waArK+6Y1bhKA6mTPKeoCMeb1ZwaCH6pcPHvaYfyKnyJC5XfsC IOxNmQToOyqMKTepFV/rLn2gOOVq/A== =mLUt -----END PGP SIGNATURE----- --Sig_/uyGIZSUVxpecB_//qGdWnh0-- From unknown Fri Aug 08 15:19:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38809] [PATCH] bootloader: grub: Add resolution override. Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 04 Jan 2020 16:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38809 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Danny Milosavljevic Cc: 38809@debbugs.gnu.org Received: via spool by 38809-submit@debbugs.gnu.org id=B38809.157815406123047 (code B ref 38809); Sat, 04 Jan 2020 16:08:01 +0000 Received: (at 38809) by debbugs.gnu.org; 4 Jan 2020 16:07:41 +0000 Received: from localhost ([127.0.0.1]:43280 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inlxk-0005zf-PU for submit@debbugs.gnu.org; Sat, 04 Jan 2020 11:07:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inlxi-0005zS-ED for 38809@debbugs.gnu.org; Sat, 04 Jan 2020 11:07:39 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1inlxd-0006z6-2e; Sat, 04 Jan 2020 11:07:33 -0500 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=37428 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1inlxc-0002I2-I7; Sat, 04 Jan 2020 11:07:32 -0500 From: Jan Nieuwenhuizen Organization: AvatarAcademy.nl References: <87lfquhzmi.fsf@gnu.org> <20200104164512.7589fa36@scratchpost.org> X-Url: http://AvatarAcademy.nl Date: Sat, 04 Jan 2020 17:07:24 +0100 In-Reply-To: <20200104164512.7589fa36@scratchpost.org> (Danny Milosavljevic's message of "Sat, 4 Jan 2020 16:45:12 +0100") Message-ID: <87tv5btdc3.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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 (---) Danny Milosavljevic writes: Hi Danny, >> With this patch I finally have a readable GRUB menu. I am not sure >> about the name and semantics of `resolution': Better to use `gfxmode', >> and/or use a list of strings '("1024x768x32" "auto"), ... WDYT? > > Especially with HiDPI, the word "resolution" is ambiguous. > > Also, gfxmode values are not standardized (f.e. u-boot would not know what > to do with them), so using a non-grub-specific key doesn't bring us anyth= ing. That's another good argument; thank you for chiming in! I think we all agree now. I sent an updated patch using `gfxmode' in another mail. > I much prefer lists instead of one string. But grub apparently has "," a= nd > ";" as separators--presumably with the same meaning? Yes, that was also Tobias' wish, so we now have it as a list too. > It also has the special value "keep" as possible first item. > > In view of this complication it's maybe better not to use lists. Hmm, yes that's why I had some doubts too. After Tobias' comment I now chose to use a list, and the example now says (gfxmode '("1024x786x32" "auto")) I hope that people can imagine prepending "keep"? Greetings, janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com From unknown Fri Aug 08 15:19:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38809] [PATCH] bootloader: grub: Add resolution override. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 05 Jan 2020 12:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38809 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Jan Nieuwenhuizen Cc: 38809@debbugs.gnu.org Received: via spool by 38809-submit@debbugs.gnu.org id=B38809.15782272495654 (code B ref 38809); Sun, 05 Jan 2020 12:28:01 +0000 Received: (at 38809) by debbugs.gnu.org; 5 Jan 2020 12:27:29 +0000 Received: from localhost ([127.0.0.1]:43761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1io50C-0001T8-Nn for submit@debbugs.gnu.org; Sun, 05 Jan 2020 07:27:28 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:34392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1io50B-0001T0-DD for 38809@debbugs.gnu.org; Sun, 05 Jan 2020 07:27:27 -0500 Received: from localhost (unknown [185.17.13.127]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 9605C3366AED; Sun, 5 Jan 2020 13:27:26 +0100 (CET) Date: Sun, 5 Jan 2020 13:27:25 +0100 From: Danny Milosavljevic Message-ID: <20200105132725.69d1afaa@scratchpost.org> In-Reply-To: <87tv5btdc3.fsf@gnu.org> References: <87lfquhzmi.fsf@gnu.org> <20200104164512.7589fa36@scratchpost.org> <87tv5btdc3.fsf@gnu.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/G3dtNRl+WucO0NJiAPRijvj"; 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.7 (-) --Sig_/G3dtNRl+WucO0NJiAPRijvj Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi janneke, On Sat, 04 Jan 2020 17:07:24 +0100 Jan Nieuwenhuizen wrote: > Hmm, yes that's why I had some doubts too. After Tobias' comment I now > chose to use a list, and the example now says >=20 > (gfxmode '("1024x786x32" "auto")) >=20 > I hope that people can imagine prepending "keep"? Yes, it should be fine. Thanks! LGTM. --Sig_/G3dtNRl+WucO0NJiAPRijvj Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl4R1i0ACgkQ5xo1VCww uqW0FAgAkbn8Nozgt1E5nVJftPcVDWZBQH5YoomY/swpN0+9XWPGo0y2VEOU5JL9 fFd27oQVfHwM2DBYTNHOSaxjueMAiyu/oa2e5jqrPCR/vzi0fViAk1y+iUJ1Nvj5 YhGUvFcENoMYgLPMxXrPWkNywsdZxkpoBtGP02IA0Sby1fwdBudj/Y256V33cL3j GVhwJ7M6Z8eI0SooMbyfnf1Y3gBaRsgDJtpKVSgV/dsi2E+51qGOjfmM5NAM25x6 4kvE8Uj/ZJ+e+PktM0i6vMhukmn9jHl6gBJ5xQCy95uxmMO/hH5HfawgNKzWZQxp G+qAfD09/bpCxpwrBV3BysY9gs31PQ== =+bCA -----END PGP SIGNATURE----- --Sig_/G3dtNRl+WucO0NJiAPRijvj-- From unknown Fri Aug 08 15:19:02 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: Jan Nieuwenhuizen Subject: bug#38809: closed (Re: [bug#38809] [PATCH] bootloader: grub: Add resolution override.) Message-ID: References: <87muazt3gm.fsf@gnu.org> <87lfquhzmi.fsf@gnu.org> X-Gnu-PR-Message: they-closed 38809 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 38809@debbugs.gnu.org Date: Tue, 07 Jan 2020 20:31:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1578429061-18670-1" This is a multi-part message in MIME format... ------------=_1578429061-18670-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #38809: [PATCH] bootloader: grub: Add resolution override. 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 38809@debbugs.gnu.org. --=20 38809: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D38809 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1578429061-18670-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 38809-done) by debbugs.gnu.org; 7 Jan 2020 20:30:05 +0000 Received: from localhost ([127.0.0.1]:49426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iovUK-0004oz-Pw for submit@debbugs.gnu.org; Tue, 07 Jan 2020 15:30:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37063) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iovUI-0004o4-Vu for 38809-done@debbugs.gnu.org; Tue, 07 Jan 2020 15:30:03 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55008) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iovUD-0005tx-4R; Tue, 07 Jan 2020 15:29:57 -0500 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=48946 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iovUC-00069W-NZ; Tue, 07 Jan 2020 15:29:56 -0500 From: Jan Nieuwenhuizen To: Danny Milosavljevic Subject: Re: [bug#38809] [PATCH] bootloader: grub: Add resolution override. References: <87lfquhzmi.fsf@gnu.org> <20200104164512.7589fa36@scratchpost.org> <87tv5btdc3.fsf@gnu.org> <20200105132725.69d1afaa@scratchpost.org> Date: Tue, 07 Jan 2020 21:29:45 +0100 In-Reply-To: <20200105132725.69d1afaa@scratchpost.org> (Danny Milosavljevic's message of "Sun, 5 Jan 2020 13:27:25 +0100") Message-ID: <87muazt3gm.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 38809-done Cc: Tobias Geerinckx-Rice , 38809-done@debbugs.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: -3.3 (---) Danny Milosavljevic writes: Hi Danny, Tobias, > Yes, it should be fine. Thanks! LGTM. After chatting with Tobias on irc, pushed to master as a23091880d4dc6115acb= fa3b7ef09d731fc5abb0 Greetings, janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com ------------=_1578429061-18670-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 30 Dec 2019 10:33:21 +0000 Received: from localhost ([127.0.0.1]:60511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilsMO-00008o-8L for submit@debbugs.gnu.org; Mon, 30 Dec 2019 05:33:21 -0500 Received: from lists.gnu.org ([209.51.188.17]:48857) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilsMM-00008e-6M for submit@debbugs.gnu.org; Mon, 30 Dec 2019 05:33:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58866) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilsMK-0007Vc-Hr for guix-patches@gnu.org; Mon, 30 Dec 2019 05:33:14 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED,BAYES_50, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33030) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ilsMK-000239-Cy; Mon, 30 Dec 2019 05:33:12 -0500 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=58498 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ilsMJ-0007p9-SI; Mon, 30 Dec 2019 05:33:12 -0500 From: Jan Nieuwenhuizen To: guix-patches@gnu.org Subject: [PATCH] bootloader: grub: Add resolution override. Date: Mon, 30 Dec 2019 11:33:09 +0100 Message-ID: <87lfquhzmi.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit 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 Hi, With this patch I finally have a readable GRUB menu. I am not sure about the name and semantics of `resolution': Better to use `gfxmode', and/or use a list of strings '("1024x768x32" "auto"), ... WDYT? Greetings, janneke --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-bootloader-grub-Add-resolution-override.patch Content-Transfer-Encoding: quoted-printable >From dfceb5702b0de5787f79e1098b4787e9d3adbe4e Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 30 Dec 2019 11:25:40 +0100 Subject: [PATCH] bootloader: grub: Add resolution override. * gnu/bootloader/grub.scm (): Add `resolution' entry. (eye-candy): Use it. * doc/guix.texi (Bootloader Configuration): Document it. --- doc/guix.texi | 26 ++++++++++++++++++++++++-- gnu/bootloader/grub.scm | 11 +++++++---- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index efc59c1aaf..02cecae043 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -25923,9 +25923,20 @@ must @emph{not} be an OS device name such as @file= {/dev/sda1}. @end table @end deftp =20 +@cindex HDPI +@cindex resolution @c FIXME: Write documentation once it's stable. -For now only GRUB has theme support. GRUB themes are created using -the @code{grub-theme} form, which is not documented yet. +For now only GRUB has theme support. GRUB themes are created using +the @code{grub-theme} form, which is not fully documented yet. + +@deftp {Data Type} grub-theme +Data type representing the configuration of the GRUB theme. + +@table @asis +@item @code{resolution} (default: @code{"auto"}) +The @code{gfxmode} to set (@pxref{gfxmode,,, grub, GNU GRUB manual}). +@end table +@end deftp =20 @defvr {Scheme Variable} %default-theme This is the default GRUB theme used by the operating system if no @@ -25936,6 +25947,17 @@ It comes with a fancy background image displaying = the GNU and Guix logos. @end defvr =20 +For example, to override the default resolution, you may use something +like + +@lisp +(bootloader + (grub-configuration + ;; @dots{} + (theme (grub-theme + (inherit %default-theme) + (resolution "1024x786x32;auto"))))) +@end lisp =20 @node Invoking guix system @section Invoking @code{guix system} diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index fd62f627a0..70de3edeb5 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -3,6 +3,7 @@ ;;; Copyright =C2=A9 2016 Chris Marusich ;;; Copyright =C2=A9 2017 Leo Famulari ;;; Copyright =C2=A9 2017 Mathieu Othacehe +;;; Copyright =C2=A9 2019 Jan (janneke) Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -88,7 +89,9 @@ denoting a file name." (color-normal grub-theme-color-normal (default '((fg . cyan) (bg . blue)))) (color-highlight grub-theme-color-highlight - (default '((fg . white) (bg . blue))))) + (default '((fg . white) (bg . blue)))) + (resolution grub-resolution + (default "auto"))) =20 (define %background-image (grub-image @@ -149,8 +152,8 @@ system string---e.g., \"x86_64-linux\"." ;; most other modern architectures have no other mode and therefore do= n't ;; need to be switched. (if (string-match "^(x86_64|i[3-6]86)-" system) - " - # Leave 'gfxmode' to 'auto'. + (string-append " + set gfxmode=3D" (grub-resolution (bootloader-configuration-theme config)= ) " insmod video_bochs insmod video_cirrus insmod gfxterm @@ -166,7 +169,7 @@ system string---e.g., \"x86_64-linux\"." insmod vbe insmod vga fi -" +") "")) =20 (define (setup-gfxterm config font-file) --=20 2.24.0 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-=-- ------------=_1578429061-18670-1-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 08 00:59:53 2020 Received: (at control) by debbugs.gnu.org; 8 Jan 2020 05:59:53 +0000 Received: from localhost ([127.0.0.1]:49686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ip4Nk-0003cx-RU for submit@debbugs.gnu.org; Wed, 08 Jan 2020 00:59:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58662) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ip4Ni-0003ci-JQ for control@debbugs.gnu.org; Wed, 08 Jan 2020 00:59:51 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33510) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ip4Nd-0005Wt-Cj for control@debbugs.gnu.org; Wed, 08 Jan 2020 00:59:45 -0500 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=52954 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ip4Nc-0006LG-UO for control@debbugs.gnu.org; Wed, 08 Jan 2020 00:59:45 -0500 Date: Wed, 08 Jan 2020 06:59:34 +0100 Message-Id: <87h816trnd.fsf@gnu.org> To: control@debbugs.gnu.org From: Jan Nieuwenhuizen Subject: control message for bug #38809 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control 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 (---) reopen 38809 tags 38809 - fixed patch quit From unknown Fri Aug 08 15:19:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38809] reopened (Re: [bug#38809] [PATCH] bootloader: grub: Add resolution override.) Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 08 Jan 2020 08:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38809 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Tobias Geerinckx-Rice Cc: 38809@debbugs.gnu.org Received: via spool by 38809-submit@debbugs.gnu.org id=B38809.15784717182711 (code B ref 38809); Wed, 08 Jan 2020 08:22:02 +0000 Received: (at 38809) by debbugs.gnu.org; 8 Jan 2020 08:21:58 +0000 Received: from localhost ([127.0.0.1]:49729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ip6bB-0000hW-4X for submit@debbugs.gnu.org; Wed, 08 Jan 2020 03:21:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45733) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ip6b9-0000hK-51 for 38809@debbugs.gnu.org; Wed, 08 Jan 2020 03:21:51 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34597) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ip6b2-0005m1-GO; Wed, 08 Jan 2020 03:21:44 -0500 Received: from mx.verum.com ([31.223.170.65]:41115 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ip6b2-0002tq-5B; Wed, 08 Jan 2020 03:21:44 -0500 From: Jan Nieuwenhuizen References: <87muazt3gm.fsf@gnu.org> <87lfquhzmi.fsf@gnu.org> Date: Wed, 08 Jan 2020 09:21:33 +0100 In-Reply-To: (GNU bug Tracking System's message of "Tue, 07 Jan 2020 20:31:01 +0000") Message-ID: <87d0butl2q.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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 GNU bug Tracking System writes: Hi Tobias, As reported by oscar123123 on irc, this broke guix pull To reproduce: --8<---------------cut here---------------start------------->8--- guix pull --commit=a23091880d4dc6115acbfa3b7ef09d731fc5abb0 --8<---------------cut here---------------end--------------->8--- Tobias reverted the commit (thanks!). I found this test to also show the failure. --8<---------------cut here---------------start------------->8--- make check TESTS=tests/guix-system.sh --8<---------------cut here---------------end--------------->8--- It turns out that this test creates a grub bootsloader with #f for config. Attached is a new version of the patch, that is robust against this; this being the difference: --8<---------------cut here---------------start------------->8--- diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index 55e6344285..b99f5fa4f4 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -152,10 +152,16 @@ system string---e.g., \"x86_64-linux\"." ;; most other modern architectures have no other mode and therefore don't ;; need to be switched. (if (string-match "^(x86_64|i[3-6]86)-" system) - (string-append " - set gfxmode=" (string-join - (grub-gfxmode (bootloader-configuration-theme config)) - ";") " + (string-append + " +" + (let ((gfxmode (and=> + (and=> config bootloader-configuration-theme) + grub-gfxmode))) + (if gfxmode + (string-append "set gfxmode=" (string-join gfxmode ";")) + "# Leave 'gfxmode' to 'auto'.")) + " insmod video_bochs insmod video_cirrus insmod gfxterm --8<---------------cut here---------------end--------------->8--- This fixes make check and I also tested that --8<---------------cut here---------------start------------->8--- guix pull --url=$PWD --8<---------------cut here---------------end--------------->8--- now succeeds. Greetings, janneke --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-bootloader-grub-Add-gfxmode-resolution-override.patch Content-Transfer-Encoding: quoted-printable >From 76bc0b8ef3370a4f98e63f6630c14c55613426f7 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 30 Dec 2019 11:25:40 +0100 Subject: [PATCH] bootloader: grub: Add gfxmode (resolution) override. * gnu/bootloader/grub.scm (): Add `gfxmode' entry. (eye-candy): Use it. * doc/guix.texi (Bootloader Configuration): Document it. --- doc/guix.texi | 28 ++++++++++++++++++++++++++-- gnu/bootloader/grub.scm | 19 +++++++++++++++---- 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index df1ba428a5..6e3f175488 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -25923,9 +25923,22 @@ must @emph{not} be an OS device name such as @file= {/dev/sda1}. @end table @end deftp =20 +@cindex HDPI +@cindex HiDPI +@cindex resolution @c FIXME: Write documentation once it's stable. -For now only GRUB has theme support. GRUB themes are created using -the @code{grub-theme} form, which is not documented yet. +For now only GRUB has theme support. GRUB themes are created using +the @code{grub-theme} form, which is not fully documented yet. + +@deftp {Data Type} grub-theme +Data type representing the configuration of the GRUB theme. + +@table @asis +@item @code{gfxmode} (default: @code{'("auto")}) +The GRUB @code{gfxmode} to set (a list of screen resolution strings, see +@pxref{gfxmode,,, grub, GNU GRUB manual}). +@end table +@end deftp =20 @defvr {Scheme Variable} %default-theme This is the default GRUB theme used by the operating system if no @@ -25936,6 +25949,17 @@ It comes with a fancy background image displaying = the GNU and Guix logos. @end defvr =20 +For example, to override the default resolution, you may use something +like + +@lisp +(bootloader + (grub-configuration + ;; @dots{} + (theme (grub-theme + (inherit %default-theme) + (gfxmode '("1024x786x32" "auto")))))) +@end lisp =20 @node Invoking guix system @section Invoking @code{guix system} diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index f13685ac9d..b99f5fa4f4 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -3,6 +3,7 @@ ;;; Copyright =C2=A9 2016 Chris Marusich ;;; Copyright =C2=A9 2017 Leo Famulari ;;; Copyright =C2=A9 2017 Mathieu Othacehe +;;; Copyright =C2=A9 2019 Jan (janneke) Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -88,7 +89,9 @@ denoting a file name." (color-normal grub-theme-color-normal (default '((fg . cyan) (bg . blue)))) (color-highlight grub-theme-color-highlight - (default '((fg . white) (bg . blue))))) + (default '((fg . white) (bg . blue)))) + (gfxmode grub-gfxmode + (default '("auto")))) ;list of string =20 (define %background-image (grub-image @@ -149,8 +152,16 @@ system string---e.g., \"x86_64-linux\"." ;; most other modern architectures have no other mode and therefore do= n't ;; need to be switched. (if (string-match "^(x86_64|i[3-6]86)-" system) - " - # Leave 'gfxmode' to 'auto'. + (string-append + " +" + (let ((gfxmode (and=3D> + (and=3D> config bootloader-configuration-theme) + grub-gfxmode))) + (if gfxmode + (string-append "set gfxmode=3D" (string-join gfxmode ";")) + "# Leave 'gfxmode' to 'auto'.")) + " insmod video_bochs insmod video_cirrus insmod gfxterm @@ -166,7 +177,7 @@ system string---e.g., \"x86_64-linux\"." insmod vbe insmod vga fi -" +") "")) =20 (define (setup-gfxterm config font-file) --=20 2.24.0 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-=-- From unknown Fri Aug 08 15:19:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38809] [PATCH] bootloader: grub: Add resolution override. References: <87lfquhzmi.fsf@gnu.org> In-Reply-To: <87lfquhzmi.fsf@gnu.org> Resent-From: "Alex Griffin" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 23 Jan 2020 15:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38809 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 38809@debbugs.gnu.org Received: via spool by 38809-submit@debbugs.gnu.org id=B38809.157979240711435 (code B ref 38809); Thu, 23 Jan 2020 15:14:01 +0000 Received: (at 38809) by debbugs.gnu.org; 23 Jan 2020 15:13:27 +0000 Received: from localhost ([127.0.0.1]:53075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iueAh-0002yN-2M for submit@debbugs.gnu.org; Thu, 23 Jan 2020 10:13:27 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:38561) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iueAe-0002y7-QX for 38809@debbugs.gnu.org; Thu, 23 Jan 2020 10:13:25 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 9300922182 for <38809@debbugs.gnu.org>; Thu, 23 Jan 2020 10:13:19 -0500 (EST) Received: from imap6 ([10.202.2.56]) by compute6.internal (MEProxy); Thu, 23 Jan 2020 10:13:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ajgrf.com; h= mime-version:message-id:date:from:to:subject:content-type; s= fm2; bh=zr+xU4RjouUKZbmwCvXl6loRcTihJbypreOYmsUsZsk=; b=TZ+YBEK6 nCEqoQK14hyQGJQ1oIjAr6cqnhHFm9iuZOFEHP/f0FKF1UThUtBHhq2pZCjSF08x u+qidFZeFMYJh2ausfveXUDbdgqjDg9mU6YPNK0oRQ9CebJyEwhQBAuCcb8DpUPs oOqeyDFqr8ICNfGhvYlhMuaGHITsBYw+hbVGfMelE0Ff/4yqe/Klu1aaObjp3dS0 xZTBIaTjDqwaOhGly7/thyhYnh++PXaD9R0NNCpQIK7DzEeIryBnBwr8DT8uvAod NBl5wma6Gfppp3ugZJlgfj4SCX7TJjeIxVbj+inx7+RNyf5PnOXSzgTvYbqsi2WC 7WXgoPYzer53YA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=zr+xU4RjouUKZbmwCvXl6loRcTihJ bypreOYmsUsZsk=; b=N3dNoIsJo2uiwWP2OfBxxbhW3UXI47prFn263hjH4pXHb PJTX/StPhdMht7QEVbJH8+xdZjNKQhZYfvXwAyxa2SAMwkzKuJ1iY6ZgQ1IjEsvU eAm+z7tmtrwLyHxc/6D6/tZhq1WCIPDAB6CKZoe/n8fxUmIe2BXCAB9Vk3lnKwFA g+GA5wgvDpknG0dvwidW5kbM1960AOkbO5RY+sYGyS0cfo8eqken88RL69zi2ukV 5S6TEVXagSFt1ftK0tKUJkrNM7awQs+pi0vLkrcmlSZo5JDkPq5fX5ROxFaF5KeL 1l+fqvYu8Dhq+/YCgX+yaRX9puCt30CiD7DDMPMPQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrvddvgdegiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkfffhvffutgesthdtredtre ertdenucfhrhhomhepfdetlhgvgicuifhrihhffhhinhdfuceorgesrghjghhrfhdrtgho mheqnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg esrghjghhrfhdrtghomh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 409D31400A1; Thu, 23 Jan 2020 10:13:19 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.7-775-g74f2d12-fmstable-20200121v1 Mime-Version: 1.0 Message-Id: Date: Thu, 23 Jan 2020 15:12:36 +0000 From: "Alex Griffin" Content-Type: text/plain 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.7 (-) I've been using the updated patch for a couple weeks now without issue. Maybe it's time to commit it again? -- Alex Griffin From unknown Fri Aug 08 15:19:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38809] [PATCH] bootloader: grub: Add resolution override. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 23 Jan 2020 23:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38809 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 38809@debbugs.gnu.org Received: via spool by 38809-submit@debbugs.gnu.org id=B38809.15798204575395 (code B ref 38809); Thu, 23 Jan 2020 23:01:02 +0000 Received: (at 38809) by debbugs.gnu.org; 23 Jan 2020 23:00:57 +0000 Received: from localhost ([127.0.0.1]:53317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iulT7-0001Ox-Kf for submit@debbugs.gnu.org; Thu, 23 Jan 2020 18:00:57 -0500 Received: from tobias.gr ([80.241.217.52]:58124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iulT5-0001Oo-BY for 38809@debbugs.gnu.org; Thu, 23 Jan 2020 18:00:56 -0500 Received: by tobias.gr (OpenSMTPD) with ESMTP id 251e6300 for <38809@debbugs.gnu.org>; Thu, 23 Jan 2020 23:00:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tobias.gr; h=from:to :subject:references:in-reply-to:date:message-id:mime-version :content-type; s=2018; i=me@tobias.gr; bh=l2LUaeBcllbthkTi5PS/IG 89I6V9HK/p9iscsqK+PnM=; b=oUhK+FPhANu906q91QdfJLqd/Fnw9Y0g7cKXjX gAX1+fvxpRWCL+9VMxnlMhAQ5Odulzu1So2vD9OQUlfhNB1vQpZ82PidQampTsjT 9gMgf0TJtgjvjB8D/tRl+N8FQZAWmUNuf8kqUVkCua3ZXG5WUdY3Z4HNWnxWLF+i lMYDScTD77ZPoofGDjSREIBmlF++3DOgRA6cMzRw2XWz0NgXFLww4YlB393GKTTn TrlqdX2sHslF4f3xJFslJ1fqzu4KCDefztfFkWC6P+TPQNAlKJMHRaT2mttK3r36 W+GEdk4QglT6EYofqSI9ZJGxN4YxNEriVtlSGphGNhIgjSmg== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 3946f718 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <38809@debbugs.gnu.org>; Thu, 23 Jan 2020 23:00:53 +0000 (UTC) From: Tobias Geerinckx-Rice References: <87lfquhzmi.fsf@gnu.org> In-reply-to: Date: Fri, 24 Jan 2020 00:00:54 +0100 Message-ID: <878slxwzfd.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: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Alex Griffin =E5=86=99=E9=81=93=EF=BC=9A > I've been using the updated patch for a couple weeks now without=20 > issue. Maybe it's time to commit it again? Yes. I think I LGTM'd this on IRC already, but regardless: LGTM! Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEfo+u0AlEeO9y5k0W2Imw8BjFSTwFAl4qJaYACgkQ2Imw8BjF STw3yhAAmH/3BMSmu+ay5/2E/hOr37uMWkaD81oKWTG6okmImHHWVoPBenyR+rtm SDU4QQwnrtEClua1IMoHdUcjbEYCtOKBqRitbUREXHOvtcg3BAp0X/G0E7Li7Ps9 vzy9RKagE2vWaXPybA55EUUgav1ra0saFVTey3R2PfWdX0FZYMgyw0pm16IrWPJ4 5gFUs2xFCMeipjwtpWCx7/QnN8OLm52drPsdjd54MUcqibOU6BRNV4vmxPhxr+04 qBC+JEBJONgrlG1l9/e8u+lazpiB+188tg8GbF6bo4lCwQnpD1c+hqRsuFauEcY8 vufnQ4ddP3ait62JaYZwZXJf8hK/JPxuh/db5LmtoKDA8gPw4eNTLQ66EJ3gfZeD KuB7i8NhkroQgjKDGFhl58SF5n2GT46W9TTRdNL4R+WCukNNgatyRuZqWKuBPzie NKCYJQJG61DA/xi5Dr4Vqu+Zd6uxOKXW3CPI7892gIw2TsuS1zRM9ilKpu2Np0/R AWtxbkXvIkk/T7y1GlbgQ7fAG/V8Gb0q2Jx/7bT4z/1AKP103zGQSUPZeC5j0d5k ocss4r5Rt0GocU8eGbaOyR9W3TUg60F6NMGdkhnZXDdGJhxx23FjXGL480yLRRVC g54Nrm1+Qgn3ZutSCGeFT+ozi2GyAQYJgM59R2m8LRfywTYNZ/c= =WMtz -----END PGP SIGNATURE----- --=-=-=-- From unknown Fri Aug 08 15:19:02 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: Jan Nieuwenhuizen Subject: bug#38809: closed (Re: [bug#38809] [PATCH] bootloader: grub: Add resolution override.) Message-ID: References: <87wo9ffu6b.fsf@gnu.org> <87lfquhzmi.fsf@gnu.org> X-Gnu-PR-Message: they-closed 38809 X-Gnu-PR-Package: guix-patches Reply-To: 38809@debbugs.gnu.org Date: Sat, 25 Jan 2020 15:12:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1579965122-29597-1" This is a multi-part message in MIME format... ------------=_1579965122-29597-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #38809: [PATCH] bootloader: grub: Add resolution override. 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 38809@debbugs.gnu.org. --=20 38809: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D38809 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1579965122-29597-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 38809-done) by debbugs.gnu.org; 25 Jan 2020 15:11:07 +0000 Received: from localhost ([127.0.0.1]:56228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivN5W-0007gI-VC for submit@debbugs.gnu.org; Sat, 25 Jan 2020 10:11:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53225) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivN5T-0007fm-5i for 38809-done@debbugs.gnu.org; Sat, 25 Jan 2020 10:11:05 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58327) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ivN5N-0005Pt-Jc; Sat, 25 Jan 2020 10:10:57 -0500 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=47264 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ivN5L-0008Me-Eh; Sat, 25 Jan 2020 10:10:57 -0500 From: Jan Nieuwenhuizen To: Tobias Geerinckx-Rice Subject: Re: [bug#38809] [PATCH] bootloader: grub: Add resolution override. References: <87lfquhzmi.fsf@gnu.org> <878slxwzfd.fsf@nckx> Date: Sat, 25 Jan 2020 16:10:52 +0100 In-Reply-To: <878slxwzfd.fsf@nckx> (Tobias Geerinckx-Rice's message of "Fri, 24 Jan 2020 00:00:54 +0100") Message-ID: <87wo9ffu6b.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 38809-done Cc: 38809-done@debbugs.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: -1.7 (-) Tobias Geerinckx-Rice writes: > Alex Griffin =E5=86=99=E9=81=93=EF=BC=9A >> I've been using the updated patch for a couple weeks now without >> issue. Maybe it's time to commit it again? > > Yes. I think I LGTM'd this on IRC already, but regardless: LGTM! > > Kind regards, Thank you both, pushed to master as f52fe7c3f29dfd0804c9d1f297b91287eabcdfb2 janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com ------------=_1579965122-29597-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 30 Dec 2019 10:33:21 +0000 Received: from localhost ([127.0.0.1]:60511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilsMO-00008o-8L for submit@debbugs.gnu.org; Mon, 30 Dec 2019 05:33:21 -0500 Received: from lists.gnu.org ([209.51.188.17]:48857) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilsMM-00008e-6M for submit@debbugs.gnu.org; Mon, 30 Dec 2019 05:33:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58866) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilsMK-0007Vc-Hr for guix-patches@gnu.org; Mon, 30 Dec 2019 05:33:14 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED,BAYES_50, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33030) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ilsMK-000239-Cy; Mon, 30 Dec 2019 05:33:12 -0500 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=58498 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ilsMJ-0007p9-SI; Mon, 30 Dec 2019 05:33:12 -0500 From: Jan Nieuwenhuizen To: guix-patches@gnu.org Subject: [PATCH] bootloader: grub: Add resolution override. Date: Mon, 30 Dec 2019 11:33:09 +0100 Message-ID: <87lfquhzmi.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit 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 Hi, With this patch I finally have a readable GRUB menu. I am not sure about the name and semantics of `resolution': Better to use `gfxmode', and/or use a list of strings '("1024x768x32" "auto"), ... WDYT? Greetings, janneke --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-bootloader-grub-Add-resolution-override.patch Content-Transfer-Encoding: quoted-printable >From dfceb5702b0de5787f79e1098b4787e9d3adbe4e Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 30 Dec 2019 11:25:40 +0100 Subject: [PATCH] bootloader: grub: Add resolution override. * gnu/bootloader/grub.scm (): Add `resolution' entry. (eye-candy): Use it. * doc/guix.texi (Bootloader Configuration): Document it. --- doc/guix.texi | 26 ++++++++++++++++++++++++-- gnu/bootloader/grub.scm | 11 +++++++---- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index efc59c1aaf..02cecae043 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -25923,9 +25923,20 @@ must @emph{not} be an OS device name such as @file= {/dev/sda1}. @end table @end deftp =20 +@cindex HDPI +@cindex resolution @c FIXME: Write documentation once it's stable. -For now only GRUB has theme support. GRUB themes are created using -the @code{grub-theme} form, which is not documented yet. +For now only GRUB has theme support. GRUB themes are created using +the @code{grub-theme} form, which is not fully documented yet. + +@deftp {Data Type} grub-theme +Data type representing the configuration of the GRUB theme. + +@table @asis +@item @code{resolution} (default: @code{"auto"}) +The @code{gfxmode} to set (@pxref{gfxmode,,, grub, GNU GRUB manual}). +@end table +@end deftp =20 @defvr {Scheme Variable} %default-theme This is the default GRUB theme used by the operating system if no @@ -25936,6 +25947,17 @@ It comes with a fancy background image displaying = the GNU and Guix logos. @end defvr =20 +For example, to override the default resolution, you may use something +like + +@lisp +(bootloader + (grub-configuration + ;; @dots{} + (theme (grub-theme + (inherit %default-theme) + (resolution "1024x786x32;auto"))))) +@end lisp =20 @node Invoking guix system @section Invoking @code{guix system} diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index fd62f627a0..70de3edeb5 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -3,6 +3,7 @@ ;;; Copyright =C2=A9 2016 Chris Marusich ;;; Copyright =C2=A9 2017 Leo Famulari ;;; Copyright =C2=A9 2017 Mathieu Othacehe +;;; Copyright =C2=A9 2019 Jan (janneke) Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -88,7 +89,9 @@ denoting a file name." (color-normal grub-theme-color-normal (default '((fg . cyan) (bg . blue)))) (color-highlight grub-theme-color-highlight - (default '((fg . white) (bg . blue))))) + (default '((fg . white) (bg . blue)))) + (resolution grub-resolution + (default "auto"))) =20 (define %background-image (grub-image @@ -149,8 +152,8 @@ system string---e.g., \"x86_64-linux\"." ;; most other modern architectures have no other mode and therefore do= n't ;; need to be switched. (if (string-match "^(x86_64|i[3-6]86)-" system) - " - # Leave 'gfxmode' to 'auto'. + (string-append " + set gfxmode=3D" (grub-resolution (bootloader-configuration-theme config)= ) " insmod video_bochs insmod video_cirrus insmod gfxterm @@ -166,7 +169,7 @@ system string---e.g., \"x86_64-linux\"." insmod vbe insmod vga fi -" +") "")) =20 (define (setup-gfxterm config font-file) --=20 2.24.0 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-=-- ------------=_1579965122-29597-1--