Lock screen - keyboard layout change

Asked by rafting300

I couldn't log in into my account until I figured that Y and Z keys changed places. This could be if the keyboard layout changed somehow in the background. I have two layouts defined in the Settings-> region&language->input sources, English(US) and Serbian(Latin).
This happens randomly as far as I can tell, after a system standby or fresh boot.
This keyboard layout change should not take place, also I guess it could be helpful to have keyboard layout UI on the lock screen somewhere.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What is the output of:

lsb_release -a; uname -a; apt-cache policy `dpkg -l | egrep 'lightdm|gdm|kdm'

Thanks

Revision history for this message
rafting300 (rafting300) said :
#2

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
----------------------------------------
Linux HP820-G4 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
---------------------------------------
ii:
  Installed: (none)
  Candidate: 1.7-2build1
  Version table:
     1.7-2build1 500
        500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
gdm3:
  Installed: 3.28.3-0ubuntu18.04.4
  Candidate: 3.28.3-0ubuntu18.04.4
  Version table:
 *** 3.28.3-0ubuntu18.04.4 500
        500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages
        100 /var/lib/dpkg/status
     3.28.0-0ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
ii:
  Installed: (none)
  Candidate: 1.7-2build1
  Version table:
     1.7-2build1 500
        500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
gir1.2-gdm-1.0:
  Installed: 3.28.3-0ubuntu18.04.4
  Candidate: 3.28.3-0ubuntu18.04.4
  Version table:
 *** 3.28.3-0ubuntu18.04.4 500
        500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages
        100 /var/lib/dpkg/status
     3.28.0-0ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
the:
  Installed: (none)
  Candidate: 3.3~rc1-3
  Version table:
     3.3~rc1-3 500
        500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
ii:
  Installed: (none)
  Candidate: 1.7-2build1
  Version table:
     1.7-2build1 500
        500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
libgdm1:
  Installed: 3.28.3-0ubuntu18.04.4
  Candidate: 3.28.3-0ubuntu18.04.4
  Version table:
 *** 3.28.3-0ubuntu18.04.4 500
        500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages
        100 /var/lib/dpkg/status
     3.28.0-0ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
N: Unable to locate package 3.28.3-0ubuntu18.04.4
N: Couldn't find any package by glob '3.28.3-0ubuntu18.04.4'
N: Couldn't find any package by regex '3.28.3-0ubuntu18.04.4'
N: Unable to locate package amd64
N: Unable to locate package GNOME
N: Unable to locate package Display
N: Unable to locate package Manager
N: Unable to locate package 3.28.3-0ubuntu18.04.4
N: Couldn't find any package by glob '3.28.3-0ubuntu18.04.4'
N: Couldn't find any package by regex '3.28.3-0ubuntu18.04.4'
N: Unable to locate package amd64
N: Unable to locate package GObject
N: Unable to locate package introspection
N: Unable to locate package data
N: Unable to locate package for
N: Unable to locate package GNOME
N: Unable to locate package Display
N: Unable to locate package Manager
N: Unable to locate package 3.28.3-0ubuntu18.04.4
N: Couldn't find any package by glob '3.28.3-0ubuntu18.04.4'
N: Couldn't find any package by regex '3.28.3-0ubuntu18.04.4'
N: Unable to locate package amd64
N: Unable to locate package GNOME
N: Unable to locate package Display
N: Unable to locate package Manager
N: Unable to locate package (shared
N: Unable to locate package library)

Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#3
Revision history for this message
rafting300 (rafting300) said :
#4

"gnome-control-center navigate to Region & Language -> Input Sources. In the header bar, hit the Login Screen toggle button and then choose a keyboard layout from the list"
I don't have a Login Screen toggle button since I have only one system user
but
in terminal localectl command printed this:
System Locale: LANG=en_US.UTF-8
       VC Keymap: us
      X11 Layout: rs
       X11 Model: pc105
     X11 Variant: latin

After applying:
localectl --no-convert set-x11-keymap us pc105

output changed to:
System Locale: LANG=en_US.UTF-8
       VC Keymap: us
      X11 Layout: us
       X11 Model: pc105

After an initial test(restarting and logging out and in a couple of times) it works as expected. I will confirm the problem solved after i give it some time Ideally after system update since the problem first manifested after a system update.

Revision history for this message
rafting300 (rafting300) said :
#5

Thanks actionparsnip, that solved my question.