site  contact  subhomenews

vga=792 removed from legacy boot mode

February 06, 2022 — BarryK

When the Linux kernel is booted on a PC with legacy-BIOS firmware, the screen starts up in a text-mode. This is different from the graphics modes -- the former just renders text characters and cannot display graphics.

However, if the kernel passes a "vga=" or "video=" parameter, the video can be flipped into a graphics mode. I introduced "vga=792" a few years ago for legacy-BIOS bootup, so as to display a logo and also to be able to run GUI apps within the initrd. I experimented with GUI apps to ask for keyboard layout and password.

Windows computers manufactured from 2012 onwards have UEFI firmware, and this does startup in a graphics mode, so no parameter is required on the kernel commandline.

After switch_root from initrd to the main filesystem, kernel modules are then loaded, including the KMS GPU modules. Note, these can be seen at /lib/modules/*/kernel/drivers/gpu/drm

Unless your video card is a very old type, there will likely be a KMS kernel module for the card, that will load. This will flip the video into a graphics mode, and you see this at bootup when the text on the screen suddenly becomes much smaller.

For legacy-BIOS bootup, usually there is no problem flipping from the graphics mode set by the "vga=792" parameter to that of the KMS driver. However, there may be two possible problems...

Forum member hundido reported that his video card does not support VGA mode 792:

https://forum.puppylinux.com/viewtopic.php?p=48793#p48793

The VESA modes are explained here:

https://en.wikipedia.org/wiki/VESA_BIOS_Extensions

In hundido's case it looks like the card is not happy with 24-bit colour, which is mode 792 decimal (318 hex), however does support 16-bit colour mode 791 decimal (317 hex).

That's one problem. The second is that the video card may not be able to flip from the graphics mode specified by the "vga=" parameter to that desired by the kernel KMS driver. Result is likely to be a black screen.

See subsequent posts in the above-linked forum thread, Feodor did some further tests.

To hopefully eliminate this problem entirely, I have removed the "vga=792" kernel boot parameter. It is now entirely gone. The file edited is 'syslinux.cfg' in the boot-partition.   

Tags: easy