You are not logged in.

#1 2019-09-11 13:28:56

taurux
Member
From: Italy
Registered: 2019-09-11
Posts: 4

Can't set console font on startup

Hi,
Yesterday I have switched to a systems-based initramfs because I installed plymouth and it core dumped at boot with a busybox initramfs (base, udev, consolefont hooks)
I'm having a problem with the automatic setting of the console font at boot. My /etc/vconsole.conf is

KEYMAP=us
FONT=ter-132n

The keymap is set correctly, but it might happen because US is the default layout for linux consoles.
My /etc/mkinitcpio.conf is: (comments stripped)

MODULES=(i915)
BINARIES=(setfont)
FILES=()
HOOKS=(base systemd sd-plymouth autodetect modconf block filesystems keyboard sd-vconsole fsck)

I have included the setfont binary because I've read on another topic on this forum that the problem might be the busybox-provided setfont but it hasn't solved anything...
I also modified my /usr/lib/systemd/system/systemd-vconsole-setup.service according to this post: https://systemd-devel.freedesktop.narki … or-code-71 and I've tried to create a copy of systemd-vconsole-setup.service (my-systemd-vconsole-setup.service) that is installed in multi-user.target with

After=sysinit.target

but it didn't work.
Output of journalctl -b | grep vconsole:

Sep 11 15:12:14 taurorevenge systemd-vconsole-setup[360]: KD_FONT_OP_GET failed while trying to get the font metadata: Invalid argument
Sep 11 15:12:14 taurorevenge systemd-vconsole-setup[360]: Fonts will not be copied to remaining consoles
Sep 11 15:12:17 taurorevenge systemd-vconsole-setup[526]: KD_FONT_OP_GET failed while trying to get the font metadata: Invalid argument
Sep 11 15:12:17 taurorevenge systemd-vconsole-setup[526]: Fonts will not be copied to remaining consoles
Sep 11 15:12:17 taurorevenge systemd[1]: systemd-vconsole-setup.service: Succeeded.
Sep 11 15:12:17 taurorevenge audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-vconsole-setup comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Sep 11 15:12:17 taurorevenge audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-vconsole-setup comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Sep 11 15:12:17 taurorevenge systemd-vconsole-setup[542]: KD_FONT_OP_GET failed while trying to get the font metadata: Invalid argument
Sep 11 15:12:17 taurorevenge systemd-vconsole-setup[542]: Fonts will not be copied to remaining consoles
Sep 11 15:12:17 taurorevenge systemd[1]: my-systemd-vconsole-setup.service: Succeeded.
Sep 11 15:12:17 taurorevenge audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=my-systemd-vconsole-setup comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Sep 11 15:12:17 taurorevenge audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=my-systemd-vconsole-setup comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Sep 11 15:12:29 taurorevenge systemd-vconsole-setup[672]: /usr/bin/setfont failed with exit status 71.
Sep 11 15:12:29 taurorevenge systemd-vconsole-setup[672]: Setting fonts failed with a "system error", ignoring.

I don't understand why systemd starts the service multiple times (PIDs 360 and 526 in the first four rows) and setfont fails with different error messages at 15:12:14 and 15:12:29.
If I manually restart the unit systemd-vconsole-setup using the console it works and the console font is set correctly.
I apologize for any mistakes in the usage of the forum - I've successfully used Arch for more than a year (I previously used ubuntu) but this is the first time that I've written to the forum.

Thanks a lot

Last edited by taurux (2019-09-11 13:32:19)

Offline

#2 2019-09-11 15:02:49

seth
Member
Registered: 2012-09-03
Posts: 50,981

Re: Can't set console font on startup

systemctl status systemd-vconsole-setup

I can't set the font on a VGA console (also cybercafe ftw you losers!!! ;-) so aside the actually apparent missing (?) "consolefont" hook (leading to the font being absent from the initramfs?) the problem might be that this is triggered before KMS applies.

Offline

#3 2019-09-11 17:24:09

taurux
Member
From: Italy
Registered: 2019-09-11
Posts: 4

Re: Can't set console font on startup

Hi Seth, I followed the instructions given in the KMS Page on Arch Wiki and I inserted i915 in the Modules list of mkinitcpio. How can I delay the setup of the console? And my copy of systemd-vconsole-setup should be triggered after sysinit.target, so after KMS has been set up, right?
About the mkinitcpio hooks, on the "Linux Console" and mkinitcpio pages I have read that with a systemd-based initrd consolefont should be replaced with sd-vconsole; however I have also tried to keep consolefont instead of sd-vconsole and it still doesn't work :-(. In both cases, I can confirm that the appropriate console font (terminus-132n) is included in the initrd (I ungzipped and uncpio'd it) so I don't think that's the problem. Thank you

Offline

#4 2019-09-11 20:09:50

seth
Member
Registered: 2012-09-03
Posts: 50,981

Re: Can't set console font on startup

I guess we should first check whether the specific font (and maybe the console configuration at the time) is the cause => try whether another font works w/ your current process (try cybercafe ;-)

Offline

#5 2019-09-12 18:14:19

taurux
Member
From: Italy
Registered: 2019-09-11
Posts: 4

Re: Can't set console font on startup

Hi seth,
thanks for your reply.
Actually I had already tried to set the font to another one - terminus-v20n (don't know what this suffix means... too lazy to read the man page) and it didn't work.
Now I've tried to set the font to default8x9 (default8x16 is the default one and I might not be able to determine if the console setup successfully), rebuilt the initrd and it still hasn't worked.
I could replace the linux console with a fb terminal emulator (actually I've already tried fbterm and it doesn't recognize input from my keyboard - but that's another story...) but I'm curious to discover why this problem happens.
I forgot to mention that the machine is a laptop that boots with the lid closed and is connected via HDMI to a Tv; however I've tried to boot with the lid open and the HDMI disconnected and the problem still happens.

Last edited by taurux (2019-09-12 18:15:08)

Offline

#6 2019-09-12 19:48:40

SyndromeDayna
Member
Registered: 2019-07-13
Posts: 33

Re: Can't set console font on startup

alternative method:
  1) open /etc/default/grub
  2) look for line

GRUB_CMDLINE_LINUX_DEFAULT="..."

  3) add command line argument for linux kernel:

vconsole.font=ter-v32b

  3) update grub:

sudo grub-mkconfig -o /boot/grub/grub.cfg

This works for me.

Last edited by SyndromeDayna (2019-09-12 19:49:23)

Offline

#7 2019-09-12 20:46:24

taurux
Member
From: Italy
Registered: 2019-09-11
Posts: 4

Re: Can't set console font on startup

Just tried. Doesn't work for me...maybe it's because my initrd uses the systemd hook. It doesn't work...I have also tried rd.vconsole.font=ter-132n but it hasn't changed anything sad

Offline

Board footer

Powered by FluxBB