Vesafb.txt : “kernel source Documentation”

What is vesafb?
===============

This is a generic driver for a graphic framebuffer on intel boxes.

The idea is simple: Turn on graphics mode at boot time with the help
of the BIOS, and use this as framebuffer device /dev/fb0, like the m68k
(and other) ports do.

This means we decide at boot time whenever we want to run in text or
graphics mode. Switching mode later on (in protected mode) is
impossible; BIOS calls work in real mode only. VESA BIOS Extensions
Version 2.0 are required, because we need a linear frame buffer.


Advantages:

* It provides a nice large console (128 cols + 48 lines with 1024×768)
without using tiny, unreadable fonts.
* You can run XF68_FBDev on top of /dev/fb0 (=> non-accelerated X11
support for every VBE 2.0 compliant graphics board).
* Most important: boot logo :-)

Disadvantages:

* graphic mode is slower than text mode…

How to use it?
==============

Switching modes is done using the vga=… boot parameter. Read
Documentation/svga.txt for details.

You should compile in both vgacon (for text mode) and vesafb (for
graphics mode). Which of them takes over the console depends on
whenever the specified mode is text or graphics.

The graphic modes are NOT in the list which you get if you boot with
vga=ask and hit return. The mode you wish to use is derived from the
VESA mode number. Here are those VESA mode numbers:

| 640×480 800×600 1024×768 1280×1024
—-+————————————-
256 | 0×101 0×103 0×105 0×107
32k | 0×110 0×113 0×116 0×119
64k | 0×111 0×114 0×117 0×11A
16M | 0×112 0×115 0×118 0×11B

The video mode number of the Linux kernel is the VESA mode number plus
0×200.

Linux_kernel_mode_number = VESA_mode_number + 0×200

So the table for the Kernel mode numbers are:

| 640×480 800×600 1024×768 1280×1024
—-+————————————-
256 | 0×301 0×303 0×305 0×307
32k | 0×310 0×313 0×316 0×319
64k | 0×311 0×314 0×317 0×31A
16M | 0×312 0×315 0×318 0×31B

To enable one of those modes you have to specify “vga=ask” in the
lilo.conf file and rerun LILO. Then you can type in the desired
mode at the “vga=ask” prompt. For example if you like to use
1024×768x256 colors you have to say “305″ at this prompt.

If this does not work, this might be because your BIOS does not support
linear framebuffers or because it does not support this mode at all.
Even if your board does, it might be the BIOS which does not. VESA BIOS
Extensions v2.0 are required, 1.2 is NOT sufficient. You will get a
“bad mode number” message if something goes wrong.

1. Note: LILO cannot handle hex, for booting directly with
“vga=mode-number” you have to transform the numbers to decimal.
2. Note: Some newer versions of LILO appear to work with those hex values,
if you set the 0x in front of the numbers.