[SOLVED] Wrong keyboard layout after upgrading to 21.3

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
User avatar
Tedpac
Level 1
Level 1
Posts: 5
Joined: Wed Nov 15, 2023 8:35 pm

[SOLVED] Wrong keyboard layout after upgrading to 21.3

Post by Tedpac »

I upgraded Linux Mint to 21.3 and noticed my keyboard layout was wrong, so I checked the settings but the correct keyboard layout (Latin American Spanish) was there (I don't have more keyboard layouts added), so I removed this keyboard layout and added it back, which solved the problem, but after I restarted my system I inmediately noticed that the special symbols were wrong again, so I have to do the same fix everytime I restart my system.

This is the wrong keyboard layout (the one at system startup):

Image

And this is the correct keyboard layout (the one that is set after I delete and re-add the keyboard layout):

Image

In many posts they recommend using the following command, but this didn't work for me:

Code: Select all

sudo dpkg-reconfigure keyboard-configuration
There is something that I think is key to mention: on the login page I can use special symbols without any problems.

Finally, this is my system information:

Code: Select all

System:
  Kernel: 5.15.0-91-generic x86_64 bits: 64 compiler: gcc v: 11.4.0 Desktop: Cinnamon 6.0.4
    tk: GTK 3.24.33 wm: muffin vt: 7 dm: LightDM 1.30.0 Distro: Linux Mint 21.3 Virginia
    base: Ubuntu 22.04 jammy
Machine:
  Type: Desktop Mobo: ASUSTeK model: TUF Z370-PLUS GAMING v: Rev X.0x serial: <superuser required>
    UEFI: American Megatrends v: 0410 date: 09/25/2017
Battery:
  Device-1: hidpp_battery_0 model: Logitech Wireless Keyboard serial: <filter>
    charge: 55% (should be ignored) rechargeable: yes status: Discharging
CPU:
  Info: 6-core model: Intel Core i5-8400 bits: 64 type: MCP smt: <unsupported> arch: Coffee Lake
    rev: A cache: L1: 384 KiB L2: 1.5 MiB L3: 9 MiB
  Speed (MHz): avg: 2263 high: 3835 min/max: 800/4000 cores: 1: 1152 2: 800 3: 1362 4: 3340
    5: 3835 6: 3091 bogomips: 33599
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: NVIDIA GP107 [GeForce GTX 1050 Ti] vendor: Micro-Star MSI driver: nvidia v: 535.146.02
    pcie: speed: 8 GT/s lanes: 16 ports: active: none off: DP-1,HDMI-A-1 empty: DVI-D-1
    bus-ID: 01:00.0 chip-ID: 10de:1c82 class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.4 driver: X: loaded: nvidia
    unloaded: fbdev,modesetting,nouveau,vesa gpu: nvidia display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x1080 s-dpi: 101 s-size: 966x272mm (38.0x10.7") s-diag: 1004mm (39.5")
  Monitor-1: DP-1 pos: right res: 1920x1080 hz: 60 dpi: 102 size: 477x268mm (18.8x10.6")
    diag: 547mm (21.5")
  Monitor-2: HDMI-0 pos: primary,left res: 1920x1080 hz: 60 dpi: 102
    size: 477x268mm (18.8x10.6") diag: 547mm (21.5")
  OpenGL: renderer: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 535.146.02
    direct render: Yes
Audio:
  Device-1: Intel 200 Series PCH HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel
    bus-ID: 00:1f.3 chip-ID: 8086:a2f0 class-ID: 0403
  Device-2: NVIDIA GP107GL High Definition Audio vendor: Micro-Star MSI driver: snd_hda_intel
    v: kernel pcie: speed: 8 GT/s lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:0fb9 class-ID: 0403
  Device-3: Razer USA Seiren Mini type: USB driver: hid-generic,snd-usb-audio,usbhid
    bus-ID: 3-2:2 chip-ID: 1532:0531 class-ID: 0300 serial: <filter>
  Sound Server-1: ALSA v: k5.15.0-91-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Intel Ethernet I219-V vendor: ASUSTeK driver: e1000e v: kernel port: N/A
    bus-ID: 00:1f.6 chip-ID: 8086:15b8 class-ID: 0200
  IF: enp0s31f6 state: down mac: <filter>
  Device-2: Intel Wi-Fi 6 AX210/AX211/AX411 160MHz driver: iwlwifi v: kernel pcie: speed: 5 GT/s
    lanes: 1 bus-ID: 05:00.0 chip-ID: 8086:2725 class-ID: 0280
  IF: wlp5s0 state: up mac: <filter>
  IF-ID-1: br-1f3a45525eef state: down mac: <filter>
  IF-ID-2: docker0 state: up speed: 10000 Mbps duplex: unknown mac: <filter>
  IF-ID-3: tun0 state: unknown speed: 10 Mbps duplex: full mac: N/A
  IF-ID-4: vethcd1c3d1 state: up speed: 10000 Mbps duplex: full mac: <filter>
  IF-ID-5: vethe7a9a78 state: up speed: 10000 Mbps duplex: full mac: <filter>
  IF-ID-6: virbr0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel AX210 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 1-14:5 chip-ID: 8087:0032
    class-ID: e001
  Report: hciconfig ID: hci0 rfk-id: 2 state: down bt-service: enabled,running rfk-block:
    hardware: no software: yes address: <filter>
Drives:
  Local Storage: total: 7.28 TiB used: 1.58 TiB (21.7%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO Plus 1TB size: 931.51 GiB
    speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: 2B2QEXM7 temp: 48.9 C scheme: GPT
  ID-2: /dev/nvme1n1 vendor: Samsung model: SSD 970 EVO Plus 1TB size: 931.51 GiB
    speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: 2B2QEXM7 temp: 57.9 C scheme: GPT
  ID-3: /dev/sda vendor: Western Digital model: WD60EZAZ-00SF3B0 size: 5.46 TiB speed: 6.0 Gb/s
    type: HDD rpm: 5400 serial: <filter> rev: 0A80 scheme: GPT
Partition:
  ID-1: / size: 915.81 GiB used: 297.03 GiB (32.4%) fs: ext4 dev: /dev/nvme1n1p2
  ID-2: /boot/efi size: 96 MiB used: 34.9 MiB (36.4%) fs: vfat dev: /dev/nvme0n1p1
Swap:
  ID-1: swap-1 type: file size: 4 GiB used: 0 KiB (0.0%) priority: -2 file: /swapfile
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 16 rev: 2.0 speed: 480 Mb/s
    chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-10:2 info: HP OMEN by HP Mouse 400 type: Mouse,Keyboard driver: hid-generic,usbhid
    interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 500mA chip-ID: 03f0:2341 class-ID: 0301
  Device-2: 1-11:3 info: Logitech Unifying Receiver type: Keyboard,Mouse
    driver: logitech-djreceiver,usbhid interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 98mA
    chip-ID: 046d:c534 class-ID: 0301
  Device-3: 1-14:5 info: Intel AX210 Bluetooth type: Bluetooth driver: btusb interfaces: 2
    rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 8087:0032 class-ID: e001
  Hub-2: 2-0:1 info: Super-speed hub ports: 10 rev: 3.0 speed: 5 Gb/s chip-ID: 1d6b:0003
    class-ID: 0900
  Hub-3: 3-0:1 info: Hi-speed hub with single TT ports: 2 rev: 2.0 speed: 480 Mb/s
    chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 3-2:2 info: Razer USA Seiren Mini type: Audio,HID
    driver: hid-generic,snd-usb-audio,usbhid interfaces: 3 rev: 1.1 speed: 12 Mb/s power: 100mA
    chip-ID: 1532:0531 class-ID: 0300 serial: <filter>
  Hub-4: 4-0:1 info: Super-speed hub ports: 2 rev: 3.1 speed: 10 Gb/s chip-ID: 1d6b:0003
    class-ID: 0900
Sensors:
  System Temperatures: cpu: 29.8 C mobo: 27.8 C gpu: nvidia temp: 60 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Repos:
  Packages: 3116 apt: 3090 flatpak: 26
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/additional-repositories.list
    1: deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https: //download.virtualbox.org/virtualbox/debian jammy contrib
  Active apt repos in: /etc/apt/sources.list.d/deadsnakes-ppa-jammy.list
    1: deb [arch=amd64 signed-by=/etc/apt/keyrings/deadsnakes-ppa-jammy.gpg] https: //ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy main
  Active apt repos in: /etc/apt/sources.list.d/docker.list
    1: deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https: //download.docker.com/linux/ubuntu jammy stable
  Active apt repos in: /etc/apt/sources.list.d/google-chrome.list
    1: deb [arch=amd64] https: //dl.google.com/linux/chrome/deb/ stable main
  Active apt repos in: /etc/apt/sources.list.d/kopia.list
    1: deb [signed-by=/etc/apt/keyrings/kopia-keyring.gpg] http: //packages.kopia.io/apt/ stable main
  Active apt repos in: /etc/apt/sources.list.d/microsoft-edge.list
    1: deb [arch=amd64] https: //packages.microsoft.com/repos/edge/ stable main
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
    1: deb http: //packages.linuxmint.com virginia main upstream import backport
    2: deb http: //archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
    3: deb http: //archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
    4: deb http: //archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
    5: deb http: //security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
  Active apt repos in: /etc/apt/sources.list.d/phoerious-keepassxc-jammy.list
    1: deb [signed-by=/etc/apt/keyrings/phoerious-keepassxc-jammy.gpg] https: //ppa.launchpadcontent.net/phoerious/keepassxc/ubuntu jammy main
  Active apt repos in: /etc/apt/sources.list.d/steam-stable.list
    1: deb [arch=amd64,i386 signed-by=/usr/share/keyrings/steam.gpg] https: //repo.steampowered.com/steam/ stable steam
    2: deb-src [arch=amd64,i386 signed-by=/usr/share/keyrings/steam.gpg] https: //repo.steampowered.com/steam/ stable steam
  Active apt repos in: /etc/apt/sources.list.d/teamviewer.list
    1: deb [signed-by=/usr/share/keyrings/teamviewer-keyring.gpg] https: //linux.teamviewer.com/deb stable main
  Active apt repos in: /etc/apt/sources.list.d/vscode.list
    1: deb [arch=amd64,arm64,armhf] http: //packages.microsoft.com/repos/code stable main
Info:
  Processes: 318 Uptime: 17m wakeups: 2 Memory: 15.55 GiB used: 3.01 GiB (19.3%) Init: systemd
  v: 249 runlevel: 5 Compilers: gcc: 11.4.0 alt: 11/12/9 Client: Cinnamon v: 6.0.4 inxi: 3.3.13
Last edited by Tedpac on Mon Jan 29, 2024 2:41 am, edited 1 time in total.
surreal
Level 1
Level 1
Posts: 2
Joined: Tue Jan 23, 2024 1:47 pm

Re: Wrong keyboard layout after upgrading to 21.3

Post by surreal »

Confirmed in my case.

I have a Dell XPS-13.

The only way to get the layout right is to open the keyboard layout from the menu and select a dummy layout (I have afghan for that). Once this is done, the keyboard selection systray icon appears again, and then I can switch back to the correct layout from there.
surreal
Level 1
Level 1
Posts: 2
Joined: Tue Jan 23, 2024 1:47 pm

Re: Wrong keyboard layout after upgrading to 21.3

Post by surreal »

More precisely, I found out that the keyboard layout is applied if I do the following:
1) open Keyboard preferences
2) pick a layout and move it up or down - then the keyboard systray icon appears
User avatar
Tedpac
Level 1
Level 1
Posts: 5
Joined: Wed Nov 15, 2023 8:35 pm

Re: Wrong keyboard layout after upgrading to 21.3

Post by Tedpac »

You are right, @surreal, when you add an "auxiliary keyboard layout" the keyboard layouts icon will appear on the panel (as expected), but at the next restart this icon will disappear, so for the icon to reappear you have to go back to the keyboard settings and delete and re-add the "auxiliary keyboard layout" or change the order of the keyboard layouts. In conclusion, this is another additional problem brought by the upgrade: the icon of the keyboard layouts in the panel disappears on system restart.

This is certainly a very annoying problem and unfortunately I am thinking of using a Timeshift backup to revert the upgrade :( , as I have no idea what to do to solve at least the problem I initially presented.
User avatar
Tedpac
Level 1
Level 1
Posts: 5
Joined: Wed Nov 15, 2023 8:35 pm

Re: Wrong keyboard layout after upgrading to 21.3

Post by Tedpac »

I found the problem! :)

I happen to have IBus installed (if I remember correctly, I installed it to be able to use accents in my language in a specific application), but most probably with the upgrade the preferences I had for IBus were lost, and one of them was "Use system keyboard layout" (you have to check it), which is located in the "Advanced" tab of the IBus preferences. With this my keyboard layout is preserved between system restarts. The IBus preferences can be found by typing "IBus" in the search bar of the desktop menu.

Greetings to all.
blackdog
Level 1
Level 1
Posts: 4
Joined: Tue Apr 11, 2023 10:44 am

Re: [SOLVED] Wrong keyboard layout after upgrading to 21.3

Post by blackdog »

Thank you so much for mentioning this, I had the same problem, and there is no way I would have remembered about ibus.. that I must have installed years ago.
Post Reply

Return to “Cinnamon”