How To: Change Graphics Mode for GRUB Bootloader

Unix Tutorial Unix Tutorial

One of the remaining things to fix on my new Dell XPS 13 laptop has been the graphics mode in GRUB bootloader that got activated with my Ubuntu 19.04 install. Somehow GRUB is smart enough to recognise 4K resolution on the laptop, so the GRUB boot menu looks so tiny that I can’t read any text (there’s no scaling applied to fonts). I finally decided to fix this.

Graphics modes in GRUB bootloader

GRUB is a simple enough software solution that traditionally used text console for presenting boot menu. In the last few years it introduced graphics mode: you still see a text menu with boot options, but they’re rendered in a graphics mode rather than shown in text mode.

Turns out, there’s a special option in /boot/grub/grub.cfg file that allows you to select a graphics resolution:

set gfxmode=1024x768

Change graphics mode for GRUB

To update this value properly, I suggest you edit the GRUB_GFXMODE in /etc/default/grub file:

GRUB_GFXMODE=1024x768

IMPORTANT: 1920×1080 mode is NOT supported, so don’t specify it. 1024×768 is a safe resolution that should be available on most hardware systems. I’ll write another post soon expanding on GRUB bootloader graphics resolutions topic.

Once this is done, re-build all the grub configuration files:

$ sudo grub-update

To verify that our resolution of 1024×768 made it into the config, grep for it:

greys@xps:~ $ grep 1024 /boot/grub/grub.cfg 
set gfxmode=1024x768

That’s it, you can reboot your PC or laptop now to enjoy a different resolution.

See Also




Contact Me

Follow me on Facebook, Twitter or Telegram:
Recommended
I learn with Educative: Educative
IT Consultancy
I'm a principal consultant with Tech Stack Solutions. I help with cloud architectrure, AWS deployments and automated management of Unix/Linux infrastructure. Get in touch!
Recent Articles
03 Sep 2024

macOS Sequoia 15.0

02 Sep 2024

Video: Has This Worked Before?

24 Mar 2024

Homelab: Mac Pro 2013 32GB

Recent Tweets