You are not logged in.

#1 2022-10-06 22:49:40

arch-linx-enthusiast
Member
Registered: 2022-10-06
Posts: 3

How to change default virtual console font

According to https://wiki.archlinux.org/title/Linux_console#Fonts virtual console uses built in font cp437, i deleted all fonts from /usr/share/kbd except the one i want to use ter-d22b.psf.gz, rebooted system but noticed that still somehow when system boots it uses this cp font(because it is smaller).
Even though I set consolefont mkinitcpio hook as first hook (btw yes I did run sudo mkinitcpio -P and it was successfull). I was recording booting the system, becuse it is a VM and watch the boot in 0.1 speed to see that smaller font is loaded first.
If I want to change the defualt virtual console font does this mean that I have to recomplie kernel? Maybe i can set some kernel parameters in bootloader(I use grub2)

PS.
I found this article https://www.artembutusov.com/modify-linux-kernel-font/, but couldn't find /usr/src/linux/lib/fonts/ or anything similar
EDIT: I didn't explained it well. My problem is that I want the kernel to load custom font(only), not changed font on boot. The differenece is barely noticable but that's one less staff that processor does and it eliminates font flicker. Font flicker is when font changes from the default one to a different one, usually bigger.

Last edited by arch-linx-enthusiast (2022-11-07 20:29:20)

Offline

#2 2022-10-06 23:13:05

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,646

Re: How to change default virtual console font

Did you read the rest of that wiki section on console fonts? It shows how to use setfont and vconsole.conf to configure the console font.

Offline

#3 2022-10-06 23:17:47

arch-linx-enthusiast
Member
Registered: 2022-10-06
Posts: 3

Re: How to change default virtual console font

I've read all the way to the HiDPI. I have set all the stuff mentioned in 3 and 3.*. I guess I'll compile custom kernel based on https://wiki.archlinux.org/title/Kernel … ild_System. I will send the update here later and mark my post SOLVED if i succeed

Last edited by arch-linx-enthusiast (2022-10-06 23:27:02)

Offline

#4 2022-10-06 23:31:16

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,646

Re: How to change default virtual console font

You should not need to build a new kernel. I don't use the default console font, and I don't have a custom kernel.

What errors do you get from showconsolefont and setfont?

Offline

#5 2022-10-06 23:42:59

arch-linx-enthusiast
Member
Registered: 2022-10-06
Posts: 3

Re: How to change default virtual console font

I don't get any errors, the thing is when I boot VM, for a split of a second after grub I see text "Starting version 251.5-1-arch" in a default font, but then almost immidiately it changes to my font. I just don't want to see font changing when booting, even if i can barely see it with my bare eyes.

Last edited by arch-linx-enthusiast (2022-10-06 23:47:39)

Offline

#6 2022-10-19 13:00:50

terminalmage
Member
Registered: 2022-10-19
Posts: 3

Re: How to change default virtual console font

I had the same issue when I switched from using the LTS kernel to 6.0.1. I had been using the LTS kernel due to a bug. I booted into the LTS kernel again, the console font was set as expected, then rebooted and loaded 6.0.1 and again, the console font did not get set properly.

My fix for this was to manually rebuild the initrd for the 6.0.1 kernel using: sudo mkinitcpio -p linux

I honestly don't know why this worked, since the initrd is rebuilt on every kernel update, and I never uninstalled the linux package (both linux and linux-lts are installed). I did also experiment with the position of the consolefont hook in /etc/mkinitcpio.conf, but the console font was properly set even with me moving that hook back to its original position, rebuilding the initrd, and rebooting.

EDIT: It appears I was mistaken on this, it seems that when I thought the issue was fixed, I had accidentally loaded the LTS kernel. So it's broken for me on 6.0.x. I'll have to look more closely at the docs to see if anything has changed, since my vconsole.conf has not (and works to set console font on the LTS kernel).

Last edited by terminalmage (2022-10-20 11:58:41)

Offline

Board footer

Powered by FluxBB