Linux VGA modes control screen resolution and color depth at boot. Older Linux versions used the vga= boot parameter to set framebuffer resolution, but modern distributions running kernel 5.x and 6.x rely on GRUB2 and Kernel Mode Setting (KMS) for display configuration. This guide covers all three methods - legacy vga=, GRUB2 GFXMODE, and the kernel video= parameter - so you can set the right boot resolution for your system whether it uses legacy BIOS or modern UEFI.
Quick answer: On modern Linux, edit /etc/default/grub, set GRUB_GFXMODE=1920x1080x32 and GRUB_GFXPAYLOAD_LINUX=keep, then run sudo update-grub (Debian/Ubuntu) or sudo grub2-mkconfig -o /boot/grub2/grub.cfg (Fedora/RHEL). The legacy vga= parameter is deprecated and ignored on systems with KMS drivers.

The vga= boot parameter was once the standard way to set Linux boot screen resolution. For example:
vga=795
This historically set the framebuffer to 1280x1024 at 24-bit color depth on older kernels using the vesafb driver. On modern Linux systems with Kernel Mode Setting (KMS), this parameter is deprecated and typically ignored by the kernel - the driver manages display configuration internally.
Linux Boot Resolution: Legacy vs. Modern Methods
1. Legacy Method: vga= Boot Parameter
The vga= parameter works with the older vesafb framebuffer driver and accepts either decimal or hexadecimal VESA mode numbers. It allows manual setting of resolution and color depth during boot.
Example:
vga=795
To use vga= interactively and select from all supported modes at boot, use:
vga=ask
This displays a list of available modes and lets you choose one before the kernel loads. Note that vga=ask is not supported by all versions of GRUB2 - it works most reliably with the linux16 command in GRUB or with GRUB Legacy.
Use vga= only if:
- You are booting an older Live Linux distribution on legacy BIOS hardware
- You are troubleshooting legacy framebuffer issues
- KMS has been explicitly disabled with
nomodeset
On modern UEFI systems with DRM/KMS drivers (Intel i915, AMD amdgpu, open-source Nouveau), vga= is ignored. Do not rely on it for current distributions.
2. Modern Method: GRUB2 GFXMODE (Recommended for Most Users)
Modern Linux distributions use GRUB2 to control boot resolution. This is the preferred method for setting resolution on the GRUB splash screen and bootloader interface.
Edit the GRUB configuration file:
sudo nano /etc/default/grub
Add or modify the following lines. You can optionally include color depth (e.g. x32) after the resolution:
GRUB_GFXMODE=1920x1080x32
To preserve that resolution after the kernel takes over (prevents a resolution reset during boot):
GRUB_GFXPAYLOAD_LINUX=keep
Then regenerate the GRUB configuration. Use the command for your distribution:
Debian / Ubuntu / Linux Mint:
sudo update-grub
Fedora / RHEL / CentOS:
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
UEFI systems (if GRUB config is on the EFI partition):
sudo grub2-mkconfig -o /boot/efi/EFI/ubuntu/grub.cfg
Important: Never edit /boot/grub/grub.cfg directly - that file is auto-generated and your changes will be overwritten the next time GRUB updates.
Using Multiple Fallback Resolutions
GRUB will attempt each resolution in the list in order, falling back to the next if the previous is not supported by the hardware:
GRUB_GFXMODE=1920x1080x32,1280x1024x32,1024x768x32,auto
Including auto at the end ensures GRUB always finds a working mode even on unusual hardware.
How to Check Which Resolutions Your System Supports
Before setting a resolution, verify your hardware actually supports it. Two methods:
From the GRUB command line - press c at the GRUB menu to open a GRUB shell, then run:
videoinfo
This lists all modes supported by your graphics card via VESA BIOS Extensions.
From a running Linux system - install hwinfo and run as root:
sudo hwinfo --framebuffer
This outputs all supported framebuffer modes and their corresponding codes.
3. Kernel Video Parameter (Best for KMS Systems and Multi-Monitor)
For modern KMS-based systems, using the kernel video= parameter gives the most precise control, especially on multi-monitor setups or when EDID detection fails. This parameter is passed to the kernel itself, not to GRUB.
Example for an HDMI output at 1920x1080 at 60Hz:
video=HDMI-A-1:1920x1080@60
Add this to the GRUB_CMDLINE_LINUX line in /etc/default/grub:
GRUB_CMDLINE_LINUX="video=HDMI-A-1:1920x1080@60"
Then regenerate GRUB:
sudo update-grub
To find the correct connector name for your display (HDMI-A-1, DP-1, eDP-1, etc.), check:
ls /sys/class/drm/
Or use modetest (from the libdrm-tests package) to list connected displays with their exact connector names.
This method works with Linux kernel 5.x and 6.x and is preferred for:
- Multi-monitor setups requiring per-display resolution control
- Live USB compatibility across machines with different display hardware
- Forcing a specific resolution when EDID auto-detection fails or returns incorrect data
- Embedded or kiosk systems that boot to a fixed display configuration
Kernel Mode Setting (KMS)
Modern Linux systems use Kernel Mode Setting (KMS), which initializes graphics drivers early in the boot process - before the desktop environment loads. KMS moves display configuration from user space into the kernel itself, resulting in smoother boot transitions, better resolution handling, and consistent graphics across the boot process.
Common KMS drivers:
- i915 - Intel integrated graphics
- amdgpu - AMD graphics (GCN architecture and newer)
- nouveau - open-source NVIDIA driver
- radeon - older AMD/ATI graphics
When KMS is active:
- The kernel sets display resolution automatically based on EDID data from the monitor
- The
vga=parameter is ignored - Color depth is managed internally by the driver
- Boot messages and splash screens render at the native display resolution
Temporarily Disabling KMS
If you encounter a black screen during boot or graphics driver failures, disabling KMS forces the kernel to use a basic framebuffer driver instead. Add nomodeset to the kernel command line.
To do this temporarily without saving:
- At the GRUB menu, highlight your boot entry
- Press e to edit
- Find the line starting with
linuxand addnomodesetat the end - Press Ctrl+X or F10 to boot
Note: nomodeset disables hardware-accelerated graphics. Use it only for troubleshooting. Do not make it permanent unless you are deliberately running without a KMS driver (e.g. using proprietary NVIDIA drivers that replace the kernel modesetting entirely).
Temporarily Changing Resolution at Boot (Without Saving)
To test a resolution change without permanently modifying your configuration:
- At the GRUB menu, highlight your boot entry
- Press e to enter the edit screen
- Modify the
GRUB_GFXMODEvalue or append a kernelvideo=parameter to thelinuxline - Press Ctrl+X or F10 to boot with the temporary settings
The changes apply only for that boot session and are not saved.
Common Display Issues and Fixes
- Black screen during boot: Add
nomodesetto the kernel line in GRUB temporarily. If this fixes it, your KMS driver may need updating or the proprietary driver may need to be installed. - Low resolution or blurry splash screen: Set
GRUB_GFXMODEto your monitor's native resolution in/etc/default/grub - Resolution resets after kernel loads: Add
GRUB_GFXPAYLOAD_LINUX=keepto carry the GRUB resolution through to the kernel - Monitor not detected or incorrect resolution: Use the
video=kernel parameter with the correct connector name and resolution - Screen flicker during boot transition: Usually resolved by
GRUB_GFXPAYLOAD_LINUX=keep - Unsupported resolution error: Run
videoinfoin the GRUB shell orhwinfo --framebufferto find which modes your hardware actually supports
Which Method Should You Use?
| System Type | Recommended Method | Notes |
| Legacy BIOS, older distro | vga= parameter |
Use only when KMS is disabled or unavailable |
| Modern GRUB2 system (most users) | GRUB_GFXMODE in /etc/default/grub |
Controls bootloader and splash resolution |
| KMS system, kernel 5.x / 6.x | video= kernel parameter |
Best for multi-monitor or when EDID fails |
| Any - resolution changes after GRUB | GRUB_GFXPAYLOAD_LINUX=keep |
Combine with GRUB_GFXMODE to persist resolution |
Frequently Asked Questions
Why is my vga= parameter being ignored?
The vga= parameter is deprecated and ignored on any system where Kernel Mode Setting (KMS) is active. This includes virtually all modern Linux distributions running kernel 4.x and newer with Intel, AMD, or Nouveau graphics drivers. Use GRUB_GFXMODE in /etc/default/grub instead.
What is the difference between GRUB_GFXMODE and GRUB_GFXPAYLOAD_LINUX?
GRUB_GFXMODE sets the resolution for the GRUB bootloader interface - the splash screen and boot menu. GRUB_GFXPAYLOAD_LINUX=keep tells the kernel to maintain that same resolution after GRUB hands control over. Without it, the kernel may reset to a different resolution during boot, causing a visible flicker or resolution change.
How do I find out which resolutions my hardware supports?
Two options: press c at the GRUB menu to enter the GRUB command shell and run videoinfo - this lists all VESA-supported modes. Alternatively, from a running system, install hwinfo and run sudo hwinfo --framebuffer to see all supported framebuffer modes and their codes.
How do I find the correct connector name for the video= parameter?
Run ls /sys/class/drm/ to list connected display connectors. Common names include HDMI-A-1, DP-1 (DisplayPort), eDP-1 (laptop internal display), and VGA-1. Use the exact connector name in your video= parameter - names are case-sensitive and must match your hardware output.
What does nomodeset do and when should I use it?
nomodeset prevents the kernel from initializing KMS graphics drivers early in the boot process, falling back to a basic VESA framebuffer instead. Use it temporarily to bypass a black screen caused by a broken or incompatible KMS driver, or when installing proprietary GPU drivers that replace the open-source kernel driver. Do not use it as a permanent setting unless you have a specific reason, as it disables hardware acceleration.
Do I need to run update-grub after every change to /etc/default/grub?
Yes. Changes to /etc/default/grub are not applied automatically. You must run sudo update-grub (Debian/Ubuntu) or sudo grub2-mkconfig -o /boot/grub2/grub.cfg (Fedora/RHEL) to regenerate the active GRUB configuration file. Without this step, your resolution settings will not take effect.
Final Thoughts on Setting Linux VGA Modes
The vga= parameter is now primarily of historical interest. For modern Linux systems, configuring GRUB_GFXMODE in /etc/default/grub combined with GRUB_GFXPAYLOAD_LINUX=keep provides reliable resolution control across the boot process. For KMS-based systems with kernel 5.x or 6.x, the video= kernel parameter gives the most precise per-display control and is the best option for multi-monitor setups, Live USB compatibility across different hardware, or when automatic EDID detection fails.
Always check which resolutions your hardware actually supports using videoinfo in the GRUB shell before setting a fixed mode - using an unsupported resolution can result in a black screen or fallback to a lower resolution automatically.