By default ubuntu uses a plain 80x25 text screen in a vt.

A much more useable text mode screen or console can be obtained by using a framebuffer driver. Take a look at this howto on the ubuntu forums, or continue reading here.

With framebuffer support enabled, you can have a high resolution, high color virtual terminal with 128 character X 48 line text. Graphics can be displayed in a framebuffer console with the right software. There are web browsers, general-purpose image viewers, you can even watch full-screen video. Install the gpm package and you can use your mouse too.

To enable the framebuffer, some modules must be loaded early in the boot process. Some older versions of ubuntu (before 7.10) had framebuffer support included. More recent versions can have the modules added to the initrd.img file that is loaded at boot time.

Open a terminal or vt and navigate to /etc/initramfs-tools/. As root, use your editor of choice to open the file named modules and add the 2 module names fbcon and vesafb on separate lines. Here is what my /etc/initramfs-tools/modules looks like:

# List of modules that you want to include in your initramfs.
#
# Syntax: module_name [args ...]
#
# You must run update-initramfs(8) to effect this change.
#
# Examples:
#
# raid1
# sd_mod
#
# These 2 modules added for frame buffer:
fbcon
vesafb
# remember to comment or remove corresponding module names 
# from /etc/modprobe.d/blacklist-framebuffer and to run 
# "sudo update-initramfs -u -k all" after any changes.

Save the modules file, then navigate to the /etc/modprobe.d/ directory. Again as root, open the file blacklist-framebuffer. Look for lines with the names fbcon and vesafb. Insert a # character at the beginning of those lines, then save the file. Now issue the command:

sudo update-initramfs -u -k all

One more edit is necessary. Change directory to /boot/grub/ and (as root of course) open menu.lst. Look for the section that says "Start Default Options" A few lines below should be a line like this:

# kopt=root=UUID=572f6e2b-4da6-4147-9822-6d5f8be84ebd ro
You may see a device name like "/dev/sda2" or "label=..." instead of "UUID=...." Append your desired vga mode to the end of that line so it looks like this:
# kopt=root=UUID=572f6e2b-4da6-4147-9822-6d5f8be84ebd ro vga=0x0318

Don't remove the # character from the "# kopt=..." line. The debian update-grub utility uses a system of specially commented lines to automatically update menu.lst when there is a kernel update. Making the change here, rather than further on in the file where the actual bootloader directives are written, makes it easy to update all the grub menu items correctly, and ensures that the change will not be deleted when a kernel update is installed from the repositories. After saving menu.lst, run this command:

sudo update-grub

Mode 0x317 or 0x318 gives the 48x128 display mentioned earlier. The table lists modes for the vesafb driver. Adapter-specific drivers may support other modes. Naturally your display must also be capable of running at the desired resolution.

VESA framebuffer modes

Colors 640x480 800x600 1024x768 1280x1024
256 0x301 0x303 0x305 0x307
32K 0x310 0x313 0x316 0x319
64K 0x311 0x314 0x317 0x31A
16M 0x312 0x315 0x318 0x31B

After you've completed all the mods, reboot your system, switch to a vt with <Control-Alt-F1> and you should see a much improved text mode console.

*   *   *

Some programs that display graphics in a framebuffer vt:

  • links2 web browser
  • fbi framebuffer image viewer
  • fbgs pdf and postscript viewer
  • mplayer for video
Check the repositories for these packages and for gpm, the "general purpose mouse" .


*   *   *

There are adapter specific framebuffer drivers that you can try. They may support more video modes or allow access to more features of your adapter, but some are buggy or may not work with all monitors.

The vesafb driver works reliably with most vesa-compliant adapters, meaning most anything made in the last 15 years or so. The downside is it does not support any hardware acceleration. For most uses of the console it doesn't matter.

Other driver names are listed in /etc/modprobe.d/
blacklist-framebuffer
. Use them by substituting the desired driver name where 'vesafb' is used here. The fbcon module is always required for a framebuffer.



*   *   *


For more than you probably wanted to know, look at the framebuffer pages in the kernel documentation available at mjmwired.net



*   *   *