From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 39607@debbugs.gnu.org
Subject: bug#39607: GRUB module all_video required to get video on 4K monitor
Date: Wed, 19 Feb 2020 21:55:54 -0500 [thread overview]
Message-ID: <87d0aa9dc5.fsf@gmail.com> (raw)
In-Reply-To: <877e0pj7ax.fsf@gmail.com> (Maxim Cournoyer's message of "Fri, 14 Feb 2020 14:30:14 -0500")
[-- Attachment #1: Type: text/plain, Size: 564 bytes --]
Hello,
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
> Hello,
>
> I installed Guix System on a new machine, which displays on a 4K (3840 x
> 2160 pixels) monitor.
>
> Unless I go to the GRUB command prompt with 'c' at boot and type 'insmod
> all_video', the video cuts early after booting a GRUB entry with 'No
> suitable video mode found', or similar.
>
> I think we should include this GRUB module in our default GRUB
> package/configuration.
>
> Maxim
I think the attached patches fixes this issue, and makes the
GRUB configuration a bit simpler too!
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-bootloader-grub-Use-the-all_video-module-in-graphic-.patch --]
[-- Type: text/x-patch, Size: 1352 bytes --]
From 115cc43361c72b3bae0d89e03f328e4383d9e9be Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Wed, 19 Feb 2020 15:35:46 -0500
Subject: [PATCH 1/2] bootloader: grub: Use the all_video module in graphic
mode.
Fixes <https://bugs.gnu.org/39467>.
* gnu/bootloader/grub.scm (eye-candy): Load the module 'all_video'
which automatically loads all the available and relevant video
modules.
---
gnu/bootloader/grub.scm | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
index 3ec960abd8..c1cee78a16 100644
--- a/gnu/bootloader/grub.scm
+++ b/gnu/bootloader/grub.scm
@@ -163,21 +163,8 @@ system string---e.g., \"x86_64-linux\"."
(string-append "set gfxmode=" (string-join gfxmode ";"))
"# Leave 'gfxmode' to 'auto'."))
"
- insmod video_bochs
- insmod video_cirrus
+ insmod all_video
insmod gfxterm
-
- if [ \"${grub_platform}\" == efi ]; then
- # This is for (U)EFI systems (these modules are unavailable in the
- # non-EFI GRUB.) If we don't load them, GRUB boots in \"blind mode\",
- # which isn't convenient.
- insmod efi_gop
- insmod efi_uga
- else
- # These are specific to non-EFI Intel machines.
- insmod vbe
- insmod vga
- fi
")
""))
--
2.25.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-bootloader-grub-Refactor-eye-candy-a-bit.patch --]
[-- Type: text/x-patch, Size: 2863 bytes --]
From 5892917e2e56535deba9579a3013b54177fadc57 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Wed, 19 Feb 2020 15:59:06 -0500
Subject: [PATCH 2/2] bootloader: grub: Refactor eye-candy a bit.
* gnu/bootloader/grub.scm (eye-candy)[setup-gfxterm-body]: Define the GFXMODE
binding using AND-LET* instead of chained AND=>. Add a comment about
supporting graphical mode on other systems than x86. Generate configuration
string using FORMAT rather than STRING-APPEND.
---
gnu/bootloader/grub.scm | 37 ++++++++++++++++++++-----------------
1 file changed, 20 insertions(+), 17 deletions(-)
diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
index c1cee78a16..d81e990cea 100644
--- a/gnu/bootloader/grub.scm
+++ b/gnu/bootloader/grub.scm
@@ -36,6 +36,7 @@
#:use-module (ice-9 match)
#:use-module (ice-9 regex)
#:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-2)
#:export (grub-image
grub-image?
grub-image-aspect-ratio
@@ -149,24 +150,26 @@ STORE-MOUNT-POINT is its mount point; these are used to determine where the
background image and fonts must be searched for. SYSTEM must be the target
system string---e.g., \"x86_64-linux\"."
(define setup-gfxterm-body
- ;; Intel and EFI systems need to be switched into graphics mode, whereas
- ;; 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
- "
-"
- (let ((gfxmode (and=>
- (and=> config bootloader-configuration-theme)
- grub-gfxmode)))
- (if gfxmode
- (string-append "set gfxmode=" (string-join gfxmode ";"))
- "# Leave 'gfxmode' to 'auto'."))
- "
+ (let ((gfxmode
+ (or (and-let* ((theme (bootloader-configuration-theme config))
+ (gfxmode (grub-gfxmode theme)))
+ (string-join gfxmode ";"))
+ "auto")))
+
+ ;; Intel and EFI systems need to be switched into graphics mode, whereas
+ ;; most other modern architectures have no other mode and therefore
+ ;; don't need to be switched.
+
+ ;; XXX: Do we really need to restrict to x86 systems? We could imitate
+ ;; what the GRUB default configuration does and decide based on whether
+ ;; a user provided 'gfxterm' in the terminal-outputs field of their
+ ;; bootloader-configuration record.
+ (if (string-match "^(x86_64|i[3-6]86)-" system)
+ (format #f "
+ set gfxmode=~a
insmod all_video
- insmod gfxterm
-")
- ""))
+ insmod gfxterm~%" gfxmode)
+ "")))
(define (setup-gfxterm config font-file)
(if (memq 'gfxterm (bootloader-configuration-terminal-outputs config))
--
2.25.0
next prev parent reply other threads:[~2020-02-20 2:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-14 19:30 bug#39607: GRUB module all_video required to get video on 4K monitor Maxim Cournoyer
2020-02-20 2:55 ` Maxim Cournoyer [this message]
2020-02-21 14:33 ` Maxim Cournoyer
2020-03-18 3:31 ` Maxim Cournoyer
2020-02-24 14:08 ` bug#39607: Status: " Maxim Cournoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d0aa9dc5.fsf@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=39607@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).