FS#51470 - [mkinitcpio] sd-vconsole fails to set font

Attached to Project: Arch Linux
Opened by Jesse Schwartzentruber (truber) - Friday, 21 October 2016, 03:10 GMT
Last edited by Dave Reisner (falconindy) - Saturday, 22 October 2016, 16:49 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Dave Reisner (falconindy)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
I switched my mkinitcpio.conf to use systemd, and sd-vconsole hook failed to set my console font. This is important on hidpi screens for encryption unlock prompts to be legible.

Additional info:
* package version(s)
mkinitcpio 21-1
systemd 231-4

* config and/or log files etc.
/etc/mkinitcpio.conf
============================================================================
HOOKS="base systemd autodetect modconf block keyboard sd-vconsole sd-encrypt sd-lvm2 filesystems fsck sd-shutdown"
============================================================================

/etc/vconsole.conf
============================================================================
KEYMAP=us
FONT=ter-132n
FONT_MAP=8859-1
============================================================================

journalctl -xb -1
============================================================================
Oct 20 21:30:43 localhost systemd[1]: Starting Setup Virtual Console...
-- Subject: Unit systemd-vconsole-setup.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit systemd-vconsole-setup.service has begun starting up.
Oct 20 21:30:43 localhost systemd-vconsole-setup[209]: mapscrn: cannot open map file _8859-1_
Oct 20 21:30:43 localhost systemd-vconsole-setup[209]: /usr/bin/setfont failed with error code 1.
Oct 20 21:30:43 localhost systemd[1]: systemd-vconsole-setup.service: Main process exited, code=exited, status=1/FAILURE
Oct 20 21:30:43 localhost systemd[1]: Failed to start Setup Virtual Console.
-- Subject: Unit systemd-vconsole-setup.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit systemd-vconsole-setup.service has failed.
--
-- The result is failed.
Oct 20 21:30:43 localhost systemd[1]: systemd-vconsole-setup.service: Unit entered failed state.
Oct 20 21:30:43 localhost systemd[1]: systemd-vconsole-setup.service: Failed with result 'exit-code'.
============================================================================


Steps to reproduce
* Set FONT_MAP in /etc/vconsole.conf
* Use sd-vconsole in /etc/mkinitcpio.conf hooks
* Rerun mkinitcpio -p ...
* Reboot
* Console font will not be set

And here's how I fixed this:
* Copy /usr/lib/initcpio/install/sd-vconsole to /etc/initcpio/install/
* Edit /etc/initcpio/install/sd-vconsole, adding the following to build():
if [[ $FONT_MAP ]]; then
# I'm sure this is too narrow
file="/usr/share/kbd/consoletrans/${FONT_MAP}_to_uni.trans"
get_decompressor "$file"
add_dir "${of%/*}"
$cat "$file" > "$BUILDROOT/$of"
fi
* Rerun mkinitcpio -p ...
* Reboot
* Console font is set
This task depends upon

Closed by  Dave Reisner (falconindy)
Saturday, 22 October 2016, 16:49 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#45444 

Loading...