Grub2 & Secure boot - Larger Font for HiDPI displays

I picked up a ThinkPad X1 Gen 12 with 3K display, and the Grub2 menu is insanely small. (See attached photo) I thought changing the font out would be a simple enough task, but apparently I fully misjudged something that should be simple for how complex it would turn out to be.

Increasing the Console/TTY size was easy but Grub not so much… Open to suggestions.

It appears with Secure boot it prevents using unsigned fonts and where my issue likely exists. (See photo | google afterwards seems to confirm this is likely my culprit) I am not looking to disable secure boot.

How can I get the font size legible, or is there any plans to include a signed larger font for the modern era bundled in, or where can I find a larger signed font?

dnf install terminus-fonts-grub2
cp /usr/share/grub/ter-u32n.pf2  /boot/grub2/fonts/ter-u32n.pf2
chmod 700 /boot/grub2/fonts/ter-u32n.pf2  # to match the default font unicode.pf2
nano /etc/default/grub

grub contents:

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Fedora"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="vconsole.font=ter-132n rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
GRUB_FONT=/boot/grub2/fonts/ter-u32n.pf2
grub2-mkconfig -o /boot/grub2/grub.cfg

Error which lead me to likely a secure boot annoyance…

Showing How crazy small the menu is

You used the full file name (including extension)
image
Apparently the font name needs to be given without the extension since the image shows .pf2.pf2 as the file not found

Your font size in the menu appears similar to what I see on my 4k monitor with standard font sizes. I can read it well enough to not change.

Yes I wast testing all variations of path and extension. The last two lines are the important ones where it’s defined correctly and references secure boot.

Changing the resolution was used here Setting tty resolution | grub2 - #5 by vekruse

I don’t expect changing GRUB_CMDLINE_LINUX to have any effect on grub itself; only on the tty console after the kernel has booted.

Oh I misunderstood what was being fixed :frowning:

Villy is correct. I have TTY/Console text size increased with the GRUB_CMDLINE_LINUX vconsole.font parameter.

What I am focused on fixing is Grub Menu and Grub Command line font size which is very unusable for my eyes, and of course from an OCD perspective I just want it usable and to match my console size…

This is where the GRUB_FONT is supposedly supposed to help, but it seems they do not provide a larger font by default for modern displays and made it difficult to change now that grub with secure boot wants signed files to load.

Perhaps you can experiment with various values pf GRUB_TERMINAL_OUTPUT.
Valid values are

‘GRUB_TERMINAL_OUTPUT’
     Select the terminal output device.  You may select multiple devices
     here, separated by spaces.

     Valid terminal output names depend on the platform, but may include
     ‘console’ (native platform console), ‘serial’ (serial terminal),
     ‘serial_<port>’ (serial terminal with explicit port selection),
     ‘gfxterm’ (graphics-mode output), ‘vga_text’ (VGA text output),
     ‘mda_text’ (MDA text output), ‘morse’ (Morse-coding using system
     beeper) or ‘spkmodem’ (simple data protocol using system speaker).

     ‘spkmodem’ is useful when no serial port is available.  Connect the
     output of sending system (where GRUB is running) to line-in of
     receiving system (usually developer machine).  On receiving system
     compile ‘spkmodem-recv’ from ‘util/spkmodem-recv.c’ and run:

          parecord --channels=1 --rate=48000 --format=s16le | ./spkmodem-recv

     The default is to use the platform's native terminal output.

Documentations are at https://www.gnu.org/software/grub/manual/grub/grub.html

Add to /etc/default/grub:

GRUB_TERMINAL_OUTPUT="gfxterm"
GRUB_GFXMODE=1024x768
GRUB_GFXPAYLOAD_LINUX=keep

Rebuild grub:

$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Sorry I should have also added the following to my testing too.

I attempted to use GRUB_TERMINAL_OUTPUT and setting gfxterm, but then all the bordering of Grub was garbled and it made no difference in font size or picking up font either.

Lastly, I want to steer clear of setting/defining a specific lower resolution vs. native panel (auto) so that whether I connect to any external monitor; either in an office, home, etc I do not run into an issue where the specific panel does not support the defined resolution, or need to set multiple iterative fallbacks or needing to remember to boot with laptop disconnected then connect display, etc.

I know first world problems, and OCD satiating and should not be as concerned with the number of times I need to leverage the grub menu and command line, but it’s still a nice to have and something you think should be considered with the prevelance of high res displays nowadays… :slight_smile:

looks like we just crossed paths. gfxterm did not solve the problem, and setting a defined resolution is not desirable solution with the challenges that come with it.

gfxterm requires a gfxmode so you need to set a VESA resolution for it, otherwise it won’t work

It’s the easiest way to get normal sized grub boot menu without any of the other hassles with custom fonts etc. The are no particular additional challenges as far as i know.

You won’t get the same resolution as in the TTY but perhaps that doesn’t really matter, it’s only for the 3 second menu.