[arch-general] Weird glitch with X keymap
Like the subject says I have stumbled upon a weird glitch with X keymap. The TL;DR version is the keymap on a usb keyboard that I have connected to my laptop is wrong until I press any key on my laptop's keyboard. I have a workaround in place but I would like to fix this properly. Now the long version. I am configuring X's keymap with /etc/X11/xorg.conf.d/00-keymap.conf, which contains: Section "InputClass" Identifier "Keyboard Defaults" MatchIsKeyboard "yes" Option "XkbLayout" "pt" Option "XkbOptions" "terminate:ctrl_alt_bksp" EndSection I'm using XFCE and it should not be messing with the keyboard configuration, the keyboard configuration utility is set to "Use system defaults". If I'm using only my laptop's built-in keyboard this works as expected and the pt keymap is (or seems to be) properly set as soon as XFCE starts. Now I have a usb mouse/keyboard combo (Logitech MK520) connected to the laptop, as I have put the laptop to the side to use a larger monitor. The weird problem manifests itself when starting XFCE either if starting XFCE with the keyboard already plugged in or if I plug the keyboard after start XFCE. If I start XFCE and use the laptop's keyboard first, the keymap is correct. If I start XFCE and use the usb keyboard first, the keymap is wrong, as far as I can tell it seems to be using the us keymap. If I start XFCE and press any key on laptop's keyboard before using the usb keyboard, then the keymap on the usb keyboard is correct. I have looked through X's logs and nothing seems to be out of place and the pt layout is the only thing that is present in the logs, there is no mention to the us layout. The output of 'setxkbmap -query -v' is the same before and after pressing any key on the laptop's keyboard to "fix" the problem with the usb keyboard. There is nothing on the journal or dmesg that might point to the problem. The workaround I have in place is using running 'setxkbmap pt' automatically (via autostart) after I start XFCE, in this case things work as they should. Google did not help with this and the is nothing on the wiki about this weird problem. Has anyone seen this behavior before? Any ideas on how I can properly fix this? -- Mauro Santos
Out of curiosity: you plug the keyboard receiver in after you start X, don't you?
On 28-08-2015 12:35, Neven Sajko wrote:
Out of curiosity: you plug the keyboard receiver in after you start X, don't you? .
It doesn't matter if I have it plugged before starting X or if I plug it after starting X, like I said in the long description ;) -- Mauro Santos
On 28 August 2015 at 14:54, Mauro Santos <registo.mailling@gmail.com> wrote:
On 28-08-2015 12:35, Neven Sajko wrote:
Out of curiosity: you plug the keyboard receiver in after you start X, don't you? .
It doesn't matter if I have it plugged before starting X or if I plug it after starting X, like I said in the long description ;)
-- Mauro Santos
Oh, OK, thx.
Thanks for the ping. See below ... ;) On 28 August 2015 at 12:34, Mauro Santos <registo.mailling@gmail.com> wrote:
Like the subject says I have stumbled upon a weird glitch with X keymap.
The TL;DR version is the keymap on a usb keyboard that I have connected to my laptop is wrong until I press any key on my laptop's keyboard. I have a workaround in place but I would like to fix this properly.
https://bugs.freedesktop.org/show_bug.cgi?id=49950#c4 The patch I made and attached to the bug fixed the problem. I send it once to xorg-devel, talked to Peter Hutterer, barely remember that it broke tests and totally lost track of it. Though, I can't find a mail (anymore) stating that it broke tests. Peter, do you?
On 28-08-2015 12:57, Daniel Martin wrote:
Thanks for the ping. See below ... ;)
You're welcome :)
https://bugs.freedesktop.org/show_bug.cgi?id=49950#c4
The patch I made and attached to the bug fixed the problem.
I send it once to xorg-devel, talked to Peter Hutterer, barely remember that it broke tests and totally lost track of it. Though, I can't find a mail (anymore) stating that it broke tests. Peter, do you?
Now that is an old bug, I suppose these days quite a good number of people might be affected by this, I'm surprise not more people complain. I had seen this bug before on archlinuxarm using just the one keyboard/mouse combo but I thought it was some quirk of the arm side of things. If I'm remembering correctly I worked around it by forcing the layout on XFCE's keyboard layout config utility but it didn't work now with the laptop. I'll give it a few days and see if there is any change, someone already complained a couple days ago, otherwise: squeaky wheel approach :p -- Mauro Santos
Fri, 28 Aug 2015 11:34:24 +0100 Mauro Santos <registo.mailling@gmail.com>:
The TL;DR version is the keymap on a usb keyboard that I have connected to my laptop is wrong until I press any key on my laptop's keyboard.
After reading the rest of this thread (and the Xorg bug) I think I'm affected too (PS/2 keyboard though). I'm running KDE/Plasma with SDDM as login manager, and after bootup or session logout the keyboard layout indicator always shows an US flag. When I press the first key of my password it immediately switches to DE. Always wondered why, even though I never considered it a problem. --byte
On 28-08-2015 18:37, Jens Adam wrote:
I'm running KDE/Plasma with SDDM as login manager, and after bootup or session logout the keyboard layout indicator always shows an US flag. When I press the first key of my password it immediately switches to DE. Always wondered why, even though I never considered it a problem.
I'd say you are not affected and what you are seeing is the expected behavior. In my case, if the first keyboard I use is the usb keyboard then the layout never changes to the correct one, regardless of which/how many keys I press on the usb keyboard. I'd say ps/2 keyboards and "normal" usb keyboards are not affected. -- Mauro Santos
participants (4)
-
Daniel Martin
-
Jens Adam
-
Mauro Santos
-
Neven Sajko