You are not logged in.

#1 2017-05-04 00:48:31

tnek
Member
Registered: 2008-06-10
Posts: 40

Unable to change console font in early user space

My Asus Zenbook has 4K resolution and the normal virtual console font becomes too small for me to read conveniently.

Instead I want to use iso02-12x22 ( /usr/share/kbd/consolefonts/iso02-12x22.psfu.gz ) in my virtual console as well as in early user space (initramfs). But I am only able to use it from the login prompt and forward. I haven't been able to get it working in early user space.

What I have done and tried

I set the console font iso02-12x22 to be used:

[root@archzenbook]# cat /etc/vconsole.conf
FONT=iso02-12x22

The above works and I see the font from the login prompt.

But I wanted it in early userspace as well, as the systemd output is too small to read easily and as I use disk encryption it's nice to have the password prompt seen more clearly too. I added consolefont to HOOKS:

[root@archzenbook]# egrep -v "^#|^ *$" /etc/mkinitcpio.conf # all non empty, uncommented lines
MODULES=""
BINARIES=""
FILES=""
HOOKS="base udev autodetect modconf block consolefont systemd keyboard sd-encrypt filesystems fsck"

I have also tried having consolefont first, last and immediately before keyboard without any success.

And when I generated my initramfs the hook seemed to work as it should:

[root@archzenbook]# mkinitcpio -p linux
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 4.10.13-1-ARCH
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [consolefont]
  -> Running build hook: [systemd]
  -> Running build hook: [keyboard]
  -> Running build hook: [sd-encrypt]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: 4.10.13-1-ARCH
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: aic94xx
==> WARNING: Possibly missing firmware for module: wd719x
  -> Running build hook: [consolefont]
  -> Running build hook: [systemd]
  -> Running build hook: [keyboard]
  -> Running build hook: [sd-encrypt]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux-fallback.img
==> Image generation successful

I have verified that the font specified in /etc/vconsole.conf is indeed copied to the initramfs image:

[root@archzenbook]# mkdir /tmp/img
[root@archzenbook]# cd /tmp/img/
[root@archzenbook]# lsinitcpio -x /boot/initramfs-linux.img
[root@archzenbook]# cp /usr/share/kbd/consolefonts/iso02-12x22.psfu.gz .
[root@archzenbook]# gunzip iso02-12x22.psfu.gz
[root@archzenbook]# diff -s consolefont.psfu iso02-12x22.psfu
Files consolefont.psfu and iso02-12x22.psfu are identical

Any ideas on how to debug or fix this?

Last edited by tnek (2017-05-04 00:50:23)

Offline

#2 2017-05-04 00:57:07

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Unable to change console font in early user space

Enable early KMS start.

Are you using grub?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-05-04 01:47:57

tnek
Member
Registered: 2008-06-10
Posts: 40

Re: Unable to change console font in early user space

jasonwryan wrote:

Enable early KMS start.

Are you using grub?

I use systemd-boot, EFI and the computer has an integrated intel graphics card:

[root@archzenbook]# lspci -v
...
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5300 (rev 08) (prog-if 00 [VGA controller])
        Subsystem: ASUSTeK Computer Inc. Device 181d
        Flags: bus master, fast devsel, latency 0, IRQ 44
        Memory at f6000000 (64-bit, non-prefetchable) [size=16M]
        Memory at e0000000 (64-bit, prefetchable) [size=256M]
        I/O ports at f000 [size=64]
        [virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
        Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
        Capabilities: [d0] Power Management version 2
        Capabilities: [a4] PCI Advanced Features
        Kernel driver in use: i915
        Kernel modules: i915
...

I read about Early KMS start and tried to activate it by added to MODULES (which was empty before):

[root@archzenbook]# egrep -v "^#|^ *$" /etc/mkinitcpio.conf # all non empty, uncommented lines
MODULES="intel_agp i915"
BINARIES=""
FILES=""
HOOKS="base udev autodetect modconf block consolefont systemd keyboard sd-encrypt filesystems fsck"

I tried both with "intel_agp i915" and only with "i915" in MODULES and got the same behavior:

At boot I see some systemd output, then the screen goes black for maybe 1/3 of a second, and then I see the output again. It's using the default console font both before and after going black, but somewhere along the output (it goes by fast) after giving the disk encryption password but before I see the login prompt, the correct console font is set. So it's an improvement of maybe 200ms.

I tried moving consolefont to be immediately after base in hooks but that didn't improve anything any further:

[root@archzenbook]# egrep -v "^#|^ *$" /etc/mkinitcpio.conf # all non empty, uncommented lines
MODULES="i915"
BINARIES=""
FILES=""
HOOKS="base consolefont udev autodetect modconf block systemd keyboard sd-encrypt filesystems fsck"

Offline

#4 2020-02-13 13:53:27

markand
Member
Registered: 2015-04-09
Posts: 28

Re: Unable to change console font in early user space

I'm interested in this as well so a friendly up.

As my thinkpad has high dpi display, the font in early initramfs is barely readable when asking the passphrase.

Offline

#5 2020-02-13 14:00:03

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,754

Re: Unable to change console font in early user space

It's close to three years old, please don't necro-bump, open a new thread with your own experiences and your own configuration.

Closing.

Offline

Board footer

Powered by FluxBB