You are not logged in.

#1 2018-10-01 19:11:38

grininmonkey
Member
Registered: 2018-09-29
Posts: 34

[Solved] Keyboard Rate Resets after KVM switching

When using my KVM and returning to my arch system..... I have to re-issue xset when in X or kbdrate if on console to reset to my preferred rates. When returning to system... the keyboard rate is reset to values that are not defined anywhere that I can tell. I have a service file to set kbdrate for console, and xset command in xinitrc which work as expected until I use the KVM to switch to another system.

I suspect there is something which I can take advantage of that detect this KVM activity... as its already changing the preferences, but I am not having much luck finding out where to start looking?

Last edited by grininmonkey (2018-10-02 19:25:26)

Offline

#2 2018-10-01 20:10:19

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: [Solved] Keyboard Rate Resets after KVM switching

I think following these instructions will help when in X.

https://wiki.archlinux.org/index.php/Xo … up_options

And if that doesn't work, it might direct you to what you need to look to set in your "xorg.conf" file.

Here's something similar for the TTY terminal, which would be done with systemd.

https://wiki.archlinux.org/index.php/Li … md_service

Does that help?

(4000 posts!)

Offline

#3 2018-10-01 21:10:17

grininmonkey
Member
Registered: 2018-09-29
Posts: 34

Re: [Solved] Keyboard Rate Resets after KVM switching

Im not clear on where I can specify the Xserver startup options in terms of passing the -ardelay and -arinterval args... but I created an xorg.conf in /etc/X11 after searching for an existing one with no result.

I tried the following entry with no change in result (may have the wrong Driver or Identifier specified?

Section "InputDevice"
	Identifier "Keyboard"
	Driver	"kbd"
	Option "ardelay" "500"
	Option "arinterval" "100"
EndSection

I assumed the Identifier  would be just "Keyboard" based on what I see in Xorg.0.log when I toggle my KVM.... which it indeed appears to be the same result as unplugging and re-plugging the usb devices

[ 33181.177] (II) event5  - Game Keyboard Consumer Control: is tagged by udev as: Keyboard
[ 33181.177] (II) event5  - Game Keyboard Consumer Control: device is a keyboard
[ 33181.177] (II) event5  - Game Keyboard Consumer Control: device removed
[ 33181.223] (II) libinput: Game Keyboard Consumer Control: needs a virtual subdevice
[ 33181.223] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.1/1-4.1:1.1/0003:04B4:F02F.0035/input/input106/event5"
[ 33181.223] (II) XINPUT: Adding extended input device "Game Keyboard Consumer Control" (type: MOUSE, id 12)
[ 33181.223] (**) Option "AccelerationScheme" "none"
[ 33181.223] (**) Game Keyboard Consumer Control: (accel) selected scheme none/0
[ 33181.223] (**) Game Keyboard Consumer Control: (accel) acceleration factor: 2.000
[ 33181.223] (**) Game Keyboard Consumer Control: (accel) acceleration threshold: 4
[ 33181.226] (II) event5  - Game Keyboard Consumer Control: is tagged by udev as: Keyboard
[ 33181.226] (II) event5  - Game Keyboard Consumer Control: device is a keyboard
[ 33181.226] (**) Game Keyboard Consumer Control: Applying InputClass "libinput keyboard catchall"
[ 33181.226] (II) Using input driver 'libinput' for 'Game Keyboard Consumer Control'
[ 33181.226] (**) Game Keyboard Consumer Control: always reports core events
[ 33181.226] (**) Option "Device" "/dev/input/event5"
[ 33181.226] (**) Option "_source" "_driver/libinput"
[ 33181.226] (II) libinput: Game Keyboard Consumer Control: is a virtual subdevice
[ 33181.226] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.1/1-4.1:1.1/0003:04B4:F02F.0035/input/input106/event5"
[ 33181.226] (II) XINPUT: Adding extended input device "Game Keyboard Consumer Control" (type: KEYBOARD, id 13)

But I notice the (accel) selected scheme section and wonder if I need to somehow define a custom keyboard config file somewhere ?

Offline

#4 2018-10-01 23:19:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,836

Re: [Solved] Keyboard Rate Resets after KVM switching

https://wiki.archlinux.org/index.php/Xinit#xserverrc

Please remove that config file.
You may try /etc/X11/xorg.conf.d/11-keyboard.conf

Section "InputClass"
    Identifier          "Keyboard autorepeat"
    MatchIsKeyboard	"yes"
    Option		"AutoRepeat" "500 100"
EndSection

What happens is, that the kvm physically removes and re-adds the keyboard, check "udevadm monitor" on whether you get events. You might then create a udev rule (see the wiki) to act accordingly.

Offline

#5 2018-10-02 18:44:47

grininmonkey
Member
Registered: 2018-09-29
Posts: 34

Re: [Solved] Keyboard Rate Resets after KVM switching

the 11-keyboard.conf file had no impact....  will have to investigate the udev rule route

In the mean time I created an i3 key mapping to restore via xset .....

Offline

#6 2018-10-02 19:17:14

grininmonkey
Member
Registered: 2018-09-29
Posts: 34

Re: [Solved] Keyboard Rate Resets after KVM switching

YES... problem solved using xserverrc by creating a .xserverrc file with the following contents

 exec /usr/bin/X -ardelay 260 -arinterval 15 -nolisten tcp "$@" 

ar commands are in milliseconds where xset interval is in Hz.... so have to remember to do some math, but this works and I really appreciate the guidance!

Offline

Board footer

Powered by FluxBB