You are not logged in.

#1 2025-12-29 10:36:56

Everything2067
Member
Registered: 2025-06-29
Posts: 37

KMS keeps changing the console font to VGA

I have set the default font as terminus in vconsole.conf (ter-c20n). Before, it used to switch back to VGA in the initrd stage, and switch to the terminus font in late userspace. Later on, I found out that it was the KMS hook that was causing this. By removing the KMS hook, the terminus font is now loaded in initrd, but switches back to VGA when systemd-vconsole-setup starts (which in turn starts KMS, which changes the font, I guess).

I also tried by starting KMS as early as possible in the initrd, placing it between modconf and keyboard (https://wiki.archlinux.org/title/Kernel … _KMS_start), but it still loads the VGA font in initrd, and loads terminus in late userspace.

By disabling KMS completely, the terminus font is loaded both in initrd and late userspace. But it is not an option since the desktop experience becomes a lot laggy.

What should I do such that the terminus font is loaded both in initrd and late userspace?

/etc/mkinitcpio.conf (hooks)

HOOKS=(base systemd autodetect microcode modconf keyboard keymap sd-vconsole archlogo sd-encrypt block filesystems resume fsck)

I have removed the KMS hook for now.

Kernel parameters

loglevel=3 rd.luks.name=e14b886f-3bcd-45da-b65d-9a30d02d7a25=root rd.luks.name=3eec0d64-c205-4956-ba72-5a6d43b8ac80=swap root=/dev/mapper/root resume=/dev/mapper/swap

I am using intel integrated graphics (iris xe) and I have nothing else.

I have confirmed that the "archlogo" hook does not cause this. All it does is cat a file.

Offline

#2 2025-12-29 13:09:03

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,623

Re: KMS keeps changing the console font to VGA

KMS doesn't change fonts but it can change resolutions.

And the kernel bases its choice of console font on the available resolution .

Note that the KMS hook doesn't enable/disable Kernel Mode Setting, it just ensures the switch to kernel mode setting is done earlier .

Read https://wiki.archlinux.org/title/Linux_console#Fonts


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2025-12-31 07:14:30

Everything2067
Member
Registered: 2025-06-29
Posts: 37

Re: KMS keeps changing the console font to VGA

Thank you for your reply.
No, I disabled KMS by adding the kernel parameters: nomodesetting and i915.modesetting=0.
Also, I also tried adding the consolefont hook, but it also did not work.

wiki wrote:

If the fonts appear to not change on boot, or change only temporarily, it is most likely that they got reset when graphics driver was initialized and console was switched to framebuffer. By default, all in-tree kernel drivers are loaded early, NVIDIA users should see NVIDIA#Early loading to load their graphics driver before /etc/vconsole.conf is applied.

I have intel graphics, do I need to do anything else? I could not find anything in "Intel Graphics" wiki page.

Offline

#4 2025-12-31 11:24:32

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,057

Re: KMS keeps changing the console font to VGA

the kernel parameters: nomodesetting and i915.modesetting=0

Neither being a valid kernel parameter (nomodeset and i915.modeset=0 would be and also a dumb idea)

Stop this and post a video of the situation and post it along your system journal

sudo journalctl -b | curl -F 'file=@-' 0x0.st

and the output of

fbset -i

and a description of your monitor geometry (edid-decode, xrandr - but "it's a 24" monitor" would actually be enough) so we're all on one page about what's going on there.

Offline

#5 2026-01-09 09:37:19

Everything2067
Member
Registered: 2025-06-29
Posts: 37

Re: KMS keeps changing the console font to VGA

Sorry, I meant nomodeset and i915.modeset=0 (I was writing from memory)

Journal (without kms hook): http://0x0.st/P-Vk.txt
Journal (with kms hook): http://0x0.st/P-Vx.txt
Journal (kms disabled): http://0x0.st/P-V5.txt

fbset -i output:

mode "1920x1080"
    geometry 1920 1080 1920 1080 32
    timings 0 0 0 0 0 0 0
    rgba 8/16,8/8,8/0,0/0
endmode

Frame buffer device information:
    Name        : i915drmfb
    Address     : (nil)
    Size        : 8294400
    Type        : PACKED PIXELS
    Visual      : TRUECOLOR
    XPanStep    : 1
    YPanStep    : 1
    YWrapStep   : 0
    LineLength  : 7680
    Accelerator : No

edid-decode output:

edid-decode (hex):

00 ff ff ff ff ff ff 00 22 0e 35 40 01 00 00 00
01 1d 01 03 81 3c 22 78 ea 64 b5 ab 52 38 ab 25
13 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 02 3a 80 18 71 38 2d 40 2c 2c
45 00 56 50 21 00 00 1c 00 00 00 10 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 fc 00 48
50 20 41 4c 4c 2d 69 6e 2d 4f 6e 65 00 00 00 ff
00 4d 32 37 30 48 43 4a 2d 4c 35 42 0a 20 00 ea

----------------

Block 0, Base EDID:
  EDID Structure Version & Revision: 1.3
  Vendor & Product Identification:
    Manufacturer: HPN
    Model: 16437
    Serial Number: 1 (0x00000001)
    Made in: week 1 of 2019
  Basic Display Parameters & Features:
    Digital display
    DFP 1.x compatible TMDS
    Maximum image size: 60 cm x 34 cm
    Gamma: 2.20
    DPMS levels: Standby Suspend Off
    RGB color display
    First detailed timing is the preferred timing
  Color Characteristics:
    Red  : 0.6689, 0.3222
    Green: 0.2197, 0.6679
    Blue : 0.1464, 0.0771
    White: 0.3134, 0.3291
  Established Timings I & II: none
  Standard Timings: none
  Detailed Timing Descriptors:
    DTD 1:  1920x1080   60.000000 Hz  16:9     67.500 kHz    148.500000 MHz (598 mm x 336 mm)
                 Hfront   44 Hsync  44 Hback  192 Hpol N
                 Vfront    4 Vsync   5 Vback   36 Vpol P
    Dummy Descriptor:
    Display Product Name: 'HP ALL-in-One'
    Display Product Serial Number: 'M270HCJ-L5B'
Checksum: 0xea

xrandr output:

Screen 0: minimum 16 x 16, current 1920 x 1080, maximum 32767 x 32767
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 598mm x 336mm
   1920x1080     59.96*+
   1440x1080     59.99  
   1400x1050     59.98  
   1280x1024     59.89  
   1280x960      59.94  
   1152x864      59.96  
   1024x768      59.92  
   800x600       59.86  
   640x480       59.38  
   320x240       59.29  
   1680x1050     59.95  
   1440x900      59.89  
   1280x800      59.81  
   1152x720      59.97  
   960x600       59.63  
   928x580       59.88  
   800x500       59.50  
   768x480       59.90  
   720x480       59.71  
   640x400       59.95  
   320x200       58.14  
   1600x900      59.95  
   1368x768      59.88  
   1280x720      59.86  
   1024x576      59.90  
   864x486       59.92  
   720x400       59.27  
   640x350       59.28

Video (without kms hook): http://0x0.st/P-Sn.webm
Video (with kms hook) (exact opposite of above): http://0x0.st/P-V6.webm
Video (disabled kms) (works perfectly as intended, but desktop experience is not good): http://0x0.st/P-WH.webm

Offline

#6 2026-01-09 13:52:19

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,057

Re: KMS keeps changing the console font to VGA

So it's a FullHD output at ~80DPI
All videos show a very early resolution change (maybe handover from efifb) and the desired http://0x0.st/P-WH.webm seems to use terminus all the way
http://0x0.st/P-Sn.webm starts out w/ terminus in the initramfs but later on switches to 8x16

This is a legitimate font switch and I don't think it's (strictly) because of kms.
For the system w/ kms, please post your vconsole.conf (the entire file) and

lsinitcpio /boot/initramfs-linux.img | grep font

Offline

#7 2026-01-09 18:28:26

Everything2067
Member
Registered: 2025-06-29
Posts: 37

Re: KMS keeps changing the console font to VGA

vconsole.conf as it is

# This is the fallback vconsole configuration provided by systemd.
w
#KEYMAP=us
FONT=ter-c20n

lsinitcpio

consolefont.psf
hooks/consolefont
usr/bin/loadfont
usr/bin/setfont
usr/share/kbd/consolefonts/
usr/share/kbd/consolefonts/ter-c20n.ps

In the video with kms hook, you can see that the font changes for a very short time (at 00:03-00:04).
Also one thing that I forgot to mention is that this is not a dedicated monitor. It is built into the computer.

Offline

#8 2026-01-09 21:03:07

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,057

Re: KMS keeps changing the console font to VGA

usr/share/kbd/consolefonts/ter-c20n.ps

Is that correct or copypasta?
The original file would be usr/share/kbd/consolefonts/ter-c20n.psf.gz - mayby got decompressed to usr/share/kbd/consolefonts/ter-c20n.psf but ter-c20n.ps seems wrong.
If it's not copypasta, try to add /usr/share/kbd/consolefonts/ter-c20n.psf.gz to the FILES=() array.

Offline

#9 2026-01-10 02:45:13

Everything2067
Member
Registered: 2025-06-29
Posts: 37

Re: KMS keeps changing the console font to VGA

seth wrote:

usr/share/kbd/consolefonts/ter-c20n.ps

Is that correct or copypasta?
The original file would be usr/share/kbd/consolefonts/ter-c20n.psf.gz - mayby got decompressed to usr/share/kbd/consolefonts/ter-c20n.psf but ter-c20n.ps seems wrong.
If it's not copypasta, try to add /usr/share/kbd/consolefonts/ter-c20n.psf.gz to the FILES=() array.

Just so you know, I am using the terminus font with the tilde patch (should be terminus-font-td1 in the AUR). It should not make a difference, but I will try using the original one and do what you told me once I get home.
Yes, I copied it from the terminal if that's what you mean. Probably missed a character while copying it. I will also try running lsinitcpio again.

Offline

#10 2026-01-10 13:11:01

Everything2067
Member
Registered: 2025-06-29
Posts: 37

Re: KMS keeps changing the console font to VGA

Complete lsinitcpio

consolefont.psf
hooks/consolefont
usr/bin/loadfont
usr/bin/setfont
usr/share/kbd/consolefonts/
usr/share/kbd/consolefonts/ter-c20n.psf

Also, I tried adding the file as you requested, but same effect.
Also tried using the unaltered font in the official repositories (terminus-font) but same effect again.

Offline

#11 2026-01-11 20:37:52

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,057

Re: KMS keeps changing the console font to VGA

If you only boot the multi-user.target (w/ or w/o early KMS but *not* using nomodeset)
1. do you end up w/ 8x16 or terminus and
2. can you "setfont ter-c20n" there or do you get an error?

Offline

#12 Yesterday 17:18:56

Everything2067
Member
Registered: 2025-06-29
Posts: 37

Re: KMS keeps changing the console font to VGA

1. No change.
2. Tried with verbose (the font changes successfully):

setfont: INFO setfont.c:162 try_loadfont: Loading 256-char 10x20 font from file /usr/share/kbd/consolefonts/ter-c20n.psf.gz
setfont: INFO setfont.c:259 do_loadtable: Loading Unicode mapping table...

Offline

Board footer

Powered by FluxBB