Running a Linux server console on modern TFT screens which have a large display resolution can be painful as the text will be blurred. The reason is that the TFT tries to re sample the low resolution that the console normally uses (640×480; 800×600) to its internal resolution. The following steps describe how to change the console resolution and the font / size.
- Open /etc/default/grub with your favorite editor as root. Eg:
sudo nano /etc/default/grub
- Find and change / Add the lines (replacing 1280×960 with your desired resolution, for TFTs the native resolution is best):
GRUB_GFXMODE=1280x960x32 GRUB_GFXPAYLOAD=1280x960x32
- Now, save the file. If using NANO press [Ctrl]+[O] followed by [RETURN] to save the file and and [Ctrl]+[X] to exit NANO.
- Update the GRUB2 Settings:
sudo update-grub2
- Now reboot (optional but required to make the changes take effect).
- But be careful: If you set a very high resolution it might happen that you are unable to read anything on the screen after the reboot because things are tiny. You can prevent that by rebooting after the font/size change or you increase the resolution in steps.
sudo reboot
The resolution should now be set.
You can change the console font and font size by using the following command:
dpkg-reconfigure console-setup
The change does not come effective automatically. You have to execute the command „setupcon“ after login. You can add it to your .bashrc (autostart) file if you like.
nano ~/.bashrc
- Insert a new line (at the end):
setupcon
- Save the file. If using NANO press [Ctrl]+[O] followed by [RETURN] to save the file and and [Ctrl]+[X] to exit NANO.
- Now reboot (optional).
sudo reboot