vga – configure a VGA card
configures a VGA controller for various display sizes and depths.
Using the monitor type specified in
given as argument
uses the database of known VGA controllers and monitors in
the display via the devices provided by
The options are:
use the VGA database entry corresponding to
0xC0045="Stealth 64 DRAM Vers. 2.02")
rather than looking for identifying strings in the BIOS
dump the BIOS memory (in hex) to standard output and exit.
disable the use of the hardware graphics cursor.
include the color palette in whatever actions are performed,
usually printing the contents.
when used with
display the register values that will be loaded.
load the desired mode.
is usually set by including it in the
file read by the PC boot program.
print the current or expected register values at appropriate points depending on
print a trace of the functions called.
print a verbose trace of the functions called.
as the VGA database rather than
is of the form
are numbers specifying the display height, width, and depth respectively.
is scaling mode, either
not specifying it disables scaling altogether.
is used to switch to a specific display using its index
The mode must appear in
as a value for one of the monitor entries.
The usual modes are
indicates interlaced operation.
The default mode is
is of the form
X x Y
and configures the display to have a virtual
screen of the given size.
The physical screen will pan to follow the mouse.
This is useful on displays with small screens,
such as laptops, but can be confusing.
Using the monitor name
to use VESA BIOS calls to configure the display.
Also, if our VGA controller can’t be found in
will try the VESA calls.
There are no entries for the
For a list of available VESA modes and connected displays, use
aux/vga -m vesa -p
Loading the special mode
aux/vga -l text
switches out of graphics mode back into text mode.
It uses the VESA BIOS.
Change the display resolution:
aux/vga -l 1600x1200x8
Show connected and active displays:
aux/vga -m vesa -p | grep dsp
Switch to display
and load a specific mode:
aux/vga -m vesa -l '1920x1080x16,#4'
Print the current VGA controller registers.
It is usually best to redirect the output of a
command to a file to prevent confusion caused by using the VGA
controller while trying to dump its state:
aux/vga -p >/tmp/x
Force the VGA controller to a known state:
aux/vga -m vga -l
Print the current VGA controller state and what would be loaded
into it for a new resolution, but don’t do the load:
aux/vga -ip 1376x1024x8 >/tmp/x
display type (default
VGA configuration file.
makes every effort possible to verify that the mode it is about
to load is valid and will bail out with an error message
before setting any registers if it encounters a problem.
However, things can go wrong, especially when playing with a
new VGA controller or monitor setting.
It is useful in such cases to have
the above command for setting the controller to a known state
at your fingertips.
Scaling modes currently work with Intel and NVIDIA video
adapters only, using VESA. Intel doesn’t support
Display switching currently works with Intel video adapters
only, using VESA.