VESA framebuffer

I never really cared about VESA framebuffer. Since Slackware 13.0, the system would automatically switch to the native screen resolution when booting. That is, if I used the open source video drivers. When using the proprietary drivers of NVIDIA for example, the system will boot into the default low resolution console. I do not particularly like that, so I decided to investigate the options.

My Dell Latitude E6400 has a NVIDIA G98M Quadro NVS 160M which works fine out of the box, but when browsing some websites with a lot of images, the browser would occasionally hang up. The performance seems to be better with the proprietary drivers. I installed nvidia-legacy340-kernel and nvidia-legacy340-driver, then installed xf86-video-nouveau-blacklist package from /extra. Rebooted and everything seems to be fine, except that the console no longer changes to the native 1440×900 resolution.

If you check /etc/lilo.conf, it has the following options:

# Normal VGA console
  vga = normal
# Ask for video mode at boot (time out to normal in 30s)
# vga = ask
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769

Detailed information can be found in /etc/lilo.conf_example and reads:

# Specifying the VGA text mode that should be selected when booting.
# The following values are recognized (case is ignored):
#   vga=normal    80x25 text mode (default)
#   vga=extended  80x50 text mode (abbreviated to 'ext')
#   vga=ask       stop and ask for user input: choice of text mode
#   vga=    use the corresponding text mode number. A list of  
#                   available modes can be obtained by booting with  
#                   'vga=ask' and then pressing [Enter].
# Another way is the use of frame buffer mode. Then the kernel 
# will switch from the normal vga text mode (80x25) to the frame
# buffer  (if frame buffer support is in the kernel):
#                   16bit:    32bit:
#     640x480 :     0x311     0x312
#     800x600 :     0x314     0x315
#    1024x768 :     0x317     0x318
#    1280x960 :     0x365     0x366
#    1280x1024:     0x31A     0x31B
#    1400x1050:     0x345     0x346
#    1600x1200:     0x333     0x334
#    1680x1050:     0x3D2     0x3D4
#    1920x1440:     0x337     0x338
#vga = ask
vga = normal
#vga = 0x317

If you choose vga = ask, the system will offer a list of resolutions to choose from upon boot. Here, among the different options are:

Type: Mode: Resolution
VESA  364   1440x900x8
VESA  365   1440x900x32

What do the numbers mean? These are hexidecimal values that have to be passed as vga=0xHHH or converted to decimal values and passed as vga=XXX in the lilo.conf file. Let’s pick 1440x900x32. It has a hexidecimal value of 0x365, which corresponds to decimal number 869 and therefore can be passed to lilo either as

vga = 0x365

or as

vga = 869

The hexadecimal and decimal values are formed by the VESA number plus 0x200 or 512, respectively. Therefore, for 1440x900x32 the VESA hexadecimal value is 165 and the decimal is 357. As a reference, there are these discussions in the Gentoo forum.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s