Keyboard layout gets set to estonian

Hi,

on my laptop with manjaro sway, the keyboard layout gets set to “ee” (estonian) every time at boot, even though I have

input type:keyboard {
         xkb_layout "de,no"
 } 

in my config file. I looked into the sway log and it first sets the layout correctly, but then the following line shows up:

00:00:00.215 [INFO] [sway/commands.c:258] Handling command 'input type:keyboard xkb_layout  ee'

Does anyone have an idea what is going on here? The problem persists since yesterday.
Thanks!

It might be something simple like adding quotation marks around type:keyboard

The man page is your friend: sway-input(5) — Arch manual pages

thanks for the hint!
The quotation marks do not help though and the man page doesn’t provide any help either.
The problem rather seems to be that the layout setting is first correctly applied, but then something else sets it to estonian… Any chance to figure out what is causing it from the log?

Here is the a part of the log:

00:00:00.000 [INFO] [sway/main.c:343] Sway version 1.7
00:00:00.000 [INFO] [sway/main.c:344] wlroots version 0.15.1
00:00:00.002 [INFO] [sway/main.c:120] Linux marius-p1 5.15.76-1-MANJARO #1 SMP PREEMPT Sat Oct 29 14:22:16 UTC 2022 x86_64 GNU/Linux
00:00:00.002 [INFO] [sway/main.c:136] Contents of /etc/lsb-release:
00:00:00.002 [INFO] [sway/main.c:120] DISTRIB_ID=ManjaroLinux
00:00:00.002 [INFO] [sway/main.c:120] DISTRIB_RELEASE=22.0.0
00:00:00.002 [INFO] [sway/main.c:120] DISTRIB_CODENAME=Sikaris
00:00:00.002 [INFO] [sway/main.c:120] DISTRIB_DESCRIPTION="Manjaro Linux"
00:00:00.002 [INFO] [sway/main.c:136] Contents of /etc/os-release:
00:00:00.002 [INFO] [sway/main.c:120] NAME="Manjaro Linux"
00:00:00.002 [INFO] [sway/main.c:120] PRETTY_NAME="Manjaro Linux"
00:00:00.002 [INFO] [sway/main.c:120] ID=manjaro
00:00:00.002 [INFO] [sway/main.c:120] ID_LIKE=arch
00:00:00.002 [INFO] [sway/main.c:120] BUILD_ID=rolling
00:00:00.002 [INFO] [sway/main.c:120] ANSI_COLOR="32;1;24;144;200"
00:00:00.002 [INFO] [sway/main.c:120] HOME_URL="https://manjaro.org/"
00:00:00.002 [INFO] [sway/main.c:120] DOCUMENTATION_URL="https://wiki.manjaro.org/"
00:00:00.002 [INFO] [sway/main.c:120] SUPPORT_URL="https://forum.manjaro.org/"
00:00:00.002 [INFO] [sway/main.c:120] BUG_REPORT_URL="https://docs.manjaro.org/reporting-bugs/"
00:00:00.002 [INFO] [sway/main.c:120] PRIVACY_POLICY_URL="https://manjaro.org/privacy-policy/"
00:00:00.002 [INFO] [sway/main.c:120] LOGO=manjarolinux
00:00:00.002 [INFO] [sway/main.c:108] LD_LIBRARY_PATH=
00:00:00.002 [INFO] [sway/main.c:108] LD_PRELOAD=
00:00:00.002 [INFO] [sway/main.c:108] PATH=/home/marius/miniconda3/bin:/home/marius/miniconda3/condabin:PATH_TO_CONDA_INSTALL/bin:/home/marius/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
00:00:00.002 [INFO] [sway/main.c:108] SWAYSOCK=/run/user/1000/sway-ipc.1000.1660.sock
00:00:00.002 [DEBUG] [sway/server.c:50] Preparing Wayland server initialization
00:00:00.002 [INFO] [wlr] [backend/wayland/backend.c:531] Creating wayland backend

....

00:00:00.038 [DEBUG] [sway/commands.c:429] Subcommand: bg ~/Pictures/Wallpaper/79-DSC_4289.jpg fill
00:00:00.038 [DEBUG] [sway/config/output.c:214] Merging on top of existing output config
00:00:00.038 [DEBUG] [sway/config/output.c:237] Config stored for output * (enabled: -1) (-1x-1@-1.000000Hz position -1,-1 scale -1.000000 subpixel unknown transform -1) (bg /home/marius/Pictures/Wallpaper/79-DSC_4289.jpg fill) (dpms 0) (max render time: -1)
00:00:00.038 [DEBUG] [sway/config/output.c:880] spawn_swaybg cmd[0] = swaybg
00:00:00.038 [DEBUG] [sway/config/output.c:880] spawn_swaybg cmd[1] = -o
00:00:00.038 [DEBUG] [sway/config/output.c:880] spawn_swaybg cmd[2] = *
00:00:00.038 [DEBUG] [sway/config/output.c:880] spawn_swaybg cmd[3] = -i
00:00:00.038 [DEBUG] [sway/config/output.c:880] spawn_swaybg cmd[4] = /home/marius/Pictures/Wallpaper/79-DSC_4289.jpg
00:00:00.038 [DEBUG] [sway/config/output.c:880] spawn_swaybg cmd[5] = -m
00:00:00.038 [DEBUG] [sway/config/output.c:880] spawn_swaybg cmd[6] = fill
2022-11-03 15:00:00 - [swaybg/main.c:582] wl_display_roundtrip failed
00:00:00.039 [DEBUG] [sway/config.c:824] Read line 35: 
00:00:00.039 [DEBUG] [sway/config.c:824] Read line 36: input "type:keyboard" {
00:00:00.039 [DEBUG] [sway/config.c:878] Entering block 'input "type:keyboard"'
00:00:00.039 [DEBUG] [sway/config.c:824] Read line 37:          xkb_layout "de,no"
00:00:00.039 [INFO] [sway/commands.c:378] Config command: input "type:keyboard" xkb_layout "de,no"
00:00:00.039 [INFO] [sway/commands.c:398] After replacement: input "type:keyboard" xkb_layout "de,no"
00:00:00.039 [DEBUG] [sway/commands/input.c:54] entering input block: type:keyboard
00:00:00.039 [DEBUG] [sway/config/input.c:15] new_input_config(type:keyboard)
00:00:00.039 [DEBUG] [sway/commands.c:429] Subcommand: xkb_layout de,no
00:00:00.039 [DEBUG] [sway/commands/input/xkb_layout.c:18] set-xkb_layout for config: type:keyboard layout: de,no
00:00:00.039 [DEBUG] [sway/config/input.c:15] new_input_config(temp)
00:00:00.041 [DEBUG] [sway/config/input.c:350] Config stored for input type:keyboard
00:00:00.041 [DEBUG] [sway/config.c:824] Read line 38:  } 
00:00:00.041 [DEBUG] [sway/config.c:895] Exiting block 'input "type:keyboard"'
00:00:00.041 [DEBUG] [sway/config.c:824] Read line 39: 
00:00:00.041 [DEBUG] [sway/config.c:824] Read line 40: input "type:touchpad" {
00:00:00.041 [DEBUG] [sway/config.c:878] Entering block 'input "type:touchpad"'
00:00:00.041 [DEBUG] [sway/config.c:824] Read line 41:     dwt enabled
00:00:00.041 [INFO] [sway/commands.c:378] Config command: input "type:touchpad" dwt enabled
00:00:00.041 [INFO] [sway/commands.c:398] After replacement: input "type:touchpad" dwt enabled
00:00:00.041 [DEBUG] [sway/commands/input.c:54] entering input block: type:touchpad
00:00:00.041 [DEBUG] [sway/config/input.c:15] new_input_config(type:touchpad)
00:00:00.041 [DEBUG] [sway/commands.c:429] Subcommand: dwt enabled
00:00:00.041 [DEBUG] [sway/config/input.c:15] new_input_config(temp)
00:00:00.043 [DEBUG] [sway/config/input.c:350] Config stored for input type:touchpad
00:00:00.043 [DEBUG] [sway/config.c:824] Read line 42:     tap enabled
00:00:00.043 [INFO] [sway/commands.c:378] Config command: input "type:touchpad" tap enabled
00:00:00.043 [INFO] [sway/commands.c:398] After replacement: input "type:touchpad" tap enabled
00:00:00.043 [DEBUG] [sway/commands/input.c:54] entering input block: type:touchpad
00:00:00.043 [DEBUG] [sway/config/input.c:15] new_input_config(type:touchpad)
00:00:00.043 [DEBUG] [sway/commands.c:429] Subcommand: tap enabled
00:00:00.043 [DEBUG] [sway/config/input.c:15] new_input_config(temp)
00:00:00.044 [DEBUG] [sway/config/input.c:350] Config stored for input type:touchpad
00:00:00.044 [DEBUG] [sway/config.c:824] Read line 43:     middle_emulation enabled
00:00:00.044 [INFO] [sway/commands.c:378] Config command: input "type:touchpad" middle_emulation enabled
00:00:00.044 [INFO] [sway/commands.c:398] After replacement: input "type:touchpad" middle_emulation enabled
00:00:00.044 [DEBUG] [sway/commands/input.c:54] entering input block: type:touchpad
00:00:00.044 [DEBUG] [sway/config/input.c:15] new_input_config(type:touchpad)
00:00:00.044 [DEBUG] [sway/commands.c:429] Subcommand: middle_emulation enabled
00:00:00.044 [DEBUG] [sway/config/input.c:15] new_input_config(temp)
00:00:00.045 [DEBUG] [sway/config/input.c:350] Config stored for input type:touchpad
00:00:00.045 [DEBUG] [sway/config.c:824] Read line 44:     natural_scroll enabled
00:00:00.045 [INFO] [sway/commands.c:378] Config command: input "type:touchpad" natural_scroll enabled
00:00:00.045 [INFO] [sway/commands.c:398] After replacement: input "type:touchpad" natural_scroll enabled
00:00:00.045 [DEBUG] [sway/commands/input.c:54] entering input block: type:touchpad

...

[2022-11-03 15:00:00.679] [info] Using configuration file /usr/share/sway/templates/waybar/config.jsonc
[2022-11-03 15:00:00.679] [info] Using CSS file /usr/share/sway/templates/waybar/style.css
Cannot register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject
00:00:00.204 [DEBUG] [sway/ipc-server.c:153] Event on IPC listening socket
00:00:00.204 [DEBUG] [sway/ipc-server.c:199] New client: fd 62
00:00:00.205 [DEBUG] [sway/ipc-server.c:153] Event on IPC listening socket
00:00:00.205 [DEBUG] [sway/ipc-server.c:199] New client: fd 46
00:00:00.205 [DEBUG] [sway/ipc-server.c:153] Event on IPC listening socket
00:00:00.205 [DEBUG] [sway/ipc-server.c:199] New client: fd 64
00:00:00.205 [DEBUG] [sway/ipc-server.c:219] Client 46 readable
00:00:00.205 [DEBUG] [sway/ipc-server.c:958] Added IPC reply of type 0x2 to client 46 queue: {"success": true}
00:00:00.205 [DEBUG] [sway/ipc-server.c:219] Client 64 readable
00:00:00.205 [INFO] [sway/commands.c:258] Handling command 'input type:keyboard xkb_layout  ee'
00:00:00.205 [DEBUG] [sway/commands/input.c:54] entering input block: type:keyboard
00:00:00.205 [DEBUG] [sway/config/input.c:15] new_input_config(type:keyboard)
00:00:00.205 [DEBUG] [sway/commands.c:429] Subcommand: xkb_layout ee
00:00:00.205 [DEBUG] [sway/commands/input/xkb_layout.c:18] set-xkb_layout for config: type:keyboard layout: ee
00:00:00.205 [DEBUG] [sway/config/input.c:15] new_input_config(temp)
00:00:00.207 [DEBUG] [sway/config/input.c:350] Config stored for input type:keyboard
00:00:00.210 [DEBUG] [sway/input/keyboard.c:825] Removing keyboard 0:0:wayland-keyboard-seat from group 0x558d71a31120
00:00:00.210 [DEBUG] [sway/input/keyboard.c:831] Destroying empty keyboard group 0x558d71a31120
00:00:00.211 [DEBUG] [sway/input/keyboard.c:937] Created keyboard group 0x558d71d17420
00:00:00.211 [DEBUG] [sway/input/keyboard.c:960] Adding keyboard 0:0:wayland-keyboard-seat to group 0x558d71d17420
00:00:00.212 [DEBUG] [sway/ipc-server.c:958] Added IPC reply of type 0x0 to client 64 queue: [ { "success": true } ]
00:00:00.212 [DEBUG] [sway/ipc-server.c:535] Client 46 writable
00:00:00.213 [DEBUG] [sway/ipc-server.c:535] Client 64 writable
[
  {
    "success": true
  }
]
00:00:00.213 [DEBUG] [sway/ipc-server.c:214] Client 64 hung up
00:00:00.213 [INFO] [sway/ipc-server.c:565] IPC Client 64 disconnected
00:00:00.220 [DEBUG] [wlr] [render/swapchain.c:105] Allocating new swapchain buffer
00:00:00.221 [DEBUG] [wlr] [render/allocator/gbm.c:140] Allocated 1265x1388 GBM buffer (format 0x34325258, modifier 0x100000000000008)
00:00:00.221 [DEBUG] [wlr] [render/gles2/renderer.c:142] Created GL FBO for buffer 1265x1388
basic_string::_M_create
00:00:00.226 [DEBUG] [sway/ipc-server.c:153] Event on IPC listening socket
00:00:00.226 [DEBUG] [sway/ipc-server.c:199] New client: fd 54
00:00:00.226 [DEBUG] [sway/ipc-server.c:153] Event on IPC listening socket
00:00:00.226 [DEBUG] [sway/ipc-server.c:199] New client: fd 56
00:00:00.226 [DEBUG] [sway/ipc-server.c:219] Client 56 readable
00:00:00.226 [DEBUG] [sway/ipc-server.c:958] Added IPC reply of type 0x2 to client 56 queue: {"success": true}
00:00:00.226 [DEBUG] [sway/ipc-server.c:535] Client 56 writable
00:00:00.226 [DEBUG] [sway/ipc-server.c:219] Client 54 readable
00:00:00.226 [DEBUG] [sway/ipc-server.c:958] Added IPC reply of type 0x1 to client 54 queue: [ { "id": 4, "type": "workspace", "orientation": "horizontal", "percent": null, "urgent": false, "marks": [ ], "layout": "splith", "border": "none", "current_border_width": 0, "rect": { "x": 10, "y": 10, "width": 1245, "height": 1368 }, "deco_rect": { "x": 0, "y": 0, "width": 0, "height": 0 }, "window_rect": { "x": 0, "y": 0, "width": 0, "height": 0 }, "geometry": { "x": 0, "y": 0, "width": 0, "height": 0 }, "name": "1", "window": null, "nodes": [ ], "floating_nodes": [ ], "focus": [ ], "fullscreen_mode": 1, "sticky": false, "num": 1, "output": "WL-1", "representation": null, "focused": true, "visible": true } ]
00:00:00.226 [DEBUG] [sway/ipc-server.c:535] Client 54 writable
....

I wonder if you have to have the type:keyboard. I have replaced it by an asterisk (*) instead and it works.
Just so you have something to compare to. Here is a part of my config

	input * {
	xkb_layout "se,de,gb"
	xkb_variant ,nodeadkeys
	xkb_options grp:ctrls_toggle 
}

I tried with the asterix, but it still gives the same result. Looking at the log, especially

00:00:00.205 [INFO] [sway/commands.c:258] Handling command 'input type:keyboard xkb_layout  ee'

makes me think that my config is fine, but something else causes the layout change at a later stage, but I don’t know what :thinking:

Did you solve it or shall we take a look at your config-file again?

1 Like