Setting console font in vconsole.conf does not work (systemd)

23,926

Solution 1

I spent the better part of tonight solving this same issue, even though it's 2 years later! So to avoid a DenverCoder9 moment for future visitors, here's what solved my issue.

From this email thread:

  1. As root, edit /usr/lib/systemd/system/systemd-vconsole-setup.service
  2. Change the After= and Before= lines to:

    After=sysinit.target
    Before=shutdown.target
    
  3. Save & Quit

  4. Reboot

Your console font should now be correctly applied.

Solution 2

Do you have your graphics drivers set in the MODULES array in mkinitcpio.conf? For instance here is mine from my laptop with Intel graphics.

MODULES="i915 ahci sd_mod ext4"

AMD will need radeon, Nvidia will need nouveau.

You will also want to be sure that your locale is set properly. Such as LANG=en_US.UTF-8 in /etc/locale.conf.

Relevant wiki pages:

Solution 3

On Debian none of the solutions will work. You have to use dpkg-reconfigure console-setup command to change fonts!

Share:
23,926

Related videos on Youtube

Joshua
Author by

Joshua

Updated on September 18, 2022

Comments

  • Joshua
    Joshua almost 2 years

    I am trying to set a different default console font for my new Arch Linux installation (using systemd).

    I set up my vconsole.conf in /etc as so:

    KEYMAP=us
    FONT=Lat2-Terminus16
    

    I rebooted and saw my newly set console font appear, only for it to reset just before the login prompt.

    Things to note:

    • running /usr/lib/systemd/systemd-vconsole-setup manually works fine
    • systemctl status systemd-vconsole-setup.service tells me that it has loaded and is "active (exited)"
    • I have indeed included the consolefont hook in mkinitcpio.conf
  • 71GA
    71GA almost 10 years
    OMG finally someone figured this one out! I am very glad and allso sad that noone on Archlinux forum has posted this solution...
  • 71GA
    71GA almost 10 years
    This is not a good solution.
  • equaeghe
    equaeghe about 8 years
    Instead of editing, I guess it would be better to override: askubuntu.com/questions/659267/…
  • kodeart
    kodeart over 7 years
    And 3 years later still the same issue with this. Where do you put After/Before directives? In Unit or Service groups?
  • 71GA
    71GA over 6 years
    systemd-vconsole-setup.service has changed a bit.
  • Austin Hyde
    Austin Hyde over 6 years
    @71GA please feel free to edit the answer, make a new one, or otherwise make sure this question has the most relevant and correct answer
  • Wesley
    Wesley about 5 years
    For future adventurers, this isn't a great solution because changing the initial ramdisk means you're guaranteed to need to rebuild the ramdisk later when graphics drivers are updated. If you're okay with the occasional (and likely inconvenient) task of using mkinitcpio or dracut to rebuild your ramdisk image... fare thee well, brave soul. Otherwise, figure out the ordering of systemd units that's causing the vconsole configuration to be overridden.
  • TheDudeAbides
    TheDudeAbides almost 5 years
    Also mentioned in that email thread: try the (boring) lat0-{08,10,12,14,16} fonts before giving up entirely. At least on CentOS (7), the Terminus console fonts don't seem to work at all, and this had stumped Lennart, too.
  • 71GA
    71GA about 3 years
    On Debian 11 this does not work. File systemd-vconsole-setup.service is again moved... I hate this... Where can I find it? Does anyone know?
  • Carl Winbäck
    Carl Winbäck over 2 years
    I can confirm that dpkg-reconfigure console-setup works fine on Debian 11 (bullseye).