VGA(4)

πŸ’– VGA(4) β€” the generic video card interface, bestie edition πŸ’–

okay so this is vga, section 4 of the Kernel Interfaces Manual, and it's literally the moment your kernel learns to talk to a graphics card. sit down, grab a strawberry drink πŸ“, and let's get into it.


✨ NAME ✨

vga β€” generic video card interface


🌈 SYNOPSIS 🌈

options VESA
options VESA_DEBUG=N
options VGA_ALT_SEQACCESS
options VGA_NO_FONT_LOADING
options VGA_NO_MODE_CHANGE
options VGA_SLOW_IOACCESS
options VGA_WIDTH90
device vga

and then, in /boot/device.hints:

hint.vga.0.at="isa"

πŸ¦‹ DESCRIPTION πŸ¦‹

so the vga driver is a generic video card driver β€” like, the base-level one that gives you access to video cards. it's not optional-optional, bestie: this driver is required for the console driver syscons(4). the console driver literally calls up vga to mess with the video hardware β€” changing video modes, loading fonts, etc. it's giving "personal assistant to the console". πŸ’…

the vga driver supports the standard video cards: MDA, CGA, EGA and VGA. and on top of that? if your video card supports VESA BIOS extensions, the driver can use them. VESA support can either be statically baked into the kernel or loaded as a separate module. choose your fighter. πŸ‘‘

to statically link the VESA support into the kernel, you have to define the VESA option (it's down below, don't worry) in the kernel configuration file.

and if you'd rather do it live, the vesa module can be dynamically loaded into the kernel with kldload(8). no reboot required, we love that for us. ✨


πŸŽ€ DRIVER CONFIGURATION πŸŽ€

πŸ’œ Kernel Configuration Options

the following kernel configuration options (peep config(8)) can be used to control the vga driver. these ones are all about compatibility with certain VGA cards β€” like, they exist because some cards are quirky and we're being nice to them.

  • VGA_ALT_SEQACCESS β€” try this one if the mouse pointer is not drawn correctly, or if the font does not seem to be loaded properly on the VGA card. however, it may cause flicker on some systems. so it's a "fix one thing, maybe break another" situation, iykyk. πŸ’€
  • VGA_SLOW_IOACCESS β€” older VGA cards may require this option for proper operation. it makes the driver perform byte-wide I/O to VGA registers, and it slows things down a little. yes bestie, sometimes slow is correct. 🐒
  • VGA_WIDTH90 β€” this option enables 90 column modes: 90x25, 90x30, 90x43, 90x50, 90x60. these modes are not always supported by the video card and the display. and it is highly likely that an LCD display cannot work with these modes. so like… good luck, gorgeous. πŸ™ˆ

the following options add optional features to the driver. ✨

  • VESA β€” add VESA BIOS support to the driver. if the VGA card has the VESA BIOS extension 1.2 or later, this option will utilize the VESA BIOS service to switch to high resolution modes. iconic. 🌟
  • VESA_DEBUG=N β€” set the VESA support debug level to N. the default value is zero, which suppresses all debugging output. quiet luxury. 🀫

the following options will remove some features from the vga driver and save kernel memory. (we're decluttering, bestie 🧹)

  • VGA_NO_FONT_LOADING β€” the vga driver can load a software font to EGA and VGA cards. this option removes that feature. note: if you use this option and still wish to use the mouse on the console, then you must also use the SC_ALT_MOUSE_IMAGE option. see syscons(4). don't skip that part, fr fr. 🫢
  • VGA_NO_MODE_CHANGE β€” this option prevents the driver from changing video modes. that's it, that's the whole vibe. mode is locked, no takebacks. πŸ”’

🌸 EXAMPLES 🌸

your kernel configuration should normally have:

device vga

and you need the following line in /boot/device.hints:

hint.vga.0.at="isa"

the following lines should be included in the kernel configuration file in order to enable the VESA BIOS Extension support:

options VESA
device vga

if you do not want VESA support included in the kernel, but want to use it occasionally, do not add the VESA option. and load the vesa module as desired:

kldload vesa

casual. on-demand. main character energy. πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘


⭐ STANDARDS ⭐

Video Electronics Standards Association, VESA BIOS Extension (VBE).


πŸ¦„ HISTORY πŸ¦„

the vga driver first appeared in FreeBSD 3.1.


πŸ’– AUTHORS πŸ’–

the vga driver was written by Søren Schmidt <sos@FreeBSD.org> and Kazutaka Yokota <yokota@FreeBSD.org>. this manual page was written by Kazutaka Yokota. absolute legends, we stan. 🫢


and that's the whole page, bestie β€” brought to you from the Debian corner of the world, dated June 30, 1999. old but gold, no cap. πŸŽ€βœ¨πŸ’œ

πŸ“¦ where this page comes from