Although there are many different system configurations you could have, this is a short list of necessary items you will need, to enable frame buffering for VESA graphics cards.
Having a VESA 2.0 compliant card is a must. Frame buffering will not work on cards that are not VESA 2.0 compliant. To verify whether or not your card is compliant, check your hardware vendors web site for "Video Electronics Standards Association" under technical specifications or similar headings. This is a new feature that has been placed in the 2.2.x Linux kernel and therefore kind of makes having the newest kernel release a priority :-)
The main reason I have found so far for using the newest X-server is that some X-servers have a problem switching from a console in graphics mode to a window manager. I have KDE installed as well as the latest SVGA X-server and have no problem dropping to a console and returning to my X session while the X-server is active. When you think about it, the software has to switch from graphical console mode to the "already graphical" X-server mode (providing you are running X)
If you've never compiled a kernel, you're about to get a (pardon the pun) "crash course" for beginners. It is beyond the scope of this documentation to go into depth on how to compile a kernel. My best advice is to get to the LDP (Linux Documentation Project) site or one of its mirrors and grab a copy of the "Kernel-HOWTO" you can find this at: http://www.losurs.regina.sk.ca/docs/LDP/HOWTO/Kernel-HOWTO.html. For now just su yourself or log in as root almighty.
The first thing we need to do is compile frame buffering into the kernel. This can be done by moving to the source location of your kernel.
#cd /usr/src/linux
Within the /usr/src/linux dir you should notice a few or more directories, (one of which being the modules directory), as well as a Makefile. If you do not seem to have a /usr/src/linux directory or the directory has little more than and include directory, odds are you do not have the kernel source on your machine. If this is the case it depends on your distribution as to how you get the source on to your machine. If you have the CD try to locate the kernel-source on the CD. In ReadHat Linux the easiest way to do this is locate the "kernel-source" RPM and install it that way. For other releases, check your documentation on installing the source.
Once you have the source installed and are in the correct directory we can start configuring the kernel. The best way I have found for new users to compile a kernel is using the command,
#make menuconfig
What this will do is give you a graphical, menu driven manner to set options for compiling your kernel. Another couple options that you can use are,
#make xconfig
#make config
If you have an open X session display you can also use "make xconfig" which will also give you a graphical interface for compiling. Unless you are comfortable with specific areas of kernel configuration or like staring at screens of options one item at a time, my suggestion is to stay away from "make config"
You'll notice (after executing make menuconfig) that you now have a window with a set of options in it. What we are concerned with right now is the heading "Console drivers --->". Under the console drivers section is the happy little box for selecting "Support for Frame Buffer Devices" with the tail (EXPERIMENTAL). If anyone is still reading this you are either quite comfortable with "Experimenting" or you accurately fulfill the requirements for enabling frame buffering (namely a desire to play with your computer). Once you have this option selected the only one left here is "VESA VGA graphics console". For configuration directly related to the kernel that's pretty much it....now comes the fun part.
Ok so we have the configuration set for compiling our new kernel. Next we have to actually compile the kernel. Keep selecting [exit] until you are prompted to save your configuration and.....save it :-) you should see something similar to:
Saving your kernel configuration...
*** End of Linux kernel configuration.
*** Check the top-level Makefile for additional configuration.
*** Next, you may run 'make zImage', 'make zdisk', or 'make zlilo.'
In the same directory we will make and image file now. One thing to note is if your kernel is too large "make zImage" will not work, I've found it better to issue the following command:
#make bzImage
This will create a new file called, you guessed it, "bzImage" which is the kernel you will eventual be booting. First some important messages regarding a boot loader .....lilo
VERY!! (provided you are using lilo)I can't stress enough to new people how important lilo actually is. Seasoned users will know already, but for you who are new to linux, please read the next section carefully.
Lilo is the organizer and holder of some of the most important information (namely your kernel(s)) as well as other parameters you may need for the initial boot of your system. Once you have made a "bzImage" you will have to instruct lilo what to do with it, as well as tell it to add the image to its table. The table I am referring to is in the /etc directory. An example of what an entry looks like follows. The file is called "lilo.conf"
image=/boot/vmlinuz-2.2.13-7mdk label=linux root=/dev/hda6 read-only
For the sake of keeping things easy, let's name our new kernel "newkernel". First what we need to do is copy bzImage to /boot (the partition that contains the system booting information). Once we know the configuration works we can delete the bzImage file but it's not a bad idea to keep it around for now. To do this we'll copy the file under our new name keeping with the same naming convention of the original image.
#cd arch/i386/boot #cp bzImage /boot/vmlinuz-new
What this does is put our new kernel into the /boot partition so lilo can identify it when we add the parameters to lilo.conf. Keep in mind that /dev/??? should point to whatever your primary drive is, in my case /dev/hda1 is my boot partition and /dev/hda6 is my primary root partition. What we need to do now is tell lilo that we want the option to boot the new kernel on the next boot of the machine. To do this add the following lines to /etc/lilo.conf:
image=/boot/vmlinuz-new label=newkernel root=/dev/hda6 read-only
If you are not sure what drive is your primary can take a look at /etc/fstab. It is usually the first entry for hda and has a mount point of "/" NOT /boot. In this instance "/boot" holds the information to boot "/" , (hda1 usually has a mount point of /boot and is NOT the one we want). The initial entry "image=" is the location and name of the kernel we want to boot, the "label=" is what lilo will refer to this kernel. In other words, when you boot the machine and lilo has its prompt "Lilo:" if you press the <TAB> button a list of kernels you can boot will be in the list; for us "newkernel" will be one of the entries which can be selected. Whatever you do right now can determine whether or not you have a kernel to boot so before we continue please be advised ****do NOT reboot until we are completely finished****
I strongly suggest reading the text file on frame buffering in your documentation. This can usually be found somewhere like:
#/usr/doc/kernel-doc-<your version>/fb/vesafb.txt
Outlined in this document are the specifications for colour depths and resolutions that you will need to add to lilo.conf in order to enable frame buffering. The following is the table I'm referring to but only for reference, you should still read the text so you understand what you are actually doing by selecting a value. Another point to bring up is, knowing as much about your monitor and graphics card are somewhat essential to trouble shooting if something for one reason or another will not work, as well as what you can "SAFELY" set as parameters for colour depth and resolution on your system.
| 640x480 800x600 1024x768 1280x1024
----+-------------------------------------
256 | 0x301 0x303 0x305 0x307
32k | 0x310 0x313 0x316 0x319
64k | 0x311 0x314 0x317 0x31A
16M | 0x312 0x315 0x318 0x31B
Linux_kernel_mode_number = VESA_mode_number + 0x200
This table contains the "final" values you will enter into lilo.conf for specifying resolution and colour depth when in a graphical console mode. These are not however the most important values to understand unless you understand how they are achieved and why you are entering them. I'll leave the reading to you and get on with the "quick-guide"
At this point you probably already know the capabilities of your graphics card and monitor while running under linux. If you are unsure of any settings please contact your hardware vendor or check the LDP (Linux Documentation Project) to see if there are any specifics which have been recorded for your particular card or monitor. The following illustrates my personal configuration for resolution etc. I am running a Voodoo3 2000 graphics card with a Daytec monitor which is capable of doing 1024x768 @60Hz.
boot=/dev/hda map=/boot/map install=/boot/boot.b prompt timeout=50 vga=0x0318 image=/boot/vmlinuz-new label=newkernel root=/dev/hda6 read-only image=/boot/vmlinuz-2.2.13-7mdk label=linux root=/dev/hda6 read-only
As you can see the main line added to this file was vga="0x0318" which according to the table is a resolution of 1024x768 @16M colors. Just a note; You do not need to draw from a palette of 16M colours for text mode. On some systems this may seem to slow down certain functions such as cat'ing large files. Another thing to note is that my original kernel is still in the table in the event that something happens "label=linux".
I've also added the new kernel to the beginning of the table (in terms of images) so that lilo recognizes this as the default kernel, this is a matter of personal choice, When lilo prompts you to boot your machine, if you do not hit any keys it will just load the default kernel, pressing <TAB> is what will allow you to view your other choices. Putting the new kernel first just makes it easier for now (especially if you want to keep using this kernel)
The last thing we need to do now is save our lilo.conf file and above ALL else RUN LILO from the command line!!!! If you do not run lilo none of the information will be added to the MBR (Master Boot Record) and this will have all been for nothing ;-) Actually ANYTIME you add, append, or change information in lilo you must run it from the command line so the changes take effect. The following is the output from me running lilo:
#lilo Added newkernel * Added linux
As you can see, once lilo has been run it updates the information it needs to activate changes you have made to the lilo.conf file. Note the * by the "newkernel", this is to let you know that if you do not interrupt or stop the machine from booting, the default kernel that will load is "newkernel".
After running lilo you are ready to test your newly configured kernel. Make sure you have the kernel in the /boot partition and that all other applications or windows have been properly closed (if you had any open) and reboot your system:
#shutdown -r now
If you have made "newkernel" your default, when the system comes back up you should simply be able to let it boot on its own or hit <ENTER>, otherwise you will have to press the <TAB> key and type in the name of the kernel you want to boot. Once the machine boots up you, (with any luck and skill) should see your new crisp display and the happy little graphical penguin in the upper left corner of your screen!!! Don't get too frustrated if you do not see the graphic the first time. I've heard mixed stories about it and the first time I booted I did not see the picture although I knew I was in graphical mode (there IS that much of a difference). It wasn't until the second time I booted that the image appeared ;-)