Sunday, December 11, 2011

Force console resolution in Debian 6.0

This is a two-step process, and there is a pre-requisite: KMS (Kernel Mode Setting) has to be enabled. To enable it, refer to the Debian KMS Wiki.

Step 1


The first problem I faced was how to modify the kernel command line. I knew the parameter I wanted to add, but I didn't know how to add it. Theoretically, I knew this was done by modifying the GRUB2 configuration, but even after reading around in the GRUB2 documentation, this seemed daunting.

However, it was easy. All I needed to do was to edit the file "/etc/default/grub" and add the parameter to the following line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
So, in my case, after editing the line now reads:
GRUB_CMDLINE_LINUX_DEFAULT="video=1920x1200 quiet"
Then, run update-grub as root. Optionally, you can reboot now.

Step 2


If you rebooted after Step 1, you will notice that the kernel switches to the 1920x1200 resolution properly (assuming your hardware supports it), but doesn't change the console font. As a result, the font becomes ludicrously small.

Let's take care of that. The console-setup package is installed by default, I think, but check to make sure it's installed anyway, to be sure:
# apt-get install console-setup
Then, edit /etc/default/console-setup. Credit to the Changing Console Fonts In Debian Squeeze blog entry over at Tiger Computing for this. As they say, the file is well-documented. I changed FONTFACE to "Terminus" and FONTSIZE to "28x14".

Then reboot. If you already rebooted after step 1, then a invoke-rc.d console-setup restart, as root, will suffice.

No comments:

Post a Comment