Problemas para salvar permanentemente a configuração de teclado

Olá!
Estou há algum tempo tentando achar um solução para esse problema simples, porém insistente…
Tenho/uso um notebook HP Pavillion 15 com algumas das especificações de sistema…
Sistema operacional: Manjaro Linux
Versão do KDE Plasma: 5.21.1
Versão do KDE Frameworks: 5.79.0
Versão da Qt: 5.15.2
Versão do kernel: 5.10.18-1-MANJARO
Tipo de sistema operacional: 64 bits
Plataforma gráfica: X11
Processadores: 4 × AMD A8-5550M APU with Radeon™ HD Graphics
Memória: 7,0 GiB de RAM
Processador gráfico: AMD ARUBA

Venho tentando achar uma maneira de manter a configuração de layout do teclado em: US, alt. intl. (o layout físico do teclado é exatamente esse) permanentemente em todas as sessões porém sem sucesso.
Alguém pode me ajudar?

Boa tarde Starlinger!

Você usa o Manjaro KDE, certo?
Já tentou abrir as configurações do sistema (systemsettings5) na aba de “Configurações do teclado” e mudar lá?

Caso tenha conseguido ou não, avise por favor.
Espero ter ajudado!

1 Like

Hello,

can you run a couple of commands to identify the current status?

The output below, will show you that:

  • System language is English_US
  • Time, currency, addresses, contact information are in pt_PT format
  • Keyboard mapping, layout and model (physical keys) are also in pt format
$ localectl status
   System Locale: LANG=en_US.UTF-8
                  LC_NUMERIC=pt_PT.UTF-8
                  LC_TIME=pt_PT.UTF-8
                  LC_MONETARY=pt_PT.UTF-8
                  LC_PAPER=pt_PT.UTF-8
                  LC_NAME=pt_PT.UTF-8
                  LC_ADDRESS=pt_PT.UTF-8
                  LC_TELEPHONE=pt_PT.UTF-8
                  LC_MEASUREMENT=pt_PT.UTF-8
                  LC_IDENTIFICATION=pt_PT.UTF-8
       VC Keymap: pt-latin1
      X11 Layout: pt
       X11 Model: pc105

This file saves the persistent keymap used in your session;
It should reflect the same we same one from the previous command.

$ cat /etc/vconsole.conf 
KEYMAP=pt-latin1
FONT=
FONT_MAP=

edit: forgot to include this file as well - at the end of the file you should see the languages you have enabled.

$ cat /etc/locale.gen

###
#
# Locales enabled by Calamares
en_US.UTF-8 UTF-8
pt_PT.UTF-8 UTF-8

Hope this helps

1 Like

Olá inky1003!

Sim, é o KDE Plasma.
Eu geralmente faço isso toda vez que ligo o notebook e tenho que fazer isso quando saio da sessão de usuário também.
A configuração não salva permanentemente, daí toda vez é a mesma ladainha.

Hello KilicpuI

I ran all of the commands you asked and got some results:

$ localectl status
System Locale: LANG=pt_BR.UTF-8
VC Keymap: us
X11 Layout: us
X11 Model: hpzt11xx
X11 Variant: alt-intl

The time, currency, addresses, contact information didn’t appear at all.

I’ve tried the other two commands that you showed on your answer but they didn’t seem to have any effect on the system…

$ cat /etc/vconsole.conf
KEYMAP=us
FONT=
FONT_MAP=

Here’s the result of the other one:

$ cat /etc/locale.gen

#Locales enabled by Calamares
en_US.UTF-8 UTF-8
pt_BR.UTF-8 UTF-8

(the …"# Locales enabled by Calamares" I put together on the blockquote because it stays on “large letters” when I put a space between them :grimacing: )

I think i’m missing something here… Thanks for the help until now!
Is there something else I need to do, to solve this?

Tenta aí sudo cat /etc/locale.gen coloca um # antes desse en_US.UTF-8 UTF-8, fazendo isso, esse idioma deixa de ser considerado nas configurações do seu sistema, depois salva (não sei como que salva com o cat, acho que ctrl X) e atualiza as configurações de idioma com o comando sudo locale-gen talvez você precise reiniciar o computador.

1 Like

Olha, eu to tentando aqui mas sem sucesso. Travei no inicio da tentativa da sua resposta, o “#” como colocar ele antes do “en_US.UTF-8 UTF-8” ? nesse comando:

sudo cat /etc/locale.gen

Eu ainda sou novato na comunidade Linux; não sei muito bem como usar esses comandos, se puder/tiver algum tutorial que eu possa seguir, também é bem-vindo!

Travei no inicio da tentativa da sua resposta, o “#” como colocar ele antes do “en_US.UTF-8 UTF-8 ” ? nesse comando:

Isso! Normalmente quando você tem comandos com $ eles podem ser executados sem sudo.
Quando tem comandos com # eles precisam ser executados com sudo!

Espero ter ajudado, seja bem vindo ao Linux!

1 Like

Hey,

I want to understand what is the initial configuration you have, when you first boot/login the system, without making any changes.

Can you take these steps ?

1 - boot computer and login
2 - you see that the layout is incorrect
3 - don’t make any changes to the layout
4 - provide the following outputs

$ localectl status
$ cat /etc/vconsole.conf
$ cat /etc/locale.gen

I know you already provided the previous outputs before, but if we are following these steps, we may see a difference.

This new output below, will show us what is the persistent configuration:

$ ls /etc/X11/xorg.conf.d
$ cat /etc/X11/xorg.conf.d/00-keyboard.conf

Thanks

1 Like

Hello,

As you asked, here are the inputs:

$ localectl status
System Locale: LANG=pt_BR.UTF-8
VC Keymap: us
X11 Layout: us
X11 Model: hpzt11xx
X11 Variant: alt-intl

$ cat /etc/vconsole.conf
KEYMAP=us
FONT=
FONT_MAP=

$ cat /etc/locale.gen

#Locales enabled by Calamares
en_US.UTF-8 UTF-8
pt_BR.UTF-8 UTF-8

And here`s what i get from the new outputs:

$ ls /etc/X11/xorg.conf.d
00-keyboard.conf 30-touchpad.conf

$ cat /etc/X11/xorg.conf.d/00-keyboard.conf
#Written by systemd-localed(8), read by systemd-localed and Xorg. It’s
#probably wise not to edit this file manually. Use localectl(1) to
#instruct systemd-localed to update it.
Section “InputClass”
Identifier “system-keyboard”
MatchIsKeyboard “on”
Option “XkbLayout” “us”
Option “XkbModel” “hpzt11xx”
Option “XkbVariant” “alt-intl”
EndSection

(Sorry if it`s strange on the blockquote it always get with large letters when putting a space between the word and the “#” in some cases )

Thanks for the pacience until now :+1:t2:

these outputs are all before you make any changes right?

from these logs everything seems ok, however from what you experience, I would guess that the layout is being read from some other file :\

I’ll try to have some more reading into it.

edit:

Can you show the current configuration here?

System Settings => Keyboard => Keyboard Layouts

1 Like

Yep, I’ve input the commands before changing anything…

So, it seems that changing the configurations on this part of the system, and adding the right layout there maintain the changes even when rebooting the system.

I`m gonna try, and do one more test and see if it stays with the right config…

And, it worked! Thanks Kilicpu for the patience and the persistence in looking for a way to solve it!

What I`ve done was, clicking in the “Add” button and adding manually the layout of the keyboard that works for my hardware, that in this case is "English(EUA intern. alt.).

1 Like

Awesome!
No problem, it was fun troubleshooting =D

Abraço :wink:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.