# recent xf86-input-* update no longer recognizes mouse

## ExecutorElassus

I recently emerged:

xorg-drivers-1.19

xf86-input-libinput-0.23.0

libXfont2-2.0.1

xorg-server-1.19.1

xf86-input-keyboard-1.9.0

xf86-input-mouse-1.9.2

xf86-input-evdev-2.10.5

nvidia-drivers-378.09

now after reboot (which was incidentally also into a new kernel, gentoo-sources-4.9.6-r1), one of my mice is not recognized. I tried plugging it into different USB ports, and checked it on my laptop to make sure it worked. It did not on the desktop, but worked fine on the laptop. Recent dmesg (showing my pulling out and plugging in both mice into different usb ports) reads:

```
[  650.785608] usb 5-5.1: new low-speed USB device number 5 using ehci-pci

[  650.902303] input: Logitech USB Trackball as /devices/pci0000:00/0000:00:12.2/usb5/5-5/5-5.1/5-5.1:1.0/0003:046D:C408.0007/input/input21

[  650.902416] hid-generic 0003:046D:C408.0007: input: USB HID v1.10 Mouse [Logitech USB Trackball] on usb-0000:00:12.2-5.1/input0

[  712.671872] e1000e: eth0 NIC Link is Down

[  712.919811] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

[  819.956700] e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None

[  819.956871] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

[  829.289930] usb 5-5.1: USB disconnect, device number 5

[  835.476831] usb 1-1: USB disconnect, device number 5

[  860.466313] usb 1-1: new low-speed USB device number 7 using ohci-pci

[  860.663624] input: Kensington      Kensington Expert Mouse as /devices/pci0000:00/0000:00:12.0/usb1/1-1/1-1:1.0/0003:047D:1020.0008/input/input22

[  860.663685] hid-generic 0003:047D:1020.0008: input: USB HID v1.10 Mouse [Kensington      Kensington Expert Mouse] on usb-0000:00:12.0-1/input0

[  921.407055] usb 1-1: USB disconnect, device number 7

[  926.352182] e1000e: eth0 NIC Link is Down

[ 1044.435884] usb 5-5: USB disconnect, device number 4

[ 1197.987581] e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None

[ 1314.258544] usb 2-4: new low-speed USB device number 2 using ohci-pci

[ 1314.455877] input: Kensington      Kensington Expert Mouse as /devices/pci0000:00/0000:00:13.0/usb2/2-4/2-4:1.0/0003:047D:1020.0009/input/input23

[ 1314.456010] hid-generic 0003:047D:1020.0009: input: USB HID v1.10 Mouse [Kensington      Kensington Expert Mouse] on usb-0000:00:13.0-4/input0

[ 1327.239415] usb 2-4: USB disconnect, device number 2

[ 1344.157508] usb 2-4: new low-speed USB device number 3 using ohci-pci

[ 1344.354899] input: Logitech USB Trackball as /devices/pci0000:00/0000:00:13.0/usb2/2-4/2-4:1.0/0003:046D:C408.000A/input/input24

[ 1344.354971] hid-generic 0003:046D:C408.000A: input: USB HID v1.10 Mouse [Logitech USB Trackball] on usb-0000:00:13.0-4/input0

[ 1351.697845] usb 2-4: USB disconnect, device number 3

[ 1361.404866] usb 2-4: new low-speed USB device number 4 using ohci-pci

[ 1361.602238] input: Kensington      Kensington Expert Mouse as /devices/pci0000:00/0000:00:13.0/usb2/2-4/2-4:1.0/0003:047D:1020.000B/input/input25

[ 1361.602367] hid-generic 0003:047D:1020.000B: input: USB HID v1.10 Mouse [Kensington      Kensington Expert Mouse] on usb-0000:00:13.0-4/input0

[ 1365.583669] usb 2-4: USB disconnect, device number 4

[ 1401.363520] usb 2-4: new low-speed USB device number 5 using ohci-pci

[ 1401.560985] input: Logitech USB Trackball as /devices/pci0000:00/0000:00:13.0/usb2/2-4/2-4:1.0/0003:046D:C408.000C/input/input26

[ 1401.561104] hid-generic 0003:046D:C408.000C: input: USB HID v1.10 Mouse [Logitech USB Trackball] on usb-0000:00:13.0-4/input0
```

The mouse that's recognized is the Logitech; the one that isn't is the Kensington. I have the file /etc/X11/xorg.conf.d/11-inputs.conf, which reads as follows:

```
Section "InputClass"

        Identifier  "Marble Mouse"

        MatchProduct "Logitech USB Trackball"

        MatchIsPointer "on"

        MatchDevicePath "/dev/input/event*"

        Driver "evdev"

#       Physical button #s:     A b D - - - - B C    b = A & D simultaneously;   - = no button

#       Option "ButtonMapping" "1 8 3 4 5 6 7 2 2"

#       Option "ButtonMapping" "1 8 3 4 5 6 7 2 2"   #  For right-hand placement

        Option "ButtonMapping" "1 2 3 4 5 6 7 8 9 10"   #  For left-hand placement

#

#       EmulateWheel refers to emulating a mouse wheel using Marble Mouse trackball.

        Option "EmulateWheel" "false"

#       Option "EmulateWheelButton" "8"              # Factory default; use "9" for left-side placement.

#       Option "EmulateWheelButton" "8"

#       Option "ZAxisMapping" "4 5"

        Option "ZAxisMapping" "4 5"

#       Option "XAxisMapping" "6 7"                  # Disable this for vertical-only scrolling.

#       Option "XAxisMapping" "6 7"

#       Emulate3Buttons refers to the act of pressing buttons A and D

#       simultaneously to emulate a middle-click or wheel click.

        Option "Emulate3Buttons" "true"

#       Option "Emulate3Buttons" "true"              # Factory default.

EndSection

Section "InputClass"

        Identifier  "Expert Mouse"

        MatchProduct "Kensington Kensington Expert Mouse"

        MatchIsPointer "on"

        MatchDevicePath "/dev/input/event*"

        Driver "evdev"

#       Physical button #s:     A b D - - - - B C    b = A & D simultaneously;   - = no button

#       Option "ButtonMapping" "1 8 3 4 5 6 7 2 2"

#       Option "ButtonMapping" "1 8 3 4 5 6 7 2 2"   #  For right-hand placement

        Option "ButtonMapping" "3 8 1 4 5 6 7 2 9 10 11 12"   #  For left-hand placement

#

#       EmulateWheel refers to emulating a mouse wheel using Marble Mouse trackball.

        Option "EmulateWheel" "false"

#       Option "EmulateWheelButton" "8"              # Factory default; use "9" for left-side placement.

#       Option "EmulateWheelButton" "8"

#       Option "ZAxisMapping" "4 5"

        Option "ZAxisMapping" "4 5"

#       Option "XAxisMapping" "6 7"                  # Disable this for vertical-only scrolling.

#       Option "XAxisMapping" "6 7"

#       Emulate3Buttons refers to the act of pressing buttons A and D

#       simultaneously to emulate a middle-click or wheel click.

        Option "Emulate3Buttons" "true"

#       Option "Emulate3Buttons" "true"              # Factory default.

EndSection
```

I haven't changed this file in months (years?). 

Incidentally, button assignment has never worked properly on the Kensington (I wanted the upper two buttons to function as "forward" and "back" in the browser, and clicking both bottom buttons simultaneously to work as an emulated third button). 

Can you all help me figure out why the Kensington is suddenly not recognized?

Cheers,

EE

----------

## Roman_Gruber

 *Quote:*   

> now after reboot (which was incidentally also into a new kernel, gentoo-sources-4.9.6-r1), one of my mice is not recognized. I

 

Check your kernel. Check the staging section.

My e-blue mouse needed from one kernel to the next kernel suddenly holtek flag. nowhere on the pacakaging or anywhere else an indication that i have a holtek mouse.

you can use xev to read out events

```
  ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────── Search Results ───────────────────────────────────────────────────────────────────────────────────────────────────────────┐

  │ Symbol: HID_KENSINGTON [=y]                                                                                                                                                                                                          │  

  │ Type  : tristate                                                                                                                                                                                                                     │  

  │ Prompt: Kensington Slimblade Trackball                                                                                                                                                                                               │  

  │   Location:                                                                                                                                                                                                                          │  

  │     -> Device Drivers                                                                                                                                                                                                                │  

  │       -> HID support                                                                                                                                                                                                                 │  

  │         -> HID bus support (HID [=y])                                                                                                                                                                                                │  

  │ (1)       -> Special HID drivers                                                                                                                                                                                                     │  

  │   Defined at drivers/hid/Kconfig:378                                                                                                                                                                                                 │  

  │   Depends on: INPUT [=y] && HID [=y]   
```

have you set that?

this product? https://www.amazon.com/Kensington-Expert-Mouse-Catalog-Category/dp/B005FMHVDM

----------

## ExecutorElassus

can you explain in a little more detail what you mean by "check the staging section"? Do you mean in the kernel config? In logs? That kernel option is set to be built-in.

Thanks,

EELast edited by ExecutorElassus on Tue Jan 31, 2017 4:50 pm; edited 1 time in total

----------

## Roman_Gruber

 *Quote:*   

> Check your kernel. Check the staging section. 

 

```
 ┌────────────────────────────────────────────────────────────────────────────────────────────────────────── Staging drivers ───────────────────────────────────────────────────────────────────────────────────────────────────────────┐

  │ CONFIG_STAGING:                                                                                                                                                                                                                      │  

  │                                                                                                                                                                                                                                      │  

  │ This option allows you to select a number of drivers that are                                                                                                                                                                        │  

  │ not of the "normal" Linux kernel quality level.  These drivers                                                                                                                                                                       │  

  │ are placed here in order to get a wider audience to make use of                                                                                                                                                                      │  

  │ them.  Please note that these drivers are under heavy                                                                                                                                                                                │  

  │ development, may or may not work, and may contain userspace                                                                                                                                                                          │  

  │ interfaces that most likely will be changed in the near                                                                                                                                                                              │  

  │ future.                                                                                                                                                                                                                              │  

  │                                                                                                                                                                                                                                      │  

  │ Using any of these drivers will taint your kernel which might                                                                                                                                                                        │  

  │ affect support options from both the community, and various                                                                                                                                                                          │  

  │ commercial support organizations.                                                                                                                                                                                                    │  

  │                                                                                                                                                                                                                                      │  

  │ If you wish to work on these drivers, to help improve them, or                                                                                                                                                                       │  

  │ to report problems you have with them, please see the                                                                                                                                                                                │  

  │ driver_name.README file in the drivers/staging/ directory to                                                                                                                                                                         │  

  │ see what needs to be worked on, and who to contact.                                                                                                                                                                                  │  

  │                                                                                                                                                                                                                                      │  

  │ If in doubt, say N here.                                                                                                                                                                                                             │  

  │                                                                                                                                                                                                                                      │  

  │                                                                                                                                                                                                                                      │  

  │ Symbol: STAGING [=y]                                                                                                                                                                                                                 │  

  │ Type  : boolean                                                                                                                                                                                                                      │  

  │ Prompt: Staging drivers                                                                                                                                                                                                              │  

  │   Location:                                                                                                                                                                                                                          │  

  │     -> Device Drivers                                                                                                                                                                                                                │  

  │   Defined at drivers/staging/Kconfig:1      
```

----------

## ExecutorElassus

Yes, that's the correct mouse, also. I've had difficulties getting it to work properly from the beginning (as I said, the device settings under xorg.conf.d don't produce the desired results). 

I'll check the staging section and report back.

Cheers,

EE

PS- I should also point out that the mouse also fails to work when I boot the previous kernel, so I think it's not a problem with the kernel itself

----------

## krinn

I think your MatchProduct is too strict.

MatchProduct should aim some keywords in the device name, but if you fail at giving it the "right" name, you are filtering your own mouse out.

From your dmesg your mouse is name

```
[ 1361.602238] input: Kensington      Kensington Expert Mouse
```

But your MatchProduct match "KensingtonSPACEKensington Expert Mouse", what let your think it's a space in it? I think it more look like a tab.

- You could ease the MatchProduct search: a simple "Kensington" should be more generic and more able to catch it (you don't own that many products with that name no?).

- You can check if your inputclass is apply when the mouse is discover, it's in your xorg.log

```
[    13.546] (**) Logitech USB Optical Mouse: Applying InputClass "evdev pointer catchall"    <---- LOOK HERE, applying catchall

[    13.546] (II) Using input driver 'evdev' for 'Logitech USB Optical Mouse'

grep "evdev pointer catchall" /usr/share/X11/xorg.conf.d/*

/usr/share/X11/xorg.conf.d/10-evdev.conf:        Identifier "evdev pointer catchall" <-- the rule in use for my mouse comes from there

```

If you get it right, yeah, until you see xorg.log telling you that your mouse have "Expert Mouse" rules use on it, your buttons change won't do anything.

----------

## Roman_Gruber

 *Quote:*   

> produce the desired results

 

Some stuff may be a bit adjusted with the xorg.conf

some mice report themself as mouse and keyboard (which is the best when you have a linux tool to write to that mouse. e.g. razer coperhead (sigh one of the last decent mice from razer in my point of view))

The interesting aspect is, if its hardware related or software related.

some mice are just not that accurate as others. A sensor issue is the classical example for an optical mouse.

--

Can you tell me what is not the desired result? 

Please emerge xev. run it in a terminal and check the feedback.

--

I stopped counting, but I am quite sure that I have returned amazon over 20 mice in past few years. Some were just brand new, unpacked, not accurate, too small, other issues. Some just died before the 2 year guarantee period were over.

IMHO: There is no real build quality regarding mice these days

----------

## ExecutorElassus

according to the log, it's applying the libinput catchall. But then that fails, because the "module ABI major version (22) doesn't match the server's version (24)".

I'll try using a more permissive name and see what happens. Do I need to restart the X server for changes to files in xorg.conf.d to take effect?

Cheers,

EE

PS- here's the relevant output from Xorg.0.log:

```
[  5711.285] (II) config/udev: Adding input device Kensington      Kensington Expert Mouse (/dev/input/mouse1)

[  5711.285] (II) No input driver specified, ignoring this device.

[  5711.285] (II) This device may have been added with another device file.

[  5711.381] (II) config/udev: Adding input device Kensington      Kensington Expert Mouse (/dev/input/event18)

[  5711.381] (**) Kensington      Kensington Expert Mouse: Applying InputClass "evdev pointer catchall"

[  5711.381] (**) Kensington      Kensington Expert Mouse: Applying InputClass "libinput pointer catchall"

[  5711.381] (II) LoadModule: "libinput"

[  5711.381] (II) Loading /usr/lib64/xorg/modules/input/libinput_drv.so

[  5711.381] (II) Module libinput: vendor="X.Org Foundation"

[  5711.381]    compiled for 1.18.4, module version = 0.23.0

[  5711.381]    Module class: X.Org XInput Driver

[  5711.381]    ABI class: X.Org XInput driver, version 22.1

[  5711.381] (EE) libinput: module ABI major version (22) doesn't match the server's version (24)

[  5711.381] (II) UnloadModule: "libinput"

[  5711.381] (II) Unloading libinput

[  5711.381] (EE) Failed to load module "libinput" (module requirement mismatch, 0)

[  5711.381] (EE) No input driver matching `libinput'

[  5711.381] (II) Falling back to input driver `libinput'

[  5711.381] (II) LoadModule: "libinput"

[  5711.381] (II) Loading /usr/lib64/xorg/modules/input/libinput_drv.so

[  5711.382] (II) Module libinput: vendor="X.Org Foundation"

[  5711.382]    compiled for 1.18.4, module version = 0.23.0

[  5711.382]    Module class: X.Org XInput Driver

[  5711.382]    ABI class: X.Org XInput driver, version 22.1

[  5711.382] (EE) libinput: module ABI major version (22) doesn't match the server's version (24)

[  5711.382] (II) UnloadModule: "libinput"

[  5711.382] (II) Unloading libinput

[  5711.382] (EE) Failed to load module "libinput" (module requirement mismatch, 0)

```

----------

## ExecutorElassus

 *Roman_Gruber wrote:*   

> 
> 
> Can you tell me what is not the desired result? 
> 
> Please emerge xev. run it in a terminal and check the feedback.
> ...

 

xev shows no input from the Kensington. 

The desired result is basically button assignment. The mouse is left-handed, with four physical buttons, a trackball, and a scroll-ring around the trackball. If I label the buttons SW, SE, NW, NE, I want the following mapping:

SW = secondary mouse button

SE = primary mouse button

SW+SE = emulated third button

NW = browser "back"

NE = browser "forward"

NW+NE = unassigned

trackball and scroll-ring function normally.

In the xorg.conf.d file, if I have any fewer than 12 buttons listed it throws an error. The present config file produces the following:

SW = secondary mouse button

SE = primary mouse button

SW+SE = nothing

NW = browser "back"

NE = tertiary mouse button (say, for pasting the primary selection buffer from consoles, which is really annoying not to be able to do right now when I'm trying to copy-paste log output)

NW+NE = nothing

Can you advise as to how I should fix this?

Cheers,

EE

----------

## ExecutorElassus

update: I remerged xf86-input-libinput and logged out of X and back in. Now the mouse is detected and properly recognized (well, after I unplugged it and plugged it back in). Here's what Xorg.0.log says:

```
[  7160.476] (II) config/udev: Adding input device Kensington      Kensington Expert Mouse (/dev/input/mouse0)

[  7160.476] (II) No input driver specified, ignoring this device.

[  7160.476] (II) This device may have been added with another device file.

[  7160.584] (II) config/udev: Adding input device Kensington      Kensington Expert Mouse (/dev/input/event11)

[  7160.584] (**) Kensington      Kensington Expert Mouse: Applying InputClass "evdev pointer catchall"

[  7160.584] (**) Kensington      Kensington Expert Mouse: Applying InputClass "libinput pointer catchall"

[  7160.584] (**) Kensington      Kensington Expert Mouse: Applying InputClass "Expert Mouse"

[  7160.584] (II) Using input driver 'evdev' for 'Kensington      Kensington Expert Mouse'

[  7160.584] (**) Kensington      Kensington Expert Mouse: always reports core events

[  7160.584] (**) evdev: Kensington      Kensington Expert Mouse: Device: "/dev/input/event11"

[  7160.643] (**) evdev: Kensington      Kensington Expert Mouse: ButtonMapping '3 8 1 4 5 6 7 2 9 10 11 12'

[  7160.643] (--) evdev: Kensington      Kensington Expert Mouse: Vendor 0x47d Product 0x1020

[  7160.643] (--) evdev: Kensington      Kensington Expert Mouse: Found 8 mouse buttons

[  7160.643] (--) evdev: Kensington      Kensington Expert Mouse: Found scroll wheel(s)

[  7160.643] (--) evdev: Kensington      Kensington Expert Mouse: Found relative axes

[  7160.643] (--) evdev: Kensington      Kensington Expert Mouse: Found x and y relative axes

[  7160.643] (II) evdev: Kensington      Kensington Expert Mouse: Configuring as mouse

[  7160.643] (II) evdev: Kensington      Kensington Expert Mouse: Adding scrollwheel support

[  7160.643] (**) Option "Emulate3Buttons" "true"

[  7160.643] (**) Option "EmulateWheel" "false"

[  7160.643] (**) evdev: Kensington      Kensington Expert Mouse: YAxisMapping: buttons 4 and 5

[  7160.643] (**) evdev: Kensington      Kensington Expert Mouse: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200

[  7160.643] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:13.0/usb2/2-4/2-4:1.0/0003:047D:1020.0012/input/input31/event11"

[  7160.643] (II) XINPUT: Adding extended input device "Kensington      Kensington Expert Mouse" (type: MOUSE, id 10)

[  7160.643] (II) evdev: Kensington      Kensington Expert Mouse: initialized for relative axes.

[  7160.643] (**) Kensington      Kensington Expert Mouse: (accel) keeping acceleration scheme 1

[  7160.643] (**) Kensington      Kensington Expert Mouse: (accel) acceleration profile 0

[  7160.643] (**) Kensington      Kensington Expert Mouse: (accel) acceleration factor: 2.000

[  7160.643] (**) Kensington      Kensington Expert Mouse: (accel) acceleration threshold: 4

```

now, however, the buttons are flipped across the Y axis: SW is now the primary, SE is now the secondary, NW is the emulated 3rd button, and NE is the "back" button. 

How can I get the mapping I want?

Cheers,

EE

UPDATE: I edited the 11-inputs.conf file so that the ButtonMapping option now reads "1 2 3 4 5 6 7 8 9 10 11 12", and I have the old button mapping (ie, left-handed, with NW as the "back" button and NE as the emulated 3rd button). That's a bit odd, but now I'd like to know how to get the functions I was trying to get. Any advice?

----------

## krinn

sorry, only someone who own that mouse could really told you buttons value to assign.

well, i suppose you're doom to try/and look at result to figure that out.

what is good is that "expert mouse" is now use, meaning your changes will be taken.

ps: of course no need to restart xorg, unplug/replug the mouse will trigger the event and reload the config ; a make change to config, unplug/replug and reread xorg.log

----------

## Ant P.

 *ExecutorElassus wrote:*   

> 
> 
> ```
> [  5711.381] (EE) libinput: module ABI major version (22) doesn't match the server's version (24)
> ```
> ...

 

```
emerge @x11-module-rebuild
```

Do this when you update Xorg. It should happen automatically, but sometimes it doesn't. Easier than having to look up which driver to reinstall.

Also try ｢ MatchUSBID "047D:1020" ｣ instead of MatchProduct; maybe the whitespace difference is throwing it off.

----------

## dminca

Had the same issue also, managed to solve it by:

1) adding 

```
INPUT_DEVICES="libinput"
```

 to my 

```
/etc/portage/make.conf
```

2) doing an 

```
emerge -DuvaN @world
```

3) doing an 

```
emerge @x11-module-rebuild
```

----------

## Muso

 *dminca wrote:*   

> Had the same issue also, managed to solve it by:
> 
> 1) adding <code>INPUT_DEVICES="libinput"</code> to my <code>/etc/portage/make.conf</code>
> 
> 2) doing an <code>emerge -DuvaN @world</code>
> ...

 

Hello necromancer!    This thread is 2 years old.

----------

