You are not logged in.
Pages: 1
WM: i3wm
Display Server: Xorg
Keyboard Layout: Colemak
I have a laptop and there is this issue where the internal keyboard maintains its layout but it is randomly changed back to QWERTY for my external keyboard. Sometimes it will change when I am not typing anything for two minutes, sometimes after a system upgrade, sometimes while doing something entirely different, and I have always failed to notice the pattern.
I experience this issue more frequently after having to disable `usbcore.autosuspend` (because it'd keep disconnecting my BT headphones). If I do `localectl status` after my external layout is unintentionally changed, it still, I don't know why, mentions that my layout is Colemak.
I have read the Arch Wiki, some of it. I got to know that it could very well be my X server's doing. I got to know that if I somehow don't specify my keyboard in Xorg configuration file, the results will not be persistent.
So, right now I have two .conf files:
/etc/X11/xorg.conf.d » ls
00-keyboard.conf 01-external-keyboard.conf
/etc/X11/xorg.conf.d » cat *
# 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" "colemak"
EndSection
Section "InputClass"
Identifier "external-keyboard"
MatchIsKeyboard "on"
MatchProduct "USB Keyboard"
MatchVendor "China Resource Semico"
Option "XkbLayout" "us"
Option "XkbModel" "colemak"
EndSectionI have tried my best to figure out what to put in `MatchProduct` and `MatchVendor`. I tried `lsusb` and `evtest` commands: I from these commands tried putting my keyboard's VID and PID and also tried putting two substrings of the output I got from `lsusb` in hope that I understood the documentation of `MatchVendor` and `MatchProduct` correctly:
Bus 002 Device 003: ID 0bda:b008 Realtek Semiconductor Corp. Bluetooth Radio
Bus 002 Device 002: ID 0438:7900 Advanced Micro Devices, Inc. Root Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 05c8:038f Cheng Uei Precision Industry Co., Ltd (Foxlink) HP TrueVision HD
Bus 001 Device 003: ID 10c4:8105 Silicon Labs USB OPTICAL MOUSE
Bus 001 Device 002: ID 0438:7900 Advanced Micro Devices, Inc. Root Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 1a2c:6003 China Resource Semico Co., Ltd USB Keyboard
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubHere you can see `1a2c:6003` -- I suspect this is my external keyboard.
I got the VID and PID from `evtest`:
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x1a2c product 0x6003 version 0x110
Input device name: "SEMICO USB Keyboard"I suspect 0x1a2c is the VID and 0x6003 is the PID.I have tried putting them, but it didn't work. I restart my X server and still face the same issue.
Last edited by myxi (2023-09-27 13:04:19)
Offline
I experience this issue more frequently after having to disable `usbcore.autosuspend` (because it'd keep disconnecting my BT headphones).
You should be able to control the autosuspend per bus or device, https://wiki.archlinux.org/title/Power_ … utosuspend
Input device name: "SEMICO USB Keyboard"
MatchVendor "China Resource Semico"
I have tried my best to figure out blindly guess what to put in `MatchProduct` and `MatchVendor`
![]()
Do you actually need to apply a narrow match?
You can get the device name from "xinput list" or the xorg log, use that for "MatchProduct"
That being said, the config for your internal keyboard is unconditional and should™ capture the external one as well.
Please post your Xorg log, https://wiki.archlinux.org/title/Xorg#General after the layout changed at least once.
Online
Pages: 1