Como posso definir a taxa de repetição do teclado USB com o udev?

4

Como posso fazer com que a taxa de repetição do meu teclado seja aplicada a um teclado USB hotplugged?

Eu fiz uma regra do udev para definir o atraso e taxa de repetição do teclado, /etc/udev/rules.d/99-usb-keyboard.rules com o seguinte conteúdo:

ACTION=="add", SUBSYSTEM=="usb", RUN+="/home/michael/bin/keyboard_settings.sh"

keyboard_settings.sh:

#!/bin/bash

# Set keyboard repeat delay and rate
xset -display :0.0 r rate 250 40

O udev parece ver isso, usando o comando udevadm test /sys/bus/usb/devices/3-2\:1.0/

read rules file: /etc/udev/rules.d/99-usb-keyboard.rules
rules contain 393216 bytes tokens (32768 * 12 bytes), 37438 bytes strings
31709 strings (264322 bytes), 28154 de-duplicated (230440 bytes), 3556 trie nodes used
IMPORT builtin 'hwdb' /lib/udev/rules.d/50-udev-default.rules:11
RUN '/home/myuser/bin/keyboard_settings.sh' /etc/udev/rules.d/99-usb-keyboard.rules:1
unable to create temporary db file '/run/udev/data/+usb:3-2:1.0.tmp': Permission denied
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0
DEVTYPE=usb_interface
DRIVER=usbhid
ID_VENDOR_FROM_DATABASE=Hewlett-Packard
INTERFACE=3/1/1
MODALIAS=usb:v03F0p0325d0102dc00dsc00dp00ic03isc01ip01in00
PRODUCT=3f0/325/102
SUBSYSTEM=usb
TYPE=0/0/0
USEC_INITIALIZED=4145997461
run: '/home/myuser/bin/keyboard_settings.sh'

E, no entanto, isso não altera a taxa de repetição. O teclado do laptop tem as configurações corretas, mas o teclado USB externo não. O Xorg sobrescreve as configurações depois que a regra do udev é aplicada? Como posso descobrir?

Eu recebo isso no Xorg.0.log, indicando que o X11 está mexendo com as coisas, mas nenhuma das regras em /usr/share/X11/xorg.conf.d/ faz nada com teclados.

[164570.705] (II) config/udev: Adding input device Lite-On Technology Corp. HP Basic USB Keyboard (/dev/input/event6)
[164570.705] (**) Lite-On Technology Corp. HP Basic USB Keyboard: Applying InputClass "evdev keyboard catchall"
[164570.705] (**) Lite-On Technology Corp. HP Basic USB Keyboard: Applying InputClass "Keyboard Defaults"
[164570.705] (II) Using input driver 'evdev' for 'Lite-On Technology Corp. HP Basic USB Keyboard'
[164570.705] (**) Lite-On Technology Corp. HP Basic USB Keyboard: always reports core events
[164570.705] (**) evdev: Lite-On Technology Corp. HP Basic USB Keyboard: Device: "/dev/input/event6"
[164570.705] (--) evdev: Lite-On Technology Corp. HP Basic USB Keyboard: Vendor 0x3f0 Product 0x325
[164570.705] (--) evdev: Lite-On Technology Corp. HP Basic USB Keyboard: Found keys
[164570.705] (II) evdev: Lite-On Technology Corp. HP Basic USB Keyboard: Configuring as keyboard
[164570.705] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/input/input34/event6"
[164570.705] (II) XINPUT: Adding extended input device "Lite-On Technology Corp. HP Basic USB Keyboard" (type: KEYBOARD, id 11)
[164570.705] (**) Option "xkb_rules" "evdev"
[164570.705] (**) Option "xkb_model" "pc105"
[164570.705] (**) Option "xkb_layout" "us"
    
por reasgt 27.03.2014 / 22:41

0 respostas