Поставил себе сегодня сусю 11.2 i586. Проверил работу hal в плане конфигуряния мышей на лету. Значится по умолчанию мыша при подключении ведёт себя так:
Код:
#lshal
udi = '/org/freedesktop/Hal/devices/usb_device_9da_1a_noserial_if0_logicaldev_input'
info.capabilities = {'input', 'input.mouse'} (string list)
info.category = 'input' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_9da_1a_noserial_if0' (string)
info.product = 'A4Tech RF USB Mouse' (string)
info.subsystem = 'input' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_9da_1a_noserial_if0_logicaldev_input' (string)
input.device = '/dev/input/event2' (string)
input.originating_device = '/org/freedesktop/Hal/devices/usb_device_9da_1a_noserial_if0' (string)
input.product = 'A4Tech RF USB Mouse' (string)
input.x11_driver = 'evdev' (string)
linux.device_file = '/dev/input/event2' (string)
linux.hotplug_type = 2 (0x2) (int)
linux.subsystem = 'input' (string)
linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.0/input/input14/event2' (string)
В /var/log/Xorg.0.log появляется следующее
Код:
(II) config/hal: Adding input device A4Tech RF USB Mouse
(**) A4Tech RF USB Mouse: always reports core events
(**) A4Tech RF USB Mouse: Device: "/dev/input/event2"
(II) A4Tech RF USB Mouse: Found 12 mouse buttons
(II) A4Tech RF USB Mouse: Found x and y relative axes
(II) A4Tech RF USB Mouse: Found scroll wheel(s)
(II) A4Tech RF USB Mouse: Configuring as mouse
(**) A4Tech RF USB Mouse: YAxisMapping: buttons 4 and 5
(**) A4Tech RF USB Mouse: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
(II) XINPUT: Adding extended input device "A4Tech RF USB Mouse" (type: MOUSE)
(**) A4Tech RF USB Mouse: (accel) keeping acceleration scheme 1
(**) A4Tech RF USB Mouse: (accel) filter chain progression: 2.00
(**) A4Tech RF USB Mouse: (accel) filter stage 0: 20.00 ms
(**) A4Tech RF USB Mouse: (accel) set acceleration profile 0
(II) A4Tech RF USB Mouse: initialized for relative axes.
Далее кладу заранее подготовленный файл в /usr/share/hal/fdi/policy/20thirdparty в моём случае это 11-x11-a4tech-rf-mouse.fdi с содержанием, приведённым в предыдущем посте. Далее делаю
и вынимаю, а затем вставляю мыша. Получаю
Код:
udi = '/org/freedesktop/Hal/devices/usb_device_9da_1a_noserial_if0_logicaldev_input'
info.capabilities = {'input', 'input.mouse'} (string list)
info.category = 'input' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_9da_1a_noserial_if0' (string)
info.product = 'A4Tech RF USB Mouse' (string)
info.subsystem = 'input' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_9da_1a_noserial_if0_logicaldev_input' (string)
input.device = '/dev/input/event2' (string)
input.originating_device = '/org/freedesktop/Hal/devices/usb_device_9da_1a_noserial_if0' (string)
input.product = 'A4Tech RF USB Mouse' (string)
input.x11_driver = 'mouse' (string)
input.x11_options.Sensitivity = '1.5' (string)
input.x11_options.device = '/dev/input/mice' (string)
input.x11_options.protocol = 'ExplorerPS/2' (string)
linux.device_file = '/dev/input/event2' (string)
linux.hotplug_type = 2 (0x2) (int)
linux.subsystem = 'input' (string)
linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.0/input/input15/event2' (string)
а в /var/log/Xorg.0.log
Код:
(II) config/hal: Adding input device A4Tech RF USB Mouse
(**) Option "Protocol" "ExplorerPS/2"
(**) A4Tech RF USB Mouse: Device: "/dev/input/mice"
(**) A4Tech RF USB Mouse: Protocol: "ExplorerPS/2"
(**) A4Tech RF USB Mouse: always reports core events
(**) Option "Device" "/dev/input/mice"
(==) A4Tech RF USB Mouse: Emulate3Buttons, Emulate3Timeout: 50
(**) A4Tech RF USB Mouse: ZAxisMapping: buttons 4 and 5
(**) A4Tech RF USB Mouse: Buttons: 9
(**) Option "Sensitivity" "1.5"
(**) A4Tech RF USB Mouse: Sensitivity: 1.5
(II) XINPUT: Adding extended input device "A4Tech RF USB Mouse" (type: MOUSE)
(**) A4Tech RF USB Mouse: (accel) keeping acceleration scheme 1
(**) A4Tech RF USB Mouse: (accel) filter chain progression: 2.00
(**) A4Tech RF USB Mouse: (accel) filter stage 0: 20.00 ms
(**) A4Tech RF USB Mouse: (accel) set acceleration profile 0
(II) A4Tech RF USB Mouse: ps2EnableDataReporting: succeeded
Почему я привожу два вывода. Первый вывод lshal --- диагностирует подхватил ли hal конфиг, второй Xorg.0.conf показывает использовали ли иксы информацию от hal. Если играться с параметром Sensitivity то можно увидеть, что при очень малых значениях (например 0.001) указатель еле двигается а при больших (100) перемещается очень быстро.
Примерные конфиги для
tmp13Код:
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.mouse">
<match key="input.product" contains="Razer Razer Diamondback 3G">
<merge key="input.x11_driver" type="string">mouse</merge>
<merge key="input.x11_options.protocol" type="string">auto</merge>
<merge key="input.x11_options.device" type="string">/dev/input/mice</merge>
<merge key="input.x11_options.Sensitivity" type="string">0.2</merge>
<merge key="input.x11_options.Emulate3Buttons" type="string">no</merge>
</match>
</match>
</device>
</deviceinfo>
Для
inesit-sasha
Код:
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.mouse">
<match key="input.product" contains="5 button optical mouse with scroll wheel 5 button optical mouse with scroll wheel">
<merge key="input.x11_driver" type="string">mouse</merge>
<merge key="input.x11_options.protocol" type="string">auto</merge>
<merge key="input.x11_options.device" type="string">/dev/input/mice</merge>
<merge key="input.x11_options.Sensitivity" type="string">0.2</merge>
<merge key="input.x11_options.Emulate3Buttons" type="string">no</merge>
</match>
</match>
</device>
</deviceinfo>
Не забудьте выдернуть и вставить мыша после того как перезапустили hal, иначе X.org не узнает, что данные изменились. Иксы перезапускать не надо --- изменения подхватятся сразу после втыкания мыша.