How to set the resolution in text consoles (troubleshoot when any `vga=...` fails)
Newer kernels use KMS by default, so you should move away from appending vga=
to your grub line as it will conflict with the native resolution of KMS. However, it depends upon the video driver you are using: the proprietary Nvidia driver doesn't support KMS, but you can work around it.
You should be able to get full resolution in the framebuffer by editing your /etc/default/grub
and making sure that the GFXMODE
is set correctly, and then adding a GFXPAYLOAD
entry like so:
GRUB_GFXMODE=1680x1050x24
# Hack to force higher framebuffer resolution
GRUB_GFXPAYLOAD_LINUX=1680x1050
Remember to run sudo update-grub
afterwards.
For newer Debian & Ubuntu distros using nvidia, I had to do the following:
First, edit /etc/default/grub. Change the following line:
#GRUB_GFXMODE=640x480
to this:
GRUB_GFXMODE=1280x800
GRUB_GFXPAYLOAD_LINUX=keep
replacing 1280x800 with the desired resolution.
Then:
echo "echo FRAMEBUFFER=y" | sudo tee /etc/initramfs-tools/conf.d/splash
sudo update-initramfs -u
sudo update-grub
To simply change the font size, you can do so using the following command:
sudo dpkg-reconfigure console-setup
Here's your best option:
Use sudo hwinfo --framebuffer
as described, choose a video mode you would like to see during boot in console, then add the option vga=nnn
to the kernel boot parameters.
The only trick is that nnn
is the video mode you selected from the list produced by hwinfo
- CONVERTED TO DECIMAL !!!
If you try vga=0xwhatever
it's not going to work.
For instance I chose video mode 0x307 (1280x1024 (+1280), 8 bits), I converted 0x307 to decimal which is 775 and then I used vga=775
in the boot parameters of isolinux/extlinux.
You can use printf to convert hexadecimal to decimal:
$ printf "%d\n" 0x307
775
And I got a nice fine text in all consoles from the start.
Success!