Ubuntu – The mouse is in lsusb and even generates events on /dev/input/mice but X doesn’t see it

mouseusbxorg

lsusb sees it:

$ lsusb
...
Bus 002 Device 005: ID 046d:c05a Logitech, Inc. M90/M100 Optical Mouse
Bus 002 Device 003: ID 03f0:064a Hewlett-Packard 
...

xinput doesn't:

$ xinput 
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Primax HP USB Keyboard                    id=9    [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Power Button                              id=7    [slave  keyboard (3)]
    ↳ Primax HP USB Keyboard                    id=8    [slave  keyboard (3)]
    ↳ HP WMI hotkeys                            id=10   [slave  keyboard (3)]

/dev/input/mice sees it:

$ sudo dd if=/dev/input/mice bs=1 count=100 | hexdump -C

(sits silently until I move the mouse, then...)

00000000  18 ff 00 18 fe 00 38 ff  ff 18 ff 00 38 ff ff 28  |......8.....8..(|
00000010  00 fe 28 00 ff 28 00 ff  28 00 ff 28 00 fe 28 01  |..(..(..(..(..(.|
00000020  fe 28 01 ff 28 01 fe 28  02 fe 28 01 ff 28 00 fd  |.(..(..(..(..(..|
00000030  28 01 ff 28 01 fd 28 00  fe 28 02 fd 28 01 fe 28  |(..(..(..(..(..(|
00000040  00 fc 28 01 fe 28 00 fd  28 01 fe 28 02 fc 28 00  |..(..(..(..(..(.|
00000050  ff 28 00 fd 28 00 fe 28  01 fd 28 00 fe 28 00 fd  |.(..(..(..(..(..|
00000060  28 00 fe 28                                       |(..(|
00000064

udevadm monitor reports on it:

$ udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

(... when I unplug it...)

KERNEL[248751.752071] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:046D:C05A.0004/input/input16/mouse0 (input)
KERNEL[248751.760205] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:046D:C05A.0004/input/input16/event4 (input)
UDEV  [248751.775552] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:046D:C05A.0004/input/input16/mouse0 (input)
UDEV  [248751.775597] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:046D:C05A.0004/input/input16/event4 (input)
KERNEL[248751.776141] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:046D:C05A.0004/input/input16 (input)
KERNEL[248751.776197] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:046D:C05A.0004/hidraw/hidraw2 (hidraw)
KERNEL[248751.776219] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:046D:C05A.0004 (hid)
KERNEL[248751.776259] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
KERNEL[248751.776374] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
UDEV  [248751.776739] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:046D:C05A.0004/hidraw/hidraw2 (hidraw)
UDEV  [248751.776774] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:046D:C05A.0004/input/input16 (input)
UDEV  [248751.777157] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:046D:C05A.0004 (hid)
UDEV  [248751.793086] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
UDEV  [248751.793647] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)

(... and when I unplug it back in...)

KERNEL[248760.237040] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
KERNEL[248760.238077] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
KERNEL[248760.239495] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:046D:C05A.0005 (hid)
KERNEL[248760.239640] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:046D:C05A.0005/input/input17 (input)
KERNEL[248760.239766] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:046D:C05A.0005/input/input17/mouse0 (input)
KERNEL[248760.239825] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:046D:C05A.0005/input/input17/event4 (input)
KERNEL[248760.239890] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:046D:C05A.0005/hidraw/hidraw2 (hidraw)
UDEV  [248760.245352] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
UDEV  [248760.247013] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
UDEV  [248760.248589] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:046D:C05A.0005 (hid)
UDEV  [248760.250425] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:046D:C05A.0005/input/input17 (input)
UDEV  [248760.253363] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:046D:C05A.0005/hidraw/hidraw2 (hidraw)
UDEV  [248760.253436] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:046D:C05A.0005/input/input17/mouse0 (input)
UDEV  [248760.253610] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/0003:046D:C05A.0005/input/input17/event4 (input)

Thoughts on things to poke at next? Thanks! (I just noticed the suggested similar question — Mouse doesn't work until I reinstall xserver-xorg — and I'll try that, but this is pretty mysterious.)

Best Answer

Resolved!

It was the same "natural scrolling" config file that was the problem in https://askubuntu.com/a/905278/206388 as well. (Which i discovered by way of https://github.com/pwr/Solaar/issues/353 ) Somehow, i had updated something that made it no longer compatible and it was resulting in

I removed it and the mouse is back, just fine.

I will probably try the updated version of the config in How to enable natural scrolling with mouse in 17.04? but not today. Today, i will just catch up on lost work time.

As expected, it's there in the xinput list again:

$ xinput 
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech USB Mouse                        id=10   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Power Button                              id=7    [slave  keyboard (3)]
    ↳ Dell Dell USB Keyboard Hub                id=8    [slave  keyboard (3)]
    ↳ Dell Dell USB Keyboard Hub                id=9    [slave  keyboard (3)]
    ↳ HP WMI hotkeys                            id=11   [slave  keyboard (3)]
Related Question