16

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
Joshua
  • 341
  • 2
  • 3
  • 6

4 Answers4

16

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.

Austin Hyde
  • 261
  • 2
  • 4
  • 1
    OMG finally someone figured this one out! I am very glad and allso sad that noone on Archlinux forum has posted this solution... – 71GA Sep 22 '14 at 16:57
  • 2
    Instead of editing, I guess it would be better to override: http://askubuntu.com/questions/659267/how-do-i-override-or-configure-systemd-services – equaeghe Apr 12 '16 at 21:18
  • And 3 years later still the same issue with this. Where do you put After/Before directives? In *Unit* or *Service* groups? – kodeart Jan 31 '17 at 21:30
  • `systemd-vconsole-setup.service` has changed a bit. – 71GA Oct 05 '17 at 11:28
  • 2
    @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 – Austin Hyde Oct 05 '17 at 17:24
  • 1
    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](https://lists.freedesktop.org/archives/systemd-devel/2011-June/002618.html), too. – TheDudeAbides Sep 27 '19 at 20:10
  • 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? – 71GA Jun 15 '21 at 12:15
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:

Ariel
  • 136
  • 4
  • 2
    This is not a good solution. – 71GA Sep 22 '14 at 16:58
  • 1
    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. – Wesley May 14 '19 at 15:06
2

Using Arch
The only thing that worked for me:
Making a new file / script in: /etc/systemd/system/"script.service"
call it EKS: fonts.service

[Unit]
Description=fonts

[Service]
ExecStart=/usr/lib/systemd/systemd-vconsole-setup

[Install]
WantedBy=multi-user.target

Making it executable:

$ sudo chmod 755 fonts.service

Then enabeling the service:

$ sudo systemctl enable fonts.service

alternetive is to edit the /usr/lib/systemd/system/systemd-vconsole-setup.service. But i find that it breaks things

Phfish
  • 21
  • 1
1

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

71GA
  • 1,056
  • 5
  • 18
  • 38