Score:0

Small font size

th flag
as5

Grub menu is very small, and the same is when I open a terminal with ctl+alt+f3 (how do you call it btw.?). Almost impossible to read.

I have dell precision 3561 laptop ubuntu 21.10 (dual boot with win10) Display: 15,6" IPS (3840 x 2160) Graphik: NVIDIA T600, 4GB nvidia-driver-510

I think I saw somewhere in the documentation of the Ubuntu how to fix this issue, but could not find it again.

FedKad avatar
cn flag
Did you try `gnome-tweaks` → **Fonts**?
as5 avatar
th flag
as5
I see only the options to change font size for gnome, but I need for grub and VT.
heynnema avatar
ru flag
Please see my answer. If it's helpful, please remember to accept it by clicking on the checkmark icon that appears just to the left of my answer. Thanks!
heynnema avatar
ru flag
Status please...
Score:1
ru flag

The fonts are tiny because of your 3840 x 2160 display characteristics.

Try this...

Edit /etc/default/grub:

sudo -H gedit /etc/default/grub

Find the line that looks like:

#GRUB_GFXMODE=640x480

And change it to:

GRUB_GFXMODE=640x480

Note: Change the size at the risk of GRUB not working correctly. It must be a size that your video card and video display supports.

sudo update-grub

reboot

as5 avatar
th flag
as5
It sounds reasonable, but before I try this, what you mean "GRUB not working correctly" and what cannot I do then.
heynnema avatar
ru flag
@as5 If you pick an invalid resolution size, GRUB won't display properly, and you'd have to do some minor gymnastics to rectify it.
as5 avatar
th flag
as5
So this approach solved my problem partly: GRUB menu and GRUB prompt are indeed responding to this change. However, the tty console stays same. Maybe I'll try the suggestion with fonts by @WU-TANG below but I'd rather say it seems to be the resolution issue as well. So any ideas on this?
as5 avatar
th flag
as5
Also I'd recommend first find out which resolutions are available as stated here: https://itectec.com/ubuntu/ubuntu-how-to-safely-change-grub2-screen-resolution/ (I recommend to make a photo of this). In my case it was 1024x768 that was good enough for me.
as5 avatar
th flag
as5
I tried to add `GRUB_GFXPAYLOAD_LINUX=1024x768 ` as desribed here: https://help.ubuntu.com/community/ChangeTTYResolution with no effect on tty3
heynnema avatar
ru flag
@as5 No more ideas. Sorry. You can certainly try WU-TANG's answer.
Score:0
cn flag

You have two distinct questions here.

To change the font-size of the console:

It seemed like there may be more involved, the more I researched it, but all it took for me to increase the size was to edit /etc/default/console-setup.

changing or adding the line:

FONTSIZE="8x16"

to

FONTSIZE="16x32"

and then sudo update-grub

and then rebooting.
(consult the man page man console-setup for acceptable options)

You can also use sudo dpkg-reconfigure console-setup to configure the console font.


You can change the font size of the grub menu with grub-mkfont

Quick Guide: if you know where the font location is.

sudo grub-mkfont --output=/boot/grub/fonts/Myunifont32.pf2 --size=32 /home/username/Downloads/unifont-14.0.01.ttf

Then edit /etc/update/grub adding:

GRUB_FONT=/boot/grub/fonts/Myunifont32.pf2

sudo update-grub

Then reboot and your changes should be present.

Background info/long instructions:

You will probably need to know where the fonts are stored so you can reference them.

Use fc-list for that.

If you have a font in mind, then grep for that font name in the output. Note: Using a custom font will take some trial and error to get a "pretty" grub screen like you are used to. A lot of the fonts will work and be readable, but the symbols used to create the appearance of "graphics" may not line up or be what you are used to.

Running strings -a /boot/grub/fonts/unicode.pf2 shows "Unifont Regular 16". I have had no luck finding Unifont on my machine so I found it in the repository and sudo apt install unifont. This will make it show up in the fc-list output.

Once you've decided on which font you want to use: (for example, for unifont)

fc-list | grep -i unifont
/usr/share/fonts/truetype/unifont/unifont.ttf Unifont:style=Medium
/usr/share/fonts/truetype/unifont/unifont_upper.ttf Unifont Upper:style=Medium
/usr/share/fonts/truetype/unifont/unifont_csur.ttf: Unifont CSUR:style=Medium

Or if you downloaded it: It would be in whatever folder you downloaded it to: (I also found it here)
/home/username/Downloads/unifont-14.0.01.ttf

Now you know where your font is located, you can use it to create one for grub and size it:

(The output [should] goes into the /boot/grub/fonts directory with your own customized filename, so you will need sudo)

sudo grub-mkfont --output=/boot/grub/fonts/Myunifont32.pf2 --size=32 /usr/share/fonts/truetype/unifont/unifont.ttf

Now you will need to reference your new font in the file /etc/default/grub.

Edit that file (as sudo) by whichever means you use (ie sudo vim /etc/default/grub)

and add the line:

GRUB_FONT=/boot/grub/fonts/Myunifont32.pf2

Save the file and exit.

Then run sudo update-grub

...and then reboot and you should see your font change...

Depending on which font you decided to go with, you may have to do the process over again and over again to make adjustments. (it takes a few seconds once you get a rhythm). I tried to shortcut the process by making a common name "MYFONT" in /etc/default/grub and in /boot/grub/fonts just making a link from MYFONT to the actual font. That way I could just create 10 of them to test all at one time and then change the link each time I wanted to test a new one, without having to sudo update-grub... THAT DID NOT WORK, even with the link pointing to a new file, I had to sudo update-grub to see my changes... so something to keep in mind.

The unifont.ttf seems to be the closest and it looks fine, but right off the bat in the fc-list output you can see "Medium" vs the "Regular" in the unicode.pf2 strings output... That tells me they are not exactly the same. I figure the original font has to be SOMEWHERE in there but I cannot find it. If you stumble across it, post it here. I have looked on a bunch of sites and it seems no one else has been able to identify it either.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.