#608457 console setup integration

Package:
systemd
Source:
systemd
Description:
system and service manager
Submitter:
Michael Biebl
Date:
2015-01-13 08:45:04 UTC
Severity:
normal
Tags:
#608457#5
Date:
2010-12-31 01:44:19 UTC
From:
To:
systemd ships /lib/systemd/systemd-vconsole-setup which allows to setup
the virtual consoles (font and keymap).

For that to work, it spawns
/bin/loadkeys and /bin/setfont, both shipped within the "kbd" package,
the keymap data, shipped in "console-data" and the config file
/etc/vconsole.conf correctly set up.

We should at least do a one-time conversion of an existing configuration
or patch src/vconsole.conf to read the legacy/fallback configuration
file.


We should also investigate how that integrates with console-setup, which
seems to be the preferred tool of the installer people.


As a side note: while /bin/loadkeys and /bin/setfont are available
during early boot, the console data is stored in /usr/share.

The kbd/console-data package circumvents this problem by copying the
selected keymap file to /etc/ in the dpkg maintainer script.

#608457#10
Date:
2011-02-02 01:42:45 UTC
From:
To:
default lenny installation to squeeze and installing systemd afterwards.

I looks like in lenny, console-tools was preferred over kbd.
The /bin/loadkeys binary from console-tools does not understand the -C option
though, so systemd-vconsole-setup errs out with this message:

# /lib/systemd/systemd-vconsole-setup
/bin/loadkeys: invalid option -- 'C'
Usage: loadkeys [option...] [mapfile...]
valid options are:
-c --clearcompose clear kernel compose table
-d --default load default keymap file
-m --mktable output a "defkeymap.c" to stdout
-s --clearstrings clear kernel string table
-q --quiet be silent
-u --unicode unicode
-v --verbose report the changes
-v --verbose report more changes
-h --help display this help text and exit
-V --version display version information and exit

The /bin/setfont binary that is used in src/vconsole-setup.c is only shipped in
kbd, the console-tools package does not have such a binary.

So, I think systemd should ensure that the kbd package (along with console-data)
is being installed.

* A default squeeze installation seems to install kbd, console-setup and
keyboard-configuration.
* A default lenny system upgraded to squeeze has console-tools, console-common
and console-data.

#608457#15
Date:
2011-02-02 05:31:47 UTC
From:
To:
]] Michael Biebl

| So, I think systemd should ensure that the kbd package (along with console-data)
| is being installed.

Sounds reasonable, I'll add a depends on kbd + console-data in the next version.

#608457#18
Date:
2012-03-20 23:35:42 UTC
From:
To:
Once this change occurs, systemd should also ship unit files that
supercede /etc/init.d/console-setup, /etc/init.d/keyboard-setup, and
/etc/init.d/console-screen.sh.

Also, currently xserver-xorg-core depends on keyboard-configuration,
even though it doesn't depend on the packages that
keyboard-configuration's init scripts use.  That needs some
investigation, so that systemd can satisfy this dependency.

- Josh Triplett

#608457#23
Date:
2012-03-23 20:29:15 UTC
From:
To:
Michael Biebl, le Fri 31 Dec 2010 02:44:19 +0100, a écrit :

Not just the installer people.  Maintainers of console-data want it
gone, because it's not really maintained upstream, and xkb-data is
nowadays a way better source for keyboard maps.

So systemd should really integrate with console-setup so we can get rid
of console-data.

Samuel

#608457#28
Date:
2014-08-13 09:55:03 UTC
From:
To:
"Sometimes" systemd console-setup.service "forgets" to properly setup the
console font. I am using Terminus extensively which vastly improves
console readability.

Running "dpkg-reconfigure console-setup" always fixes the issue for "a
few boots" but after a few reboots it happens again.

I haven't been able to further narrow down the "..." things.

Systemd certainly thinks it's done the right thing:

	root@hermes:~# systemctl status console-setup.service
	console-setup.service - LSB: Set console font and keymap
	   Loaded: loaded (/etc/init.d/console-setup)
	   Active: active (exited) since Mi 2014-08-13 11:37:18 CEST; 2min 22s ago
	  Process: 351 ExecStart=/etc/init.d/console-setup start (code=exited, status=0/SUCCESS)

	Aug 13 11:37:18 hermes console-setup[351]: Setting up console font and keymap...done.
	Aug 13 11:37:18 hermes systemd[1]: Started LSB: Set console font and keymap.

However, console-screen.service seems to fail (no idea whether that's
related):

	root@hermes:~# systemctl status console-screen.service
	console-screen.service
	   Loaded: not-found (Reason: No such file or directory)
	   Active: inactive (dead)

	root@hermes:~# systemctl restart console-screen.service
	Failed to issue method call: Unit console-screen.service failed to load: No such file or directory.

As does keymap.service:

	root@hermes:~# systemctl status keymap.service
	keymap.service
	   Loaded: not-found (Reason: No such file or directory)
	   Active: inactive (dead)

	root@hermes:~# systemctl restart keymap.service
	Failed to issue method call: Unit keymap.service failed to load: No such file or directory.

keyboard-setup.service worked fine:

	root@hermes:~# systemctl status keyboard-setup.service
	keyboard-setup.service - LSB: Set preliminary keymap
	   Loaded: loaded (/etc/init.d/keyboard-setup)
	   Active: active (exited) since Mi 2014-08-13 11:37:17 CEST; 15min ago
	  Process: 166 ExecStart=/etc/init.d/keyboard-setup start (code=exited, status=0/SUCCESS)

	Aug 13 11:37:14 hermes systemd[1]: Starting LSB: Set preliminary keymap...
	Aug 13 11:37:17 hermes keyboard-setup[166]: Setting preliminary keymap...done.
	Aug 13 11:37:17 hermes systemd[1]: Started LSB: Set preliminary keymap.

Karsten

#608457#33
Date:
2014-11-03 09:41:02 UTC
From:
To:
This problem hasn't happened for a while anymore.

Karsten

#608457#38
Date:
2015-01-13 08:41:17 UTC
From:
To:
Unfortunately it happens all the time for me.  I have to manually run
`setupcon --save' each time when I switch to a text console on a freshly
booted jessie system in order to get the right screen font back.

Thanks,

/mjt