Correcting Screen Resolution on Minimal 9.4

New to Rocky Linux, long time CentOS 7 user, however I’m not super well versed in Linux as a whole - I have very application specific knowledge. I didn’t see a solution to this topic before posting.

Need help changing display resolution for a minimal Rocky 9.4 install.

Have already tried editing the Grub file as we did with CentOS 7:
GRUB_CMDLINE_LINUX_DEFAULT=“video=640x480”
GRUB_GFXMODE=640x480
GRUB_GFXPAYLOAD_LINUX=keep

Then used this command to make the changes effective:
grub2-mkconfig -o /boot/grub2/grub.cfg

This worked to change the screen sizing/resolution on minimal installs of CentOS 7.

However, this appears to only correct the display during the initial boot up and grub menu for Rocky. As Rocky continues to boot, it switches to a much higher resolution after the grub menu - mid boot. This effectively “shrinks” our application software to about 1/6th of the screen.

Extra info about the install and requirements:

  • We use a virtual machine of Rocket D3 which is a multivalue database product designed to run on both CentOS and Rocky Linux.
  • The end user never “uses” the Linux desktop or applications; we create a Linux login that auto-starts our application software inside of the D3 database.
  • We rarely need access to the “main console” of the server; however, it is necessary for certain functions of our database management system.
  • All of the other PCs on the network use Accuterm (a terminal emulator) to access the server and D3 database applications. Accuterm has automated screen sizing, so it becomes a non-issue for most of the network.
  • We use a minimal install for simplicity, security, and to keep the end user from “playing” with the Linux server settings.
  • Basic setup: UEFI install, HDMI port for video, on board graphics from a 12th gen i5, Asus MoBo.

Any info would be helpful.

I use this on the kernel command line:

GRUB_CMDLINE_LINUX="vconsole.font=ter-v32n"

You will have to install the terminus fonts.

Since Redhat and derivatives use BLS you need to update grub thus:

grub2-mkconfig -o /boot/grub2/grub.cfg --update-bls-cmdline

To update your kernel parameters in the /boot/loader/entries/<machineid><kernel-version>
files. This may be why your initial kernel parameter did not persist as it did not get added to the option line in these files.

I should probably know this, but how do you install the terminus fonts? What are the steps required? I’ve never needed to install a font before.

I’m assuming that is not a simple yum update.

You could try something like

dnf --enablerepo "epel" install terminus-fonts

I get:

Error: Unknown repo: ‘epel’

So I did:

yum update && yum install epel-release

Then the dnf command worked:

dnf --enablerepo “epel” install terminus-fonts

However, I still have the same problem after adding the font and command to grub.

Did you check the current kernel entry in /boot/loader/entries to see if the “options” contains the font parameter?

options root=UUID=9a7a5a59-d7d7-43bd-9f85-e6003cbd1d35 ro vconsole.font=ter-v32n

There is also the file /etc/vconsole.conf that can be used to modify fonts. I have not edited this file myself, it currently has the default settings. You can read the man page “vconsole.conf” see if manipulating fonts there can get you a larger text.

2 Likes

Editing the /etc/vconsole.conf file appears to be the solution. That’s the first thing that appears to make a difference. Now my only problem is finding a font that is big enough to fill the whole screen that still looks decent with our application.

I used “ls /usr/lib/kbd/consolefonts/” in order to find the list of available fonts on the system.

Then added the font I wanted to use inside of the “/etc/vconsole.conf” file.

Also, using the “setfont” command helped pick from the fonts temporarily.

This link helped explain:
How to set font and change font size on Linux Console (computernetworkingnotes.com)

Glad you found a solution. I’ve used setfont in the past to do as you did but I couldn’t remember for what or what distro.