In GRUB2 the preferred method of setting framebuffer resolution (to GRUB and the kernel) is to edit /etc/default/grub to contain these variables:

  • GRUB_GFXMODE sets the resolution of GRUB
  • GRUB_GFXPAYLOAD_LINUX controls whether the linux kernel will keep the resolution, and if you want the linux kernel to use different resolution than GRUB, you can set it with this variable in form widthxheight.

To show all modes you can use:

  • hwinfo --framebuffer in linux terminal
  • vbeinfo in GRUB prompt

Sample configuration of framebuffer resolution

These lines are inserted to /etc/default/grub:

GRUB_GFXMODE=1024x768x32
GRUB_GFXPAYLOAD_LINUX=keep

In order to generate the changes, run

# grub-mkconfig -o /boot/grub/grub.cfg

Excerpt from GNU GRUB Manual 2.00

‘GRUB_GFXMODE’

Set the resolution used on the ‘gfxterm’ graphical terminal. Note that you can only use modes which your graphics card supports via VESA BIOS Extensions (VBE), so for example native LCD panel resolutions may not be available. The default is ‘auto’, which tries to select a preferred resolution. See gfxmode.

‘GRUB_GFXPAYLOAD_LINUX’

Set to ‘text’ to force the Linux kernel to boot in normal text mode, ‘keep’ to preserve the graphics mode set using ‘GRUB_GFXMODE’, ‘widthxheight’[‘xdepth’] to set a particular graphics mode, or a sequence of these separated by commas or semicolons to try several modes in sequence. See gfxpayload.

Depending on your kernel, your distribution, your graphics card, and the phase of the moon, note that using this option may cause GNU/Linux to suffer from various display problems, particularly during the early part of the boot sequence. If you have problems, set this option to ‘text’ and GRUB will tell Linux to boot in normal text mode.

References

  • ArchWiki's page about GRUB.
  • GNU GRUB Manual 2.00.
Answer from user37607 on Stack Exchange
🌐
Debian
wiki.debian.org › GrubTransition
GrubTransition - Debian Wiki
Use set gfxpayload=text before linux command instead" you don't need to downgrade to grub-legacy. Just replace linux and initrd by linux16 and initrd16 in each menuentry bloc you want to use VGA mode and add vga=ext or vga=F01 near the end of the linux16 line to get 80x50 text consoles instead ...
🌐
Stack Exchange
unix.stackexchange.com › questions › 107479 › how-do-you-pass-vga-vesa-modes-with-grub2
boot - How Do You Pass VGA/VESA Modes with GRUB2? - Unix & Linux Stack Exchange

In GRUB2 the preferred method of setting framebuffer resolution (to GRUB and the kernel) is to edit /etc/default/grub to contain these variables:

  • GRUB_GFXMODE sets the resolution of GRUB
  • GRUB_GFXPAYLOAD_LINUX controls whether the linux kernel will keep the resolution, and if you want the linux kernel to use different resolution than GRUB, you can set it with this variable in form widthxheight.

To show all modes you can use:

  • hwinfo --framebuffer in linux terminal
  • vbeinfo in GRUB prompt

Sample configuration of framebuffer resolution

These lines are inserted to /etc/default/grub:

GRUB_GFXMODE=1024x768x32
GRUB_GFXPAYLOAD_LINUX=keep

In order to generate the changes, run

# grub-mkconfig -o /boot/grub/grub.cfg

Excerpt from GNU GRUB Manual 2.00

‘GRUB_GFXMODE’

Set the resolution used on the ‘gfxterm’ graphical terminal. Note that you can only use modes which your graphics card supports via VESA BIOS Extensions (VBE), so for example native LCD panel resolutions may not be available. The default is ‘auto’, which tries to select a preferred resolution. See gfxmode.

‘GRUB_GFXPAYLOAD_LINUX’

Set to ‘text’ to force the Linux kernel to boot in normal text mode, ‘keep’ to preserve the graphics mode set using ‘GRUB_GFXMODE’, ‘widthxheight’[‘xdepth’] to set a particular graphics mode, or a sequence of these separated by commas or semicolons to try several modes in sequence. See gfxpayload.

Depending on your kernel, your distribution, your graphics card, and the phase of the moon, note that using this option may cause GNU/Linux to suffer from various display problems, particularly during the early part of the boot sequence. If you have problems, set this option to ‘text’ and GRUB will tell Linux to boot in normal text mode.

References

  • ArchWiki's page about GRUB.
  • GNU GRUB Manual 2.00.
Answer from user37607 on unix.stackexchange.com
🌐
Baudu
pierre.baudu.in › other › grub.vga.modes.html
GRUB VGA Modes
GRUB allows you to choose the VGA definition it uses when booting. (Note: this does not affect the definition in Xorg). ... Of course, replace xxx with the video mode you want.
🌐
Stack Exchange
unix.stackexchange.com › questions › 71231 › grub2-and-kernel-vga-parameter
boot - GRUB2 and kernel vga= parameter - Unix & Linux Stack Exchange

Maybe it is deprecated by grub2, however it should still work and must continue to work. It works for me using grub2 and debian wheezy as well as rhel7.3 (confirmed 01-2017). Also according to the official documentation it is not deprecated:

https://www.kernel.org/doc/Documentation/x86/boot.txt

If the command line provided by the boot loader is entered by the user, the user may expect the following command line options to work. They should normally not be deleted from the kernel command line even though not all of them are actually meaningful to the kernel.

vga= here is either an integer (in C notation, either decimal, octal, or hexadecimal) or one of the strings "normal" (meaning 0xFFFF), "ext" (meaning 0xFFFE) or "ask" (meaning 0xFFFD). This value should be entered into the vid_mode field, as it is used by the kernel before the command line is parsed.

And https://www.kernel.org/doc/Documentation/svga.txt will tell you all you need to know. Below a few examples of resolutions I commonly use:

vga=0x31b --> 1280x1024x32
vga=0x34d --> 1600x900x32
vga=0x31e --> 1600x1200x32

To get a list of supported modes use:

vga=ask

For a 1024×768x24 screen which I found works on pretty much all systems and monitors I use (this time in decimal and in hex):

vga=792
vga=0x318
Answer from aseq on unix.stackexchange.com
🌐
Pendrive Linux
pendrivelinux.com › home › get started using linux › linux vga modes set screen resolution at boot
Linux VGA Modes, GRUB Screen Resolutions, and GFX Settings
May 24, 2007 - A straightforward way to set your Linux VGA modes, GRUB screen resolution, and color depth for most Live Linux distributions is by using the vga= parameter boot option. For instance, at boot, you might type: vga=795. This command sets your Linux system to boot with a screen resolution of 1280x1024 ...
🌐
Cromwell Intl
cromwell-intl.com › open-source › grub-vga-modes.html
GRUB and VGA Modes
June 22, 2024 - ... If the command is instead ... should, this wouldn't be a problem and you might not even notice the difference. You can add a vga= directive to the kernel line in the GRUB file, something like the following:...
🌐
Debian User Forums
forums.debian.net › viewtopic.php
[Solved] Installer graphics corrupt + GRUB install borked - Debian User Forums
Edit about solution - TLDR: for those who land here from searches (this only applies to booting the installer in legacy/BIOS/MBR mode. UEFI is different): Solution was to hit TAB on the installer (it's not GRUB) menu to enter boot commands, and change the "vga=788" (mine was this) value to ...
🌐
ArchWiki
wiki.archlinux.org › title › GRUB › Tips_and_tricks
GRUB/Tips and tricks - ArchWiki
Make sure to run grub-mkconfig -o /boot/grub/grub.cfg after making changes. If this method does not work for you, the deprecated vga= method will still work.
🌐
Debian
lists.debian.org › debian-user › 2017 › 12 › msg00579.html
kernel param vga=* and grub2
After entering the boot command: "install console=ttyS0,115200n8" the following appeared: "Undefined video mode number: 314 Press <ENTER> to see video modes available, <SPACE> to continue, or wait 30 sec" This can be suppressed by adding 'vga=off'. However, vga=* is deprecated in grub2 and will ...
Find elsewhere
🌐
Ask Ubuntu
askubuntu.com › questions › 206967 › why-isnt-grub2-using-custom-resolution
boot - Why isn't Grub2 using custom resolution? - Ask Ubuntu

When you set the mode, try to also include the bit depth in /etc/default/grub, e.g.:

GRUB_GFXMODE=1600x900x24

Also add this line:

GRUB_GFXPAYLOAD_LINUX=keep

Run sudo update-grub, reboot and let us know if it worked.

Answer from phoibos on askubuntu.com
🌐
Ask Ubuntu
askubuntu.com › questions › 952444 › set-grub-console-mode-resolution
boot - Set GRUB console-mode resolution - Ask Ubuntu

Try this:

  1. Open terminal, sudo -H gedit /etc/default/grub
  2. Change the resolution you need in GRUB_GFXMODE=
  3. Add this line right below it >> GRUB_GFXPAYLOAD_LINUX=keep
  4. Save & Exit
  5. Type in terminal: sudo update-grub
  6. Then finally: sudo grub-mkconfig -o /boot/grub/grub.cfg
  7. Reboot
Answer from user750056 on askubuntu.com
🌐
Debian User Forums
forums.debian.net › viewtopic.php
Grub2 and framebuffer - Debian User Forums
GRUB_DEFAULT=0 GRUB_TIMEOUT=3 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet vga=0x0365" # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console # The resolution used on graphical terminal # note that you can use only modes ...
🌐
Google Groups
groups.google.com › g › linux.debian.user › c › 2OCk19RyCBY
Setting the screen resolution in grub2
GRUB_CMDLINE_LINUX="vga=769" in /etc/default/grub doesn't work. There is lots of stuff on the web on how to do this, but I couldn't find anything /etc/default/grub specific. ... -- To UNSUBSCRIBE, email to debian-us...@lists.debian.org with a subject of "unsubscribe".
🌐
GNU
gnu.org › software › grub › manual › grub › html_node › gfxpayload.html
GNU GRUB Manual 2.12: gfxpayload
If this variable is set, it controls the video mode in which the Linux kernel starts up, replacing the ‘vga=’ boot option (see linux).
🌐
Super User
superuser.com › questions › 657392 › how-to-change-video-mode-in-debian-wheezy-on-virtualbox-4-1-12
linux - How to change video mode in Debian Wheezy on VirtualBox 4.1.12? - Super User

To get this to work for me, I followed the instructions in: https://askubuntu.com/a/18463

Steps taken for me

Become root user

su

Open /etc/default/grub.

Find GRUB_GFXMODE= ... and change it to:

GRUB_GFXMODE=800x600
GRUB_GFXPAYLOAD=800x600x32

Edit /etc/grub.d/00_header

Find if [ "x${GRUB_GFXMODE}" = "x" ] ; and change it to:

if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=800x600 ; fi
if [ "x${GRUB_GFXPAYLOAD}" = "x" ] ; then GRUB_GFXPAYLOAD=800x600x32 ; fi

Find set gfxmode=${GRUB_GFXMODE} and change it to:

set gfxmode=${GRUB_GFXMODE}
set gfxpayload=${GRUB_GFXPAYLOAD}

Run:

update-grub2

Context

I got this working today. I therefore do not know how stable the fix is - in terms of updates being applied to grub or the linux kernel. I hope someone else can clarify whether these settings files every get overwritten by upgrades.

Answer from Matthew Dunsdon on superuser.com
🌐
Debian User Forums
forums.debian.net › viewtopic.php
GRUB vga resolution - Debian User Forums
Lenny used a low resolution so menu was readable i know lilo and it uses vga=791 or somethings like to set mbr menu how to proceed with grub ? what file i have to edit and wich command i have to use to update MBR ? also tty consoles appear in high resolution mode ....is enough to set grub ...
🌐
Narkive
alt.os.linux.suse.narkive.com › IzlQA8an › grub-vga-mode
GRUB VGA mode
Post by Inge Svensson Can someone please check in GRUB for 11.1 what it says for VGA mode. Mine seams to have been changed. Perhaps after a crash. Inge Svensson I have mine set for: vga=0x314; it is for 800x600 for console mode for bootup into runlevel 3.
🌐
openSUSE Forums
forums.opensuse.org › english › install/boot/login
Grub2 Console VGA Modes in Yast - Install/Boot/Login - openSUSE Forums
May 18, 2014 - Using Yast to configure the bootloader Grub2. The list of VGA modes contains only these LOW screen resolutions. 320x200 320x240 320x400 640x400 640x480 800x600 8bit 0x330 0x334 0x331 0x300 0x301 0x303 16bit 0x30e 0x335 0x332 0x33d 0x311 0x314 24bit 0x30f 0x336 0x333 0x33e 0x312 0x315 Taken ...
🌐
Ask Ubuntu
askubuntu.com › questions › 1492611 › building-a-custom-kernel-for-a-vga-text-console
Building a custom kernel for a VGA text console - Ask Ubuntu
The requirements are PC-BIOS running in VGA text mode (not UEFI). I turned off "support for frame buffer devices" in the kernel configuration. Now I experience the following: When I use "set gfxpayload=text" in grub I get a "colour dummy device 80x25 console".
🌐
Arch Linux Forums
bbs.archlinux.org › viewtopic.php
[SOLVED]Grub + vga option / Newbie Corner / Arch Linux Forums
I've always had the vga=795 option added to the kernel line in /boot/grub/menu.lst. Since today, this doesn't work anymore although I never changed the config file. I get this error: probing EDD (edd=off to disable) undefined video number:31b press <enter> to see video modes available, <space> ...