Anyone who runs GNU/Linux is bound to need a console at some point. Sometimes it is just easier to switch over to a virtual console and do what you need to do. The default state of most consoles is an 80×30 character display which is basically useless if you want to see any kind of information.
The simple solution to this minimalist display is to set the vga kernel flag. This allows you to set the resolution on your console framebuffer to something more useful.
The default settings example shows vga=791. This puts your console in a 1024×768 resultion. Which while not great is a significate boost over the standard 800×600. If you simply enable this resolution, you will notice the Ubuntu usplash logo off center. Very annoying. The following steps are needed to make your Console Framebuffer something to look at.
1. Figure out what resolution your primary monitor supports. This is typically what you have your desktop resolution set to.
2. Determine what your vga kernel flag needs to be set to.
The Wikipedia article on VESA BIOS Extensions will probably answer your questions. Specifically, the section on Linux Video Modes.
For us widescreen users, we are not as lucky with our resolution choices. Though, through my expirimentation, I did find that vga=840 works to give me a 1400×1050@16bit on my Dell Inspiron 1505 with the NVidia 7300 Go. This is actually VESA 348 and does not follow the 512 rule stated in the Wiki article. My assumption about why is probably due to manufacturers implementation.
Note: Don’t worry too much about getting it wrong. One of two things will happen. 1. You will get no display or 2. you will get a grub screen telling you your video mode is unsupported. I will cover how to correct this in a moment.
3. Edit your menu.lst file and add the vga= option in two places. First, add it to the default options line. You are looking for this line.
# defoptions=quiet splash
Change it to:
# defoptions=quiet splash vga=840
Be sure to set the 840 to the mode that represents your preferences.
Next change the default Boot menu kernel entry at the bottom. In a standard Ubuntu build, the default entry will be the first entry following this line.
## ## End Default Options ##
It will look something like this:
title Ubuntu 8.10, kernel 2.6.27-9-generic
uuid 636dc411-e53a-4776-a9e9-4fc9e277f445
kernel /boot/vmlinuz-2.6.27-9-generic root=UUID=636dc411-e53a-4776-a9e9-4fc9e277f445 ro quiet splash
initrd /boot/initrd.img-2.6.27-9-generic
quiet
You need to add the vga=### to the end of the kernel line so it looks like this.
kernel /boot/vmlinuz-2.6.27-9-generic root=UUID=636dc411-e53a-4776-a9e9-4fc9e277f445 ro quiet splash vga=840
4. Next you need to update the usplash config to match the resolution. This is how you keep the logo centered.
sudo vi /etc/usplash.conf
Change the x and y resolution lines to match your chosen resolution.
# Usplash configuration file
xres=1400
yres=1050
5. Update your initramfs to take advantage of the usplash settings change.
sudo update-initramfs -u
6. Reboot.
You should see a smaller, higher resolution Ubuntu logo and then Gnome startup.
Upon reboot, if you get a blank screen, that means you chose a resolution that is larger than what your display can support. In this case, you will need to boot your Ubuntu CD and chose rescue mode. From there, chose a command prompt for the rescue CD. CD to /target/boot/gurb. then edit menu.lst with nano. Remove the vga=840 line from the kernel entry at the bottom.
If you are getting a grub menu saying you have set and invalid mode, press the space bar to see a list of valid modes. If you would like to get a complete list. Type in scan and press enter. This table is what I used to help determine the 840 setting for my display. Select the letter representing your choice and your machine will continue to boot.
The entries listed on the table are the only VESA modes your video card support. Find the entry that best matches your display preferences without exceeding the max resolution of your monitor. Take that number, add 512 to it and update the menu.lst file. If this results in the invalid mode error again, you will need to experiment to find the actual setting.
Note: The number following the resolution is the color depth or the number of bits being used to describe color. Unless you have a specific limitation, it is safe and preferable to chose the highest number following your chosen resolution. You will typically see 8,16, and 32.
My monitor supports 1650×1050 max resolution. The max resolution my video card supports is 1600×1200. Since the 1200 is greater than the 1050, if I chose this resolution, my monitor will not display and/or give me an error indicating that it is out of range. In my case, my next best choice was 1400×1050@16bit. The menu displayed this resolution as VESA 348. My next step was to convert the VESA mode to a linux VGA mode. Per the VESA BIOS Wiki I linker earlier, the standard is to add 512 to the VESA mode which would give me 860. I set vga=860 and rebooted. Same problem but it gave me an error stating 361 was not a valid mode. Since my goal was 348, I tried decreasing it by 12. I set vga=853 and rebooted. I got the grub error again, but it said that 355 was not a valid mode. Some simple math showed that I moved from 361 to 355 by subtracting 12 from the VGA mode, this time I need to move 7. I subtracted 13 this time which gave me the 840 and no grub errors on boot.
no comment untill now