From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 00B77139083 for ; Tue, 5 Dec 2017 09:43:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6A1C5E0F42; Tue, 5 Dec 2017 09:43:07 +0000 (UTC) Received: from celine.tisys.org (celine.tisys.org [85.25.117.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E4FAEE0EC1 for ; Tue, 5 Dec 2017 09:43:06 +0000 (UTC) Received: from tisys.org (ip1f13680a.dynamic.kabel-deutschland.de [31.19.104.10]) by celine.tisys.org (Postfix) with ESMTPSA id F2E4D5140029 for ; Tue, 5 Dec 2017 10:43:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tisys.org; s=celine; t=1512466985; bh=GlR0mCtEHyKaZWyMDlDP+j7wJM55DRME1yAcAGEFcPw=; h=Date:From:To:Subject; b=aFYFhZzQqXx4TwNWIwlJ1l/3n9oydsuOjVai6TwA111MWRxQNL2ElpAewN4kwyAmJ lEqk5HhvLXkVCfIW+Ku5RidzSbT+EEWv0hRcEnRv04ruoGosy0BYp4VnqxhJi/uzX/ M8DPfnOqWhh3eqSoOt+xxwsV0PTkuHUu1jgNsnCg= Date: Tue, 5 Dec 2017 10:43:03 +0100 From: Nils Holland To: gentoo-user@lists.gentoo.org Subject: [gentoo-user] systemd-vconsole-setup: Suddenly fails after system rebuild Message-ID: <20171205094302.GA2698@tisys.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.1 (2017-09-22) X-Archives-Salt: 430229b1-60ad-4d6c-ad3b-311292252ba1 X-Archives-Hash: 5cfa3d51244c46bddc53a5ef8123eafa Hi folks, well, I have a weird issue here: Over the weekend, I switched to the new 17.0 profiles, and as part of that process, did an "emerge -e @world" on my ~x86/systemd machine. Took a while, but that was expected, and I was glad to see that afterwards everything was still working fine ... except for one thing: Strangely, on the newly emerged system, after each boot, I noticed that my desired keymap is no longer set on the virtual consoles. I get an English keymap now, although I have set a German one, as per /etc/vconsole.conf: # cat /etc/vconsole.conf KEYMAP=de-latin1-nodeadkeys FONT=eurlatgr.psfu.gz Now, the settings in this file have not been changed. In fact, no configuration changes have been done along with the world re-emerge. Actually, I can find a trace of something being wrong in the journal: Dec 05 08:44:25 boerne systemd-vconsole-setup[1944]: /usr/bin/setfont failed with error code 65. [...] Dec 05 08:44:26 boerne systemd-vconsole-setup[1944]: Setting source virtual console failed, ignoring remaining ones Dec 05 08:44:26 boerne systemd-udevd[1912]: Process '/lib/systemd/systemd-vconsole-setup' failed with exit code 1. So, /usr/bin/setfont seems to fail. Strange that it obviously didn't do that before the world re-emerge, but it's certainly doing it now. Even more strange, however, is that after login, I can operate setfont manually and it will succeed. In fact, after login I can execute /lib/systemd/systemd-vconsole-setup manually, or do "systemctl start systemd-vconsole-setup.service", and either will complete without error and actually set my keymap and font as desired. My wild guess is that during boot, systemd-vconsole-setup might get called too early by systemd-udevd, when the desired font file is not yet available (probably because still running in initramfs context) or when the virtual console, for whatever reason, is not yet ready. But like I've said, that's just a wild guess, I couldn't really find any proof for that in the journal. Looking at the original systemd-vconsole-setup.service file, things look sane in there, I guess: [Unit] Description=Setup Virtual Console Documentation=man:systemd-vconsole-setup.service(8) man:vconsole.conf(5) DefaultDependencies=no Before=initrd-switch-root.target shutdown.target ConditionPathExists=/dev/tty0 [Service] Type=oneshot ExecStart=/lib/systemd/systemd-vconsole-setup However, as a little test / possible workaround, I decided to create my own systemd unit file that does nothing more but execute /lib/systemd/systemd-vconsole-setup, only at a (hopefully) later stage during the boot process: # cat /etc/systemd/system/vconsole-fix.service [Unit] Description=Fix Virtual Console Before=-.mount ConditionPathExists=/dev/tty0 [Service] Type=oneshot ExecStart=/lib/systemd/systemd-vconsole-setup [Install] WantedBy=multi-user.target And after enabling this unit, things actually work just fine: My keymap is, once again, set up properly on the virtual console right after boot and before I log in or perform any manual steps. Sadly, I'm kind of confused now. I'm really wondering if anyone's ever seen something like that before or otherwise has an explanation for it. I mean, it used to work before, and neither configuration nor package versions have been changed. It's just that everything has been re-build (as PIEs), but I can hardly imagine that this is responsible for the issue. Right now, I'm waiting for a second machine to complete the re-emerge process (might take another while) and am then really curious to see if it suddenly suffers from the same oddity. Other than that, the only idea that I currently have is to keep the workaround deployed and have a look if the issue disappears again by itself just as suddenly as it started, probably with a forthcoming version of systemd or something. Of course, understanding things is always preferrable than just hoping for them to fix themselves, so if someone has a clue, I'd be more than glad to hear about it! :-) Greetings Nils