Антон, извини, лениво мне тащить xorg-drv-libinput:
у меня тачпады ноутбуков, и дедушки и молодого, работают через synaptics драйвер.
Я вам этого и не предлагал. Главное, что вы меня поняли 

Меня смутило слово libinput в конфиге:
Когда речь идёт о конфигах, я понимаю собеседника буквально. И меня смутило, что нужно воспроизвести в ситуации с libinput драйвером которого и его тоже я тщательно избегаю при подборе Линукс-совместимого железа. Но счёл что в конце-концов дело не в нём, а в опции GrabDevice. И отсюда начал отталкиваться.
Но стоит подвинуть конфиг 20-keyboard-sysv-custom.conf и перегрузиться, как цикличность тут же появляется.
Что значит подвинуть?
Самодельный конфиг
/etc/X11/xorg.conf.d/20-keyboard-sysv-custom.conf
переместил в /root.
У вас какие конфиги в /etc/X11/xorg.conf.d ?
$ ls -1 /etc/X11/xorg.conf.d/*
/etc/X11/xorg.conf.d/10-evdev.conf
/etc/X11/xorg.conf.d/20-keyboard-sysv-custom.conf
/etc/X11/xorg.conf.d/20-synaptics.conf
/etc/X11/xorg.conf.d/20-synaptics.conf.rpmsave
/etc/X11/xorg.conf.d/50-vmmouse.conf
/etc/X11/xorg.conf.d/70-g-pen-560.conf
/etc/X11/xorg.conf.d/70-wizardpen.conf
/etc/X11/xorg.conf.d/90-input-thinkpad.conf
/etc/X11/xorg.conf.d/95-input-keyboard.conf
$ rpm -qf /etc/X11/xorg.conf.d/10-evdev.conf
xorg-drv-evdev-2.10.4-alt2.i586
$ rpm -qf /etc/X11/xorg.conf.d/20-keyboard-sysv-custom.conf
файл /etc/X11/xorg.conf.d/20-keyboard-sysv-custom.conf не принадлежит ни одному из пакетов
$ rpm -qf /etc/X11/xorg.conf.d/20-synaptics.conf
xorg-conf-synaptics-0.3-alt1.noarch
$ rpm -qf /etc/X11/xorg.conf.d/50-vmmouse.conf
xorg-drv-vmmouse-13.1.0-alt3.i586
$ rpm -qf /etc/X11/xorg.conf.d/70-g-pen-560.conf
xorg-drv-wizardpen-0.8.1-alt2.i586
$ rpm -qf /etc/X11/xorg.conf.d/70-wizardpen.conf
xorg-drv-wizardpen-0.8.1-alt2.i586
$ rpm -qf /etc/X11/xorg.conf.d/90-input-thinkpad.conf
xorg-drv-evdev-2.10.4-alt2.i586
$ rpm -qf /etc/X11/xorg.conf.d/95-input-keyboard.conf
xorg-drv-evdev-2.10.4-alt2.i586
$ cat /etc/X11/xorg.conf.d/20-keyboard-sysv-custom.conf
#
# 20-keyboard-sysv-custom.conf
# fix press key Super
#
Section "InputClass"
Identifier "Keyboard Defaults"
MatchIsKeyboard "yes"
# Option "XkbLayout" "us,ru(winkeys)"
# Option "XkbOptions" "terminate:ctrl_alt_bksp,grp:alt_shift_toggle,compose:rwin,grp_led:scroll"
# Option "XkbModel" "pc105"
Option "GrabDevice" "True"
EndSection
#
# END of 20-keyboard-sysv-custom.conf
#
$ cat /etc/X11/xorg.conf.d/95-input-keyboard.conf
Section "InputClass"
Identifier "keyboard"
MatchIsKeyboard "true"
Driver "evdev"
# Option "XkbLayout" "us,ru"
# Option "XkbOptions" "grp:ctrl_shift_toggle,grp:switch,led:num"
EndSection
Я вот сейчас у себя вижу:
rpm -qf /etc/X11/xorg.conf.d/95-input-keyboard.conf
xorg-drv-evdev-2.10.4-alt2.x86_64
cat /etc/X11/xorg.conf.d/95-input-keyboard.conf
Section "InputClass"
Identifier "keyboard"
MatchIsKeyboard "true"
Driver "evdev"
# Option "XkbLayout" "us,ru"
# Option "XkbOptions" "grp:caps_toggle,grp:switch"
EndSection
И не могу понять почему этот конфиг не перекрыл конфиг
cat /etc/X11/xorg.conf.d/60-libinput.conf
...
Section "InputClass"
Identifier "libinput keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
Option "GrabDevice" "True"
EndSection
...
Посмотреть бы в логах Xorg, а через какой драйвер поднялась клавиатура?
У меня:
- libinput драйвер для Xorg удалён и не используется.
- используется драйвер evdev:
# grep -rHin keyboard /var/log/|sed -n '625,639p'
/var/log/Xorg.0.log:223:[ 47.813] (**) AT Translated Set 2 keyboard: Applying InputClass "Keyboard Defaults"
/var/log/Xorg.0.log:224:[ 47.813] (**) AT Translated Set 2 keyboard: Applying InputClass "keyboard"
/var/log/Xorg.0.log:225:[ 47.813] (II) Using input driver 'evdev' for 'AT Translated Set 2 keyboard'
/var/log/Xorg.0.log:226:[ 47.813] (**) AT Translated Set 2 keyboard: always reports core events
/var/log/Xorg.0.log:227:[ 47.813] (**) evdev: AT Translated Set 2 keyboard: Device: "/dev/input/event0"
/var/log/Xorg.0.log:228:[ 47.813] (--) evdev: AT Translated Set 2 keyboard: Vendor 0x1 Product 0x1
/var/log/Xorg.0.log:229:[ 47.813] (--) evdev: AT Translated Set 2 keyboard: Found keys
/var/log/Xorg.0.log:230:[ 47.813] (II) evdev: AT Translated Set 2 keyboard: Configuring as keyboard
/var/log/Xorg.0.log:232:[ 47.813] (II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD, id 9)
/var/log/Xorg.0.log:282:[ 47.863] (**) HP WMI hotkeys: Applying InputClass "evdev keyboard catchall"
/var/log/Xorg.0.log:283:[ 47.864] (**) HP WMI hotkeys: Applying InputClass "evdev keyboard catchall"
/var/log/Xorg.0.log:284:[ 47.864] (**) HP WMI hotkeys: Applying InputClass "Keyboard Defaults"
/var/log/Xorg.0.log:285:[ 47.864] (**) HP WMI hotkeys: Applying InputClass "keyboard"
/var/log/Xorg.0.log:291:[ 47.864] (II) evdev: HP WMI hotkeys: Configuring as keyboard
/var/log/Xorg.0.log:293:[ 47.864] (II) XINPUT: Adding extended input device "HP WMI hotkeys" (type: KEYBOARD, id 11)
По-умолчанию GrabDevice в disable:
$ man evdev|col -bfx|sed -n '161,167p'
Option "GrabDevice" "boolean"
Force a grab on the event device. Doing so will ensure that no
other driver can initialise the same device and it will also
stop the device from sending events to /dev/kbd or
/dev/input/mice. Events from this device will not be sent to
virtual devices (e.g. rfkill or the Macintosh mouse button emu‐
lation). Default: disabled.
При драйвере evdev, чтобы цикличности не было, сделал так:
$ cat /etc/X11/xorg.conf.d/20-keyboard-sysv-custom.conf
#
# 20-keyboard-sysv-custom.conf
# fix press key Super
#
Section "InputClass"
Identifier "Keyboard Defaults"
MatchIsKeyboard "yes"
# Option "XkbLayout" "us,ru(winkeys)"
# Option "XkbOptions" "terminate:ctrl_alt_bksp,grp:alt_shift_toggle,compose:rwin,grp_led:scroll"
# Option "XkbModel" "pc105"
Option "GrabDevice" "True"
EndSection
#
# END of 20-keyboard-sysv-custom.conf
#
$ cat /etc/X11/xorg.conf.d/95-input-keyboard.conf
Section "InputClass"
Identifier "keyboard"
MatchIsKeyboard "true"
Driver "evdev"
# Option "XkbLayout" "us,ru"
# Option "XkbOptions" "grp:ctrl_shift_toggle,grp:switch,led:num"
EndSection
Как понимаю у себя:
- При одном и том же драйвере evdev (libinput для Xorg вынесен из системы), опция GrabDevice в 20-keyboard-sysv-custom.conf указана явно, а в 95-input-keyboard.conf её нет.
Но стоит в 95-input-keyboard.conf добавить
Option "GrabDevice" "False"
как цикличность появится.
Т.е. в моем случае, в системе у драйвера evdev нет конкурента в виде
# find /root/4remove/|grep 'so$\|conf$'
/root/4remove/usr/lib/X11/modules/input/libinput_drv.so
/root/4remove/etc/X11/xorg.conf.d/40-libinput.conf
поэтому True в GrabDevice для evdev достаточно указать один раз. Причём при одном драйвере (только evdev), Identifier у меня разный.
Т.е. мню у себя так:
- Xorg у меня смотрит и туда и туда, знает что драйвер один и тот же (в одном конфиге он указан, в другом нет, но по-дефолту), видит "GrabDevice" "True" и активирует эту опцию для evdev.
Я вот сейчас у себя вижу:
rpm -qf /etc/X11/xorg.conf.d/95-input-keyboard.conf
xorg-drv-evdev-2.10.4-alt2.x86_64
cat /etc/X11/xorg.conf.d/95-input-keyboard.conf
Section "InputClass"
Identifier "keyboard"
MatchIsKeyboard "true"
Driver "evdev"
# Option "XkbLayout" "us,ru"
# Option "XkbOptions" "grp:caps_toggle,grp:switch"
EndSection
И не могу понять почему этот конфиг не перекрыл конфиг
cat /etc/X11/xorg.conf.d/60-libinput.conf
...
Section "InputClass"
Identifier "libinput keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
Option "GrabDevice" "True"
EndSection
...
( ?? ) Потому что для драйвера libinput, опция "GrabDevice" "True" в 60-libinput.conf указана явно.
Тут видится так (ИМХО):
$ man evdev|col -bfx|sed -n '161,167p' # (костыльный перевод)
Опция "GrabDevice" "boolean"
Принудительно захватить события на устройстве.
Это позволит гарантировать, что ни один другой драйвер не сможет инициализировать одно и то же устройство, а также не сможет отправлять события в /dev/kbd или /dev/input/mice. События с этого устройства не будут отправляться на виртуальные устройства (например, rfkill или эмуляция кнопки мыши Macintosh). По умолчанию: отключено.
Антон, а за подсказку опции GrabDevice, спасибо.