You are not logged in.

#1 2016-09-17 12:04:54

majar86
Member
From: Warsaw
Registered: 2016-09-17
Posts: 3

[SOLVED] vconsole.conf doesn't set correct font on boot in virtualbox

Hi everyone.

I have an issue with setting proper (polish in this case) font and keymap in guest Arch in virtualbox. I have installed Arch according to installation guide. I have used following settings:

/etc/vconsole.conf:
---------
FONT=Lat2-Terminus16
FONT_MAP=8859-2
KEYMAP=pl
/etc/locale.conf
--------
LANG=pl_PL.UTF-8

Language is set correctly, polish characters are also displayed correctly. However, some special characters like Backspace, Esc, Ctrl-C, etc. do not work. Instead, some garbage characters are displayed.

Now, I had exactly the same issue on my host Arch installation. I have solved it by adding "i915" module to /etc/mkinitcpio.conf. However, this solution doesn't work in case of virtualbox guest Arch machine. I have tried to use both "vboxvideo" and "i915" modules in /etc/mkinitcpio.conf, but without any effect.

I have also tried many different solutions suggested in forum threads and searched in web (like adding "consolefont" and/or "keymap" to mkinitcpio hooks, editing /usr/lib/systemd/system/systemd-vconsole-setup.service file), but nothing works.

Note that when I run

setfont Lat2-Terminus16 -m 8859-2

manually after login, special characters work correctly, but this is of course not a solution.

I'd appreciate any suggestion. Thank you.

Last edited by majar86 (2016-09-30 18:58:05)

Offline

#2 2016-09-25 05:48:47

zero2cx
Member
From: Minneapolis, MN
Registered: 2012-04-29
Posts: 24

Re: [SOLVED] vconsole.conf doesn't set correct font on boot in virtualbox

I think that the following solution shared by forum user forum user battlepanic may work for you, too.

In thread [SOLVED] Unable to change the console font in early userspace, the posted resolution was to add setfont to the initially-loaded executables within /etc/mkinitcpio.conf. Like so, if it is currently empty... BINARIES="setfont". Of course, follow that edit by rebuilding your system's initramfs image.

Good luck.

Offline

#3 2016-09-26 19:22:01

majar86
Member
From: Warsaw
Registered: 2016-09-17
Posts: 3

Re: [SOLVED] vconsole.conf doesn't set correct font on boot in virtualbox

Thank you, zero2cx, for this suggestion, however, it didn't work.

Funny thing is that when I ran virtual machine today to try this solution, everything was fine (keys were mapped correctly, backspace, esc, etc. working normally), as if problem never existed. After every subsequent reboot, keymap was wrong again, though. It looks like issue is non-deterministic, maybe it some kind of race condition during boot? I'm not very familiar with systemd and sboot sequence...

Offline

#4 2016-09-29 20:26:44

dif
Member
From: Stalowa Wola, Poland
Registered: 2009-12-22
Posts: 137

Re: [SOLVED] vconsole.conf doesn't set correct font on boot in virtualbox

Hello from Stalowa Wola.

It seems that systemd-vconsole-setup.service runs too early on virtual machines.
You can fix it by adding

Wants=systemd-udev-settle.service
After=systemd-udev-settle.service

to the [Unit] section of systemd-vconsole-setup.service.
Of course, copy systemd-vconsole-setup.service to /etc/systemd/system/ first.

Offline

#5 2016-09-30 18:57:18

majar86
Member
From: Warsaw
Registered: 2016-09-17
Posts: 3

Re: [SOLVED] vconsole.conf doesn't set correct font on boot in virtualbox

That fixed it! Thanks a lot for help.

Offline

#6 2017-04-28 17:16:17

shivaprsdv
Member
Registered: 2017-04-28
Posts: 1

Re: [SOLVED] vconsole.conf doesn't set correct font on boot in virtualbox

Hello,

I had a similar issue on VB. The custom font was always loaded initially, but
in the middle of the boot it kept going back to the default font for a few
moments, only to turn back to the custom one just before the login prompt.
Super annoying for me.

Adding `vboxvideo` instead of `i915` in `/etc/mkinitcpio.conf` worked for me.
Thanks majar86 for the tip! Anyone facing a similar issue may well try this
hack before trying other methods mentioned here.

Keep hacking!

Offline

Board footer

Powered by FluxBB