Bug 2273069

Summary: systemd-vconsole-setup: Failed to lock /dev/console
Product: [Fedora] Fedora Reporter: Thomas Jansen <mithi>
Component: systemdAssignee: systemd-maint
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 40CC: darling.don, dtardon, fedoraproject, filbranden, lnykryn, msekleta, ryncsn, systemd-maint, yuwatana, zbyszek
Target Milestone: ---Keywords: Bugfix, Reopened, Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: systemd-256~rc2-1.fc41 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-05-15 15:47:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Thomas Jansen 2024-04-03 21:03:38 UTC
Description of problem:
After boot the vconsole keymap was not loaded (In DE swapped y and z are pretty obvious) and an error message appeared on the vconsole.

Version-Release number of selected component (if applicable):
systemd-udev-255.4-1-fc40.x86_64

How reproducible:
Perform a dnf system-upgrade from Fedora 39 to 40 on a virtual machine I've been upgrading for more than a decade now. The virtual machine boots to a virtual console based login rather than a graphical one.

Steps to Reproduce:
1. dnf system-upgrade download --releasever=40
2. dnf system-upgrade reboot
3. Wait for upgrade and subsequent reboot to complete

Actual results:
After a fresh boot the virtual console shows an error message:
systemd[1]: Failed to start systemd-vconsole-setup.service - Virtual Console Set
The keymap was not loaded.

Expected results:
No error message before login prompt on virtual console
Keymap loads

Additional info:
❯ sudo systemctl status systemd-vconsole-setup.service
× systemd-vconsole-setup.service - Virtual Console Setup
     Loaded: loaded (/usr/lib/systemd/system/systemd-vconsole-setup.service; static)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: failed (Result: exit-code) since Wed 2024-04-03 20:49:53 CEST; 1h 58min ago
       Docs: man:systemd-vconsole-setup.service(8)
             man:vconsole.conf(5)
   Main PID: 650 (code=exited, status=1/FAILURE)
        CPU: 8ms

Apr 03 20:49:53 HOSTNAME systemd[1]: Starting systemd-vconsole-setup.service - Virtual Console Setup...
Apr 03 20:49:53 HOSTNAME systemd-vconsole-setup[650]: Failed to lock /dev/console: Input/output error
Apr 03 20:49:53 HOSTNAME systemd[1]: systemd-vconsole-setup.service: Main process exited, code=exited, status=1/FAILURE
Apr 03 20:49:53 HOSTNAME systemd[1]: systemd-vconsole-setup.service: Failed with result 'exit-code'.
Apr 03 20:49:53 HOSTNAME systemd[1]: Failed to start systemd-vconsole-setup.service - Virtual Console Setup.

❯ cat /etc/vconsole.conf
FONT=latarcyrheb-sun16
KEYMAP=de-latin1-nodeadkeys

Google found this bug when searching for "Failed to lock /dev/console", so upstream should be aware of the problem, no reaction since mid december though: https://github.com/systemd/systemd/issues/30501

Comment 1 Thomas Jansen 2024-05-06 13:11:59 UTC
I found a solution for my personal problem that I wanted to share with you in the upstream ticket: https://github.com/systemd/systemd/issues/30501

I personally don't need this bug ticket anymore, feel free to close it or keep it around until a proper fix has been implemented.

Comment 2 Zbigniew Jędrzejewski-Szmek 2024-05-14 18:12:30 UTC
https://github.com/systemd/systemd/pull/32822

Comment 3 Fedora Update System 2024-05-15 12:20:20 UTC
FEDORA-2024-0920709321 (systemd-256~rc2-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-0920709321

Comment 4 Fedora Update System 2024-05-15 15:47:18 UTC
FEDORA-2024-0920709321 (systemd-256~rc2-1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 David Tardon 2024-07-08 12:29:02 UTC
*** Bug 2296143 has been marked as a duplicate of this bug. ***