After the installation of the proprietary NVidia graphics drivers on Ubuntu, Debian or Linux Mint your console screen resolution will be messed up. As a developer I use the frame buffer console from time to time and I need it at the resolution of my primary monitor (1680×1050). To address the problem (as it’s almost always with GNU/Linux) we need to edit some configuration files and issue some commands.
First start Konsole or other terminal emulator, login as root by typing:
su |
and enter your password when prompted.
Using vim, nano or your favourite command line text editor, open /etc/grub.d/00_header. In the example below we are using Vim.
vim /etc/grub.d/00_header |
Search for “set gfxmode=${GRUB_GFXMODE}” and below that line add
set gfxpayload=keep |
Save and close the file.
Reboot your system and at the Grub2 screen press ‘C’ and type ‘vbeinfo‘. Take a note on the supported frame buffer resolution and choose the one you like. In my case the chosen resolution was 1680x1050x32. Type ‘exit‘ or reboot your system from the restart button.
Start GNU/Linux again, start a terminal emulator, login as root (by typing su) and open “/etc/default/grub“. Uncomment the line “GRUB_GFXMODE=640×480“, change the value after the = sign to the previously chosen screen resolution. In my case:
GRUB_GFXMODE=1680x1050x32 |
and add the following line below:
GRUB_GFXPAYLOAD_LINUX=keep |
Save and close the file.
Still logged as ‘root’ execute the following commands:
update-grub2 |
update-initramfs -u |
Reboot your system. You should now have a frame buffer console with a decent screen resolution.