[artix-general] [s6] random boot error -> setfont: ERROR kdfontop.c:232 put_font_kdfontop: ioctl(KDFONTOP): Input/output error

Kian Kasad kian at kasad.com
Mon Feb 15 01:54:22 CET 2021


On 21/02/14 04:17PM, Javier wrote:
> On 2/14/21 3:26 PM, Kian Kasad wrote:
> > On 21/02/14 03:09PM, Javier wrote:
> > > ...
> > > However, I've already tried removing "consolefont" from the mkinitcpio
> > > hooks list and rebuilding the initrd to then reboot, and that doesn't
> > > help a bit.  Knowing that, and considering the error shows up after
> > > the 1st prompt (useless one, since it gets replaced later) shows up,
> > > makes me almost sure this is not about initrd early user space bring
> > > up.  Perhaps the way S6 starts tty.
> > > 
> > > It's important to note, this started showing up just after recent
> > > upgrade with several S6 packages upgrading, including:  s6-scripts,
> > > s6-rc, cryptsetup-s6, kexec-tools and lvm2-s6, and I haven't noticed
> > > it before.  I also noticed s6-scripts includes several tty and console
> > > related stuff, though nothing specifically called "consolefont", but
> > > that might be called underneath.
> > > ...
> > 
> > I've never come across this specific error, but I have had issues with
> > "kdfontop" errors in the past. The solution for me was to include the
> > /usr/bin/setfont program in the BINARIES array in /etc/mkinitcpio.conf.
> > By default, mkinitcpio uses busybox's setfont, not the one from the kbd
> > package. Explicitly setting this in mkinitcpio uses kbd's setfont
> > instead of busybox.
> 
> When I removed "consolefont" from the mkinitcpio hooks, rebuilt the
> initrd and rebooting several times, I got the 1st hint this was not an
> initrd issue.  The 2nd hint was that the error message doesn't show up
> before the 1st tty1 prompt does it, but instead later.  So S6 already
> started tty1 when the error shows up.  The 3rd hint was, this wasn't
> happening before, only after the S6 packages upgrade mentioned.    And
> this other trial, adding "/usr/bin/setfont" to the mkinitcpio binaries
> list not helping, seems like a 4th hint...

Yeah, it definitely doesn't seem like an initrd issue, especially since
it always occurs after the early getty. It seems like the problem is
being caused by the console-setup oneshot (so it is s6-specific), which
parses /etc/vconsole.conf and sets the font accordingly. The script that
calls setfont(1) hasn't been changed in about a year, so it's weird that
it's only happening after the recent update of the s6 packages.

The only (seemingly relevant) thing that's changed is the agetty-tty*
packages no longer depend on mount-filesystems, which I don't think
would have any effect, but it's possible. The console-setup oneshot
doesn't seem to depend on anything, so I don't think it would've had the
mount-filesystems dependencies in previous version of s6-scripts,
either.

Have you changed your /etc/vconsole.conf lately? If so, that's probably
what caused the problem.

Take a look at /etc/s6/sv/console-setup/shell_up. Maybe add an echo to
stderr before and after the call to setfont(1). If you see the lines
appear before and after the error in the console, that's definitely
where the issue is. You can also try logging that entire setfont command
so you can reproduce it later.

--
Kian Kasad
PGP 0x1715EEAA14DAEC1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.artixlinux.org/archives/artix-general/attachments/20210214/0879f862/attachment.sig>


More information about the artix-general mailing list