Subject: bug#62141: Grub: set terminal_output earlier

From: Emmanuel Beffara <[email-masked]>
Date: Sat, 11 Mar 2023 19:41:30 +0100

Hello Guix,

In the generated `grub.cfg`, it would be an improvement to set the
`terminal_output` before any user input is required by Grub, for proper
interaction.

In my case, the laptop has a HiDPI display and Grub starts with a graphical
terminal in 3840x2160 resolution with extremely small characters. Then it asks
for the LUKS passphrase (I use full-system encryption) before setting the
output mode specified in the configuration. Not only is it unreadable, but
Grub is also known to be particularly slow with high resolutions [1], which
makes interaction painful, in case some emergency prompt happens (which it
does in the current state of things, cf. other bug reports).

[1] https://askubuntu.com/questions/1227735/grub-is-extremely-slow-1-second-per-key-input

My current method is to edit `grub.cfg` by hand after each `guix system
reconfigure` to move the lines between `if loadfont unicode; then` and
`terminal_output gfxterm` at the beginning, but this is not a viable solution.

-- 
Emmanuel