Monday, 7 September 2009

VGA Screen on Boot

When booting a PC before you get to the spanky graphical interface it defaults to a crummy text based interface with 80 columns, each with 25 rows. Or is it 80 rows of 25 columns?

Anyway.

It looks crap. Most operating systems try to hide this from you, whether it be with a Windows 98 graphic, an XP flag, Vista's minimalist approach, or Ubuntu's orange Knight Rider-esque effort. Behind the fancy graphics, and the desperate cylon impression, a whole lot is going on. Messages whirr past as various parts of the PC spring into life - hard disk here, clock there, now a network connection, there a keymap configuration. Some mature operating systems let you see what is going on, presumably on the basis that if you are experienced enough to be using them, you won't soil yourself when you see some system messages in text.

The down side to this is that the messages REALLY whirr past when you only have 25 rows available to display them. The solution is to choose another screen format to use on boot. I first saw this approach on Mac OSX, and I thought it looked really good. So - how to get this with Linux?

It turns out that it is really easy - you just add
vga=xxx
to the end of your kernel line (where xxx is a three digit number). You can do this by either editing your /boot/grub/menu.lst file or by opting to choose a kernel on boot, pressing 'e' to edit the kernel and adding that text at the end.

I did this.

It did not work.

I got a message to the effect that the mode I sought could not be found. Or something equally fucking useless in terms of diagnostics. If you have clicked through to the link above you will see how many mode numbers there are. I tried them. None of them fucking worked. I tried using hex numbers instead - by prefixing the hex translation with '0x' (so 0x317 is 773). It didn't fucking work. Every search I tried on this offered up the helpful advice of "try adding vga=xxx to the end of your kernel line by ...". Fucking great.

It was after several hours of frustration that I hit on a brilliant idea. You see, I also have a 30" LCD TV connected by VGA to another PC. The TV can do 1280x768, and thus is technically HDTV ready. However, I bought it before the whole HDTV thing kicked off, so it doesn't claim to be HDTV ready, and it doesn't have an HDMI port. Monitors tell the PC what resolutions they support by way of the EDID system. Using XP originally, it was only detected as a 1024x768 monitor, but the Nvidia drivers for XP allow you to over-ride the detected resolutions. So I could happily use it as a 1280x768.

In due course I upgraded the machine to Vista, mainly to benefit from the more mature Media Center software. Again the monitor defaulted to 1024x768. No problem, thought I, just tell the nvidia driver to over-ride this back to 1280x768. Clicky-clicky. Hmm, can't seem to find the option for this. Googly-googly. Vista will NOT let drivers over-ride the settings from the monitor. Oh for fucks sake. I am not 12. At this point I descended into a hell of Powerstrip settings, EDID bios reprogramming, and (worst of all) INCORRECT FUCKING ASPECT RATIOS. All of this just because some incompetent half-wit can't program a fucking bios chip with the correctly supported screen resolutions. How hard can it be? 1024x768, 1280x768 - there you go I managed it fine!

On the third day I rose, clutching a pair of pliers, a DVI pin out diagram, and a VGA-DVI adaptor. Once I had ripped out the pins that communicated the WRONG information about the TV to the PC, Vista would let me set the resolution to whatever the hell I liked. Fantastic.

So, back to our story. I thought to myself, could the monitor be lying its arse off to the bios? I mean, sure it works fine once you have booted a gui, but maybe Captain Hamfisted Knobcheese III, EDID bios programmer extraordinaire is back on the scene. I found somewhere the boot option:
edd=off
This stops the monitor bullshitting the PC about what it can and cannot do. Tried it. It works. Genius. So if you continue to have problems after using vga=xxx, then you need to add this to get your funky VGA graphics on boot:
edd=off vga=xxx

No comments:

Post a Comment