1.3/1.4 "$ set console keymap" not working

The above command (in monitor mode) calls up dpkg-reconfigure and changes /etc/default/keyboard and localectl status data.

In 1.2, the changes trigger a reload of the systemd unit keyboard-setup.service and the new keymap is applied.
In 1.3 and 1.4, the changes do not trigger a reload and the new keymap isn’t applied.
$ sudo systemctl restart keyboard-setup.service does not fix this

In 1.2, the output of $ systemctl status keyboard-setup.service is:
Active: active (exited)

In 1.3 and 1.4, the output of the same command is:

Active: inactive (dead)
Condition: start condition failed
     ConditionPathExists=/bin/setupcon was not met

And in fact, in both 1.3 and 1.4 /bin/setupcon doesn’t exist, while it exists in 1.2.

# set system option keyboard-layout 'xy' still works across 1.3 and 1.4

This has been detected in the 1.3 version since at least monthly-2020-11 (Build commit ID b35660db9bd641) and in 1.4 up to 1.4-rolling-20211018xxxxx
The reports from version 1.2 are from 1.2 crux (Build commit ID 402d80498683f2).

For more details, check this thread: Change keyboard layout

Hello @tigas , I see that it works properly on VyOS-1.3epa2 and latest 1.4 rolling 1.4-rolling-202110240217

How I can reproduce described issue?

Also, if you need to configure keyboard layout try the following commands

configure
set system option keyboard-layout fr
commit

Hello @Dmitry.
First of all, this is in direct console mode under Virtualbox (not serial, not a real system)
An SSH connection gets the correct layout of the client that is connected.
The second set of commands (set system option keyboard-layout fr) works. I just use ‘no’ most of the time because it’s closer to Portuguese.
Has the $ set console keymap command in monitoring mode been deprecated for # set system option keyboard-layout in configuration mode? Because at this time, the conf. mode command only supports a few layouts. But if it is deprecated, this isn’t a bug - the “bug” is not supporting enough layouts with the configuration mode command.
In 1.2, the monitoring mode command calls up the Debian console configuration and then restarts the keyboard-setup.service, allowing all keyboard layouts available in Debian.
In 1.3-epa2 and 1.4-rolling-202110180513, the monitoring mode command doesn’t work and keyboard-setup.service can’t run to apply the changes.
I believe the build scripts for 1.3 and 1.4 are, at least, not including the Debian package that provides /bin/setupcon because that file is needed for calling keyboard-setup.service and applying the Debian keymap.

To reproduce:

  1. Install 1.3-epa2 with install image and default options
  2. Boot into installed image and login as vyos
  3. $ set console keymap
  4. Generic 105-key PC (intl.) / Other / Portuguese / Portuguese / The default for the keyboard layout / No compose key
  5. Test keymap: the key to the left of Right Shift should be ‘-’; if it’s ‘/’ the keymap is still US

Behaviour of 1.2 after step 4:

update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
[ ok ] Restarting keyboard-setup (via systemctl): keyboard-setup.service.

Step 5 in 1.2: keymap is changed

Behaviour of 1.3 and 1.4 after step 4: drops to prompt (monitoring mode)
Step 5 in 1.3 and 1.4: keymap isn’t changed

systemctl status keyboard-setup.service
In 1.2:

● keyboard-setup.service - LSB: Set preliminary keymap
   Loaded: loaded (/etc/init.d/keyboard-setup)
   Active: active (exited) since Mon 2021-10-25 14:05:37 UTC; 3min 27s ago
  Process: 2362 ExecStop=/etc/init.d/keyboard-setup stop (code=exited, status=0/SUCCESS)
  Process: 2367 ExecStart=/etc/init.d/keyboard-setup start (code=exited, status=0/SUCCESS)

In 1.3/1.4:

● keyboard-setup.service - Set the console keyboard layout
   Loaded: loaded (/lib/systemd/system/keyboard-setup.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
Condition: start condition failed at Mon 2021-10-25 14:00:24 UTC; 9min ago
           └─ ConditionPathExists=/bin/setupcon was not met

Oct 25 13:42:59 vyos systemd[1]: Condition check resulted in Set the console keyboard layout being skipped.
Oct 25 13:43:44 vyos systemd[1]: Condition check resulted in Set the console keyboard layout being skipped.
Oct 25 14:00:24 vyos systemd[1]: Condition check resulted in Set the console keyboard layout being skipped.

ls -l /bin/setupcon
In 1.2:
-rwxr-xr-x 1 root root 32039 Apr 21 2015 /bin/setupcon
In 1.3/1.4:
ls: cannot access '/bin/setupcon': No such file or directory

@tigas, thank you for the explanation. Let me figure out is this command really useful or this is just rudiment-feature. In my practice I never seen that anyone used it.

Hi!
I tried setting the keyboard with the following steps:

configure

set system option keyboard-layout de

This is my problem:

I investigated this a littlebit and found out that option do not exist. I only have a options keyword. This keyword does not provide a keyboard-layout option. Any ideas how I can set the keyboard layout? I have a custom flashed keyboard and therefor I need the german layout.

My VyOS Version: 1.1.8

1.1.8 is EOL
Update your system

Thanks for this hint but I already know that.
The router is in an IT security laboratory so it is intended that
this version is already EOL.

In 1.1.8 VyOS did not have its own localization support and simply used the Debian underpinnings; drop to a root shell ($ sudo su -) and run dpkg-reconfigure console-data
VyOS no longer supports this console configuration method but the alternative seems to be very limited in the amount of supported layouts. An equivalent mechanism is missing from version 1.3+, which is the point of this thread.