# hal/evdev not recognizing mouse and keyboard [solved]

## Atle

After upgrading X and ati drivers my Logitech keyboard and mouse stopped working. It's an older wireless diNovo using a base conncected via USB. One base is used for both keyboard and mouse.

I've been looking all over for guides how to configure/debug this, but I've not found very much useful informatin. 

Here is dump form lshal -m when removing and inserting the base.

```

# lshal -m

Start monitoring devicelist:

-------------------------------------------------

15:07:46.734: usb_device_46d_c704_0D9B28_if0 removed

15:07:46.741: usb_device_46d_c704_0D9B28_if1 removed

15:07:46.741: usb_device_46d_c704_0D9B28 removed

15:07:46.748: usb_device_451_2036_noserial_if0 removed

15:07:46.754: usb_device_451_2036_noserial removed

15:07:55.732: usb_device_451_2036_noserial added

15:07:55.821: usb_device_451_2036_noserial_if0 added

15:07:56.168: usb_device_46d_c704_0D9B28 added

15:07:56.240: usb_device_46d_c704_0D9B28_if0 added

15:07:56.261: usb_device_46d_c704_0D9B28_if1 added

```

dmesg:

```

usb 2-1: USB disconnect, address 10                                                                                                                                           

usb 2-1.1: USB disconnect, address 11                                                                                                                                         

usb 2-3: new full speed USB device using ohci_hcd and address 13                                                                                                              

usb 2-3: configuration #1 chosen from 1 choice

hub 2-3:1.0: USB hub found

hub 2-3:1.0: 2 ports detected

usb 2-3.1: new low speed USB device using ohci_hcd and address 14

usb 2-3.1: configuration #1 chosen from 1 choice

```

Here is dump from a usb-keyboard that works:

```

15:08:09.415: usb_device_d62_1c_noserial_if0_logicaldev_input removed

15:08:09.460: usb_device_d62_1c_noserial_if0 removed

15:08:09.486: usb_device_d62_1c_noserial_if1_logicaldev_input removed

15:08:09.530: usb_device_d62_1c_noserial_if1 removed

15:08:09.542: usb_device_d62_1c_noserial removed

15:08:13.513: usb_device_d62_1c_noserial added

15:08:13.540: usb_device_d62_1c_noserial_if0 added

15:08:13.692: usb_device_d62_1c_noserial_if1 added

15:08:13.700: usb_device_d62_1c_noserial_if0_logicaldev_input added

15:08:13.773: usb_device_d62_1c_noserial_if1_logicaldev_input added

```

dmesg:

```

usb 2-2: USB disconnect, address 15

usb 2-2: new low speed USB device using ohci_hcd and address 18

usb 2-2: configuration #1 chosen from 1 choice

input: Darfon USB Combo Keyboard as /class/input/input11

generic-usb 0003:0D62:001C.0013: input,hidraw0: USB HID v1.00 Keyboard [Darfon USB Combo Keyboard] on usb-0000:00:0a.0-2/input0

input: Darfon USB Combo Keyboard as /class/input/input12

generic-usb 0003:0D62:001C.0014: input,hiddev96,hidraw1: USB HID v1.00 Device [Darfon USB Combo Keyboard] on usb-0000:00:0a.0-2/input1

```

Last edited by Atle on Tue Jul 14, 2009 10:02 am; edited 1 time in total

----------

## NeddySeagoon

Atle,

Did you find the xorg-server-1.5-upgrade-guide?

You must use evdev in your kernel and x11-input-evdev for Xorg and hald must be  running.

----------

## Atle

Thanks for the link NeddySeagoon. No, I hadn't seen it, but unfortunately it doesn't help me much.

I know hald is running, and I'm pretty sure evdev is in place too. I'm using genkernel, and my other keyboard works. Also:

```

# grep -i evdev /usr/src/linux/.config

CONFIG_INPUT_EVDEV=y

```

I've been looking more at the hal command line tools, and the problem seems to be that hal is not recognizing the capabilities of the mouse and keyboard.

This is information for my working keyboard

```

# lshal -u /org/freedesktop/Hal/devices/usb_device_d62_1c_noserial_if1_logicaldev_input

udi = '/org/freedesktop/Hal/devices/usb_device_d62_1c_noserial_if1_logicaldev_input'

  info.addons.singleton = {'hald-addon-input'} (string list)

  info.capabilities = {'input', 'input.keys', 'button'} (string list)

  info.category = 'input'  (string)

  info.parent = '/org/freedesktop/Hal/devices/usb_device_d62_1c_noserial_if1'  (string)

  info.product = 'Darfon USB Combo Keyboard'  (string)

  info.subsystem = 'input'  (string)

  info.udi = '/org/freedesktop/Hal/devices/usb_device_d62_1c_noserial_if1_logicaldev_input'  (string)

  input.device = '/dev/input/event5'  (string)

  input.originating_device = '/org/freedesktop/Hal/devices/usb_device_d62_1c_noserial_if1'  (string)

  input.product = 'Darfon USB Combo Keyboard'  (string)

  input.x11_driver = 'evdev'  (string)

  input.xkb.layout = 'us'  (string)

  input.xkb.model = 'evdev'  (string)

  input.xkb.rules = 'base'  (string)

  input.xkb.variant = ''  (string)

  linux.device_file = '/dev/input/event5'  (string)

  linux.hotplug_type = 2  (0x2)  (int)

  linux.subsystem = 'input'  (string)

  linux.sysfs_path = '/sys/class/input/input12/event5'  (string)

```

And the following is information about the different "entries" the non-working diNovo mouse/keyboard. Notice how there is no info.capabilities in any of those entries. So the problem seems to be that HAL is not recognizing the capabilities of the receiver. 

```

# lshal -u usb_device_451_2036_noserial && lshal -u usb_device_451_2036_noserial_if0 && lshal -u usb_device_46d_c704_0D9B28 && lshal -u usb_device_46d_c704_0D9B28_if0 && lshal -u usb_device_46d_c704_0D9B28_if1

udi = '/org/freedesktop/Hal/devices/usb_device_451_2036_noserial'

  info.linux.driver = 'usb'  (string)

  info.parent = '/org/freedesktop/Hal/devices/usb_device_1d6b_1_0000_00_0a_0'  (string)

  info.product = 'TUSB2036 Hub'  (string)

  info.subsystem = 'usb_device'  (string)

  info.udi = '/org/freedesktop/Hal/devices/usb_device_451_2036_noserial'  (string)

  info.vendor = 'Texas Instruments, Inc.'  (string)

  linux.device_file = '/dev/bus/usb/002/019'  (string)

  linux.hotplug_type = 2  (0x2)  (int)

  linux.subsystem = 'usb'  (string)

  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:0a.0/usb2/2-3'  (string)

  usb_device.bus_number = 2  (0x2)  (int)

  usb_device.can_wake_up = true  (bool)

  usb_device.configuration = 'General Purpose USB Hub'  (string)

  usb_device.configuration_value = 1  (0x1)  (int)

  usb_device.device_class = 9  (0x9)  (int)

  usb_device.device_protocol = 0  (0x0)  (int)

  usb_device.device_revision_bcd = 257  (0x101)  (int)

  usb_device.device_subclass = 0  (0x0)  (int)

  usb_device.is_self_powered = false  (bool)

  usb_device.linux.device_number = 19  (0x13)  (int)

  usb_device.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:0a.0/usb2/2-3'  (string)

  usb_device.max_power = 100  (0x64)  (int)

  usb_device.num_configurations = 1  (0x1)  (int)

  usb_device.num_interfaces = 1  (0x1)  (int)

  usb_device.num_ports = 2  (0x2)  (int)

  usb_device.product = 'TUSB2036 Hub'  (string)

  usb_device.product_id = 8246  (0x2036)  (int)

  usb_device.speed = 12.0 (12) (double)

  usb_device.vendor = 'Texas Instruments, Inc.'  (string)

  usb_device.vendor_id = 1105  (0x451)  (int)

  usb_device.version = 1.1 (1.1) (double)

udi = '/org/freedesktop/Hal/devices/usb_device_451_2036_noserial_if0'

  info.linux.driver = 'hub'  (string)                                

  info.parent = '/org/freedesktop/Hal/devices/usb_device_451_2036_noserial'  (string)

  info.product = 'USB Hub Interface'  (string)                                       

  info.subsystem = 'usb'  (string)                                                   

  info.udi = '/org/freedesktop/Hal/devices/usb_device_451_2036_noserial_if0'  (string)

  linux.hotplug_type = 2  (0x2)  (int)                                                

  linux.subsystem = 'usb'  (string)                                                   

  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:0a.0/usb2/2-3/2-3:1.0'  (string)

  usb.bus_number = 2  (0x2)  (int)                                                    

  usb.can_wake_up = true  (bool)                                                      

  usb.configuration = 'General Purpose USB Hub'  (string)                             

  usb.configuration_value = 1  (0x1)  (int)                                           

  usb.device_class = 9  (0x9)  (int)                                                  

  usb.device_protocol = 0  (0x0)  (int)                                               

  usb.device_revision_bcd = 257  (0x101)  (int)                                       

  usb.device_subclass = 0  (0x0)  (int)                                               

  usb.interface.class = 9  (0x9)  (int)                                               

  usb.interface.description = 'General Purpose USB Hub'  (string)                     

  usb.interface.number = 0  (0x0)  (int)                                              

  usb.interface.protocol = 0  (0x0)  (int)                                            

  usb.interface.subclass = 0  (0x0)  (int)                                            

  usb.is_self_powered = false  (bool)                                                 

  usb.linux.device_number = 19  (0x13)  (int)                                         

  usb.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:0a.0/usb2/2-3/2-3:1.0'  (string)

  usb.max_power = 100  (0x64)  (int)                                                      

  usb.num_configurations = 1  (0x1)  (int)                                                

  usb.num_interfaces = 1  (0x1)  (int)                                                    

  usb.num_ports = 2  (0x2)  (int)                                                         

  usb.product = 'USB Hub Interface'  (string)                                             

  usb.product_id = 8246  (0x2036)  (int)                                                  

  usb.speed = 12.0 (12) (double)                                                          

  usb.vendor = 'Texas Instruments, Inc.'  (string)                                        

  usb.vendor_id = 1105  (0x451)  (int)                                                    

  usb.version = 1.1 (1.1) (double)                                                        

udi = '/org/freedesktop/Hal/devices/usb_device_46d_c704_0D9B28'

  info.linux.driver = 'usb'  (string)                          

  info.parent = '/org/freedesktop/Hal/devices/usb_device_451_2036_noserial'  (string)

  info.product = 'USB Receiver'  (string)                                            

  info.subsystem = 'usb_device'  (string)                                            

  info.udi = '/org/freedesktop/Hal/devices/usb_device_46d_c704_0D9B28'  (string)     

  info.vendor = 'Logitech, Inc.'  (string)                                           

  linux.device_file = '/dev/bus/usb/002/020'  (string)                               

  linux.hotplug_type = 2  (0x2)  (int)                                               

  linux.subsystem = 'usb'  (string)                                                  

  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:0a.0/usb2/2-3/2-3.1'  (string) 

  usb_device.bus_number = 2  (0x2)  (int)                                            

  usb_device.can_wake_up = true  (bool)                                              

  usb_device.configuration_value = 1  (0x1)  (int)                                   

  usb_device.device_class = 0  (0x0)  (int)                                          

  usb_device.device_protocol = 0  (0x0)  (int)                                       

  usb_device.device_revision_bcd = 9220  (0x2404)  (int)                             

  usb_device.device_subclass = 0  (0x0)  (int)                                       

  usb_device.is_self_powered = false  (bool)                                         

  usb_device.linux.device_number = 20  (0x14)  (int)                                 

  usb_device.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:0a.0/usb2/2-3/2-3.1'  (string)

  usb_device.max_power = 98  (0x62)  (int)                                                     

  usb_device.num_configurations = 1  (0x1)  (int)                                              

  usb_device.num_interfaces = 2  (0x2)  (int)                                                  

  usb_device.num_ports = 0  (0x0)  (int)                                                       

  usb_device.product = 'USB Receiver'  (string)                                                

  usb_device.product_id = 50948  (0xc704)  (int)                                               

  usb_device.serial = '0D9B28'  (string)                                                       

  usb_device.speed = 1.5 (1.5) (double)                                                        

  usb_device.vendor = 'Logitech, Inc.'  (string)                                               

  usb_device.vendor_id = 1133  (0x46d)  (int)                                                  

  usb_device.version = 1.1 (1.1) (double)                                                      

udi = '/org/freedesktop/Hal/devices/usb_device_46d_c704_0D9B28_if0'

  info.linux.driver = 'usbhid'  (string)                           

  info.parent = '/org/freedesktop/Hal/devices/usb_device_46d_c704_0D9B28'  (string)

  info.product = 'USB HID Interface'  (string)

  info.subsystem = 'usb'  (string)

  info.udi = '/org/freedesktop/Hal/devices/usb_device_46d_c704_0D9B28_if0'  (string)

  linux.hotplug_type = 2  (0x2)  (int)

  linux.subsystem = 'usb'  (string)

  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:0a.0/usb2/2-3/2-3.1/2-3.1:1.0'  (string)

  usb.bus_number = 2  (0x2)  (int)

  usb.can_wake_up = true  (bool)

  usb.configuration_value = 1  (0x1)  (int)

  usb.device_class = 0  (0x0)  (int)

  usb.device_protocol = 0  (0x0)  (int)

  usb.device_revision_bcd = 9220  (0x2404)  (int)

  usb.device_subclass = 0  (0x0)  (int)

  usb.interface.class = 3  (0x3)  (int)

  usb.interface.number = 0  (0x0)  (int)

  usb.interface.protocol = 1  (0x1)  (int)

  usb.interface.subclass = 1  (0x1)  (int)

  usb.is_self_powered = false  (bool)

  usb.linux.device_number = 20  (0x14)  (int)

  usb.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:0a.0/usb2/2-3/2-3.1/2-3.1:1.0'  (string)

  usb.max_power = 98  (0x62)  (int)

  usb.num_configurations = 1  (0x1)  (int)

  usb.num_interfaces = 2  (0x2)  (int)

  usb.num_ports = 0  (0x0)  (int)

  usb.product = 'USB HID Interface'  (string)

  usb.product_id = 50948  (0xc704)  (int)

  usb.serial = '0D9B28'  (string)

  usb.speed = 1.5 (1.5) (double)

  usb.vendor = 'Logitech, Inc.'  (string)

  usb.vendor_id = 1133  (0x46d)  (int)

  usb.version = 1.1 (1.1) (double)

udi = '/org/freedesktop/Hal/devices/usb_device_46d_c704_0D9B28_if1'

  info.linux.driver = 'usbhid'  (string)

  info.parent = '/org/freedesktop/Hal/devices/usb_device_46d_c704_0D9B28'  (string)

  info.product = 'USB HID Interface'  (string)

  info.subsystem = 'usb'  (string)

  info.udi = '/org/freedesktop/Hal/devices/usb_device_46d_c704_0D9B28_if1'  (string)

  linux.hotplug_type = 2  (0x2)  (int)

  linux.subsystem = 'usb'  (string)

  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:0a.0/usb2/2-3/2-3.1/2-3.1:1.1'  (string)

  usb.bus_number = 2  (0x2)  (int)

  usb.can_wake_up = true  (bool)

  usb.configuration_value = 1  (0x1)  (int)

  usb.device_class = 0  (0x0)  (int)

  usb.device_protocol = 0  (0x0)  (int)

  usb.device_revision_bcd = 9220  (0x2404)  (int)

  usb.device_subclass = 0  (0x0)  (int)

  usb.interface.class = 3  (0x3)  (int)

  usb.interface.number = 1  (0x1)  (int)

  usb.interface.protocol = 2  (0x2)  (int)

  usb.interface.subclass = 1  (0x1)  (int)

  usb.is_self_powered = false  (bool)

  usb.linux.device_number = 20  (0x14)  (int)

  usb.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:0a.0/usb2/2-3/2-3.1/2-3.1:1.1'  (string)

  usb.max_power = 98  (0x62)  (int)

  usb.num_configurations = 1  (0x1)  (int)

  usb.num_interfaces = 2  (0x2)  (int)

  usb.num_ports = 0  (0x0)  (int)

  usb.product = 'USB HID Interface'  (string)

  usb.product_id = 50948  (0xc704)  (int)

  usb.serial = '0D9B28'  (string)

  usb.speed = 1.5 (1.5) (double)

  usb.vendor = 'Logitech, Inc.'  (string)

  usb.vendor_id = 1133  (0x46d)  (int)

  usb.version = 1.1 (1.1) (double)

```

I've looked at all the links and examples in the upgrade guide, but every example starts with something like <match key="info.capabilities" contains="input.mouse"> or tries to match on input.keys.

The question is then, WHEN/HOW does hal recognize a devices capabilities?

----------

## Atle

I tried the device using a knoppix live distro on a different machine. It recognized the capabilities of the device, adding two more entries called

usb_device_46d_c704_0D9B28_if0_logicaldev_input

usb_device_46d_c704_0D9B28_if1_logicaldev_input

Both machines are running hal 0.5.11. And I even borrowed the /usr/share/hal directory from that machine, restarting hald, but it didn't work.

Also I've tried another logitech wireless mouse with a usb receiver, and it has the same problem on my machine, but is working with the knoppix machine.

----------

## Atle

I finally found the problem.

In the kernel I had to activate: Device Drivers -> HID Devices -> Special HID drivers -> Logitech    (CONFIG_HID_LOGITECH=m)

This is obviously not done by default using genkernel.

It was 

# cat /proc/bus/input/devices

and my device not showing up, that made me realize that this was not a hal problem, but a problem on a lower level, i.e the kernel.

----------

## baaann

I think you should be able to create a custom fdi file in /etc/hal/fdi/policy using 

info.udi as match criteria

evdev as driver

and then select your model from

```
less /usr/share/X11/xkb/rules/evdev.lst
```

something like this for the keyboard?

```

<?xml version="1.0" encoding="utf-8"?>

<deviceinfo version="0.2">

   <match key="info.udi" contains="usb_device_46d_c704_0D9B28_if0">

      <merge key="input.x11_driver" type="string">evdev</merge>

      <merge key="input.x11_options.XkbModel" type="string">logidinovo</merge>

   </match>

</deviceinfo>

```

Presumably you would only need to merge the evdev driver key for the mouse?

I do not know if this will work, but it is what I would try with my understanding of HAL

----------

## baaann

Oops too late! Glad you solved it   :Very Happy: 

----------

## d2_racing

```

<match key="info.udi" contains="usb_device_46d_c704_0D9B28_if0"> 

```

I'm not sure if this info will be static in the future.

Maybe you should try to match with something else.

----------

