17

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
  • 351

5 Answers5

17

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.

  • 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, too. – Kevin E 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
  • 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

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

71GA
  • 1,106
  • 1
    I can confirm that dpkg-reconfigure console-setup works fine on Debian 11 (bullseye). – Carl Winbäck Dec 21 '21 at 19:40
  • For me sudo dpkg-reconfigure -plow console-setup worked on Ubuntu 20.04. Does anyone know what -plow does? I couldn't find that on the MAN pages. – pglpm Sep 25 '23 at 16:48
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

Exact same thing happened to me, even after following the wiki word for word. I think it came down to my hybrid graphics. These are the steps I took to get it working.

First, make sure to check out https://wiki.archlinux.org/title/Linux_console#Persistent_configuration. I have a Nvidia card, so I also followed their instructions on Early Loading.

However, it turns out I needed to add more modules to mkinitcpio.conf than just the Nvidia ones the wiki recommends. I used lsmod | grep nvidia to single out my running Nvidia modules. My video module is used by nvidia_modeset, msi_wmi, and i915. I added these extra modules to mkinitcpio and ran sudo mkinitcpio -P. Now my font sticks on reboot!

(BTW -- looking at past comments on this page -- changing the MODULES array IS the recommended solution in the wiki.)

Just make sure to add a pacman hook for the appropriate driver so you don't have to run mkinitcpio after every Nvidia driver update. https://wiki.archlinux.org/title/NVIDIA#pacman_hook

I hope this helps someone!

Ptom
  • 11