keyboardctl service failed but keyboard is working fine

Hi,

I am not sure when that started happening, but today I noticed that I have a problem with the keyboardctl service. When I run systemctl status keyboardctl I get this:

keyboardctl.service - Setup keyboard layout
     Loaded: loaded (/usr/lib/systemd/system/keyboardctl.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Wed 2020-05-13 22:00:42 -03; 7min ago
       Docs: man:keyboardctl
    Process: 12992 ExecStart=/usr/bin/keyboardctl --setup (code=exited, status=1/FAILURE)
   Main PID: 12992 (code=exited, status=1/FAILURE)

mai 13 22:00:42 gemini systemd[1]: Starting Setup keyboard layout...
mai 13 22:00:42 gemini systemd[1]: keyboardctl.service: Main process exited, code=exited, status=1/FAILURE
mai 13 22:00:42 gemini keyboardctl[12996]: The keyboard is in some unknown mode
mai 13 22:00:42 gemini keyboardctl[12996]: Changing to the requested mode may make your keyboard unusable, please use ->
mai 13 22:00:42 gemini systemd[1]: keyboardctl.service: Failed with result 'exit-code'.
mai 13 22:00:42 gemini keyboardctl[12997]: unknown keysym 'trademark'
mai 13 22:00:42 gemini keyboardctl[12997]: lk_add_key called with bad keycode -1
mai 13 22:00:42 gemini systemd[1]: Failed to start Setup keyboard layout.
mai 13 22:00:42 gemini keyboardctl[12992]: error: loadkeys failed!

Notice the "unknown keysym 'trademark'" part. I have searched everywhere in the config files related to keyboard and could not find anything with 'trademark'.

Strangely, the keyboard is working fine in X and in terminal.

Here is the result of locale status:

   System Locale: LANG=en_GB.UTF-8
                  LC_NUMERIC=pt_BR.UTF-8
                  LC_TIME=pt_BR.UTF-8
                  LC_MONETARY=pt_BR.UTF-8
                  LC_NAME=pt_BR.UTF-8
                  LC_ADDRESS=pt_BR.UTF-8
                  LC_TELEPHONE=pt_BR.UTF-8
                  LC_MEASUREMENT=pt_BR.UTF-8
       VC Keymap: br-abnt2
      X11 Layout: n/a

I will be glad if somebody could give me some advice to solve that.

Cheers.

1 Like

I'll show you something even weirder than that...: :stuck_out_tongue:

[nx-74205:/dev/pts/2][/root] # systemctl status keyboardctl
Unit keyboardctl.service could not be found.

[nx-74205:/dev/pts/2][/root] #

I don't even have that installed, and I'm not using a US keyboard either ─ I'm in Belgium and I have a Belgian AZERTY keyboard. So my guess is that you don't really need it, and that it's harmless. :wink:

3 Likes

How old is your install or what ISO you used to install it, and since when was not updated?keyboardctl.service in Manjaro was dropped back in 2017, after a brief usage of it, as was not relevant anymore AFAIK.

2 Likes

Thanks @Aragorn and @bogdancovaciu!

I do not have the faint idea of how or why that service was enabled and when, but you both are absolutely right: you don't need it! Weiiiiirddd.....

My system is quite new and I trying to keep it updated. I am even reading the announcements for the stable branch almost every day, but as I said, I have no idea when keyboardctl was enabled.

Anyway, thank for you guys for giving me directions. I have now disabled it and everything is working fine.

Cheers!

1 Like

Thank you @Wollie for changing the title. I thought that I should include the "[SOLVED]" part.

2 Likes

Wow, I just got the same error.

I'm pretty sure it wasn't there last week.
Maybe something with the last update.

Disabling the service solves the problem for me as well

Odd that you should say that as I have been experiencing a similar error on shutdown

And my installation may have been from the end of 2018 at the latest. It's kept up to date so I too am surprised as to what caused it - though I have come across a few errors that I thought I had fixed previously - but won't go into them.

[nicomo@nicomo-pc ~]$ systemctl status keyboardctl
● keyboardctl.service - Setup keyboard layout
     Loaded: loaded (/usr/lib/systemd/system/keyboardctl.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Wed 2020-05-20 20:34:13 CEST; 40min ago
       Docs: man:keyboardctl
   Main PID: 1946 (code=exited, status=1/FAILURE)

May 20 20:34:13 nicomo-pc systemd[1]: Starting Setup keyboard layout...
May 20 20:34:13 nicomo-pc keyboardctl[1950]: The keyboard is in some unknown mode
May 20 20:34:13 nicomo-pc keyboardctl[1950]: Changing to the requested mode may make your keyboard unusable, please use -f to force the change.
May 20 20:34:13 nicomo-pc keyboardctl[1956]: Cannot open display "default display"
May 20 20:34:13 nicomo-pc keyboardctl[1946]: error: setxkbmap failed!
May 20 20:34:13 nicomo-pc systemd[1]: keyboardctl.service: Main process exited, code=exited, status=1/FAILURE
May 20 20:34:13 nicomo-pc systemd[1]: keyboardctl.service: Failed with result 'exit-code'.
May 20 20:34:13 nicomo-pc systemd[1]: Failed to start Setup keyboard layout.

how do I disable it and will that be necessary and or permanent?

Thanks in advance.

You can disable the service and also you can remove the redundant package of it.
systemctl disable keyboardctl
sudo pacman -R keyboardctl
I think the package was called like that.

Thanks :+1:

Forum kindly sponsored by