Bug 97928 - libinput: Logitech USB-PS/2 Optical Mouse: Failed to create a device for /dev/input/event2 - mouse not working after resume
Summary: libinput: Logitech USB-PS/2 Optical Mouse: Failed to create a device for /dev...
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/libinput (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Peter Hutterer
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-26 08:00 UTC by Frederik Himpe
Modified: 2016-11-28 04:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Complete Xorg.0.log (80.70 KB, text/plain)
2016-09-26 08:00 UTC, Frederik Himpe
no flags Details

Description Frederik Himpe 2016-09-26 08:00:27 UTC
Created attachment 126784 [details]
Complete Xorg.0.log

After resuming my system, in some cases my external mouse connected to my docking station does not work in X. The mouse pointer is there, but I cannot move it with my external mouse. The laptop's track point works fine though. Reconnecting the mouse does not help.

I'm using libinput 1.5.0 with xorg libinput driver 0.19.0 on Debian Stretch/Sid.

Xorg.0.log contains this:
[ 90829.866] (II) config/udev: Adding input device Logitech USB-PS/2 Optical Mouse (/dev/input/mouse1)
[ 90829.866] (II) No input driver specified, ignoring this device.
[ 90829.866] (II) This device may have been added with another device file.
[ 90829.903] (II) config/udev: Adding input device Logitech USB-PS/2 Optical Mouse (/dev/input/event2)
[ 90829.903] (**) Logitech USB-PS/2 Optical Mouse: Applying InputClass "evdev pointer catchall"
[ 90829.903] (**) Logitech USB-PS/2 Optical Mouse: Applying InputClass "libinput pointer catchall"
[ 90829.903] (II) systemd-logind: returning pre-existing fd for /dev/input/event2 13:66
[ 90829.903] (II) Using input driver 'libinput' for 'Logitech USB-PS/2 Optical Mouse'
[ 90829.903] (**) Logitech USB-PS/2 Optical Mouse: always reports core events
[ 90829.903] (**) Option "Device" "/dev/input/event2"
[ 90829.903] (**) Option "_source" "server/udev"
[ 90829.904] (II) failed to create input device '/dev/input/event2'.
[ 90829.905] (EE) libinput: Logitech USB-PS/2 Optical Mouse: Failed to create a device for /dev/input/event2
[ 90829.905] (EE) PreInit returned 2 for "Logitech USB-PS/2 Optical Mouse"
[ 90829.905] (II) UnloadModule: "libinput"
[ 90829.905] (II) systemd-logind: not releasing fd for 13:66, still in use


lsusb:
Bus 003 Device 021: ID 046d:c03d Logitech, Inc. M-BT96a Pilot Optical Mouse

libinput-list-devices:
Device:           Logitech USB-PS/2 Optical Mouse
Kernel:           /dev/input/event2
Group:            4
Seat:             seat0, default
Capabilities:     pointer 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      n/a
Scroll methods:   button
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   flat *adaptive
Rotation:         n/a

evemu-describe:
Available devices:
/dev/input/event0:	AT Translated Set 2 keyboard
/dev/input/event1:	PS/2 Generic Mouse
/dev/input/event2:	Logitech USB-PS/2 Optical Mouse
/dev/input/event3:	SynPS/2 Synaptics TouchPad
/dev/input/event4:	Sleep Button
/dev/input/event5:	Lid Switch
/dev/input/event6:	Power Button
/dev/input/event7:	HP Wireless hotkeys
/dev/input/event8:	ST LIS3LV02DL Accelerometer
/dev/input/event9:	HP HD Webcam [Fixed]
/dev/input/event10:	HP WMI hotkeys
/dev/input/event11:	Video Bus
/dev/input/event12:	HDA Digital PCBeep
/dev/input/event13:	HDA Intel PCH Mic
/dev/input/event14:	HDA Intel PCH Line
/dev/input/event15:	HDA Intel PCH Dock Line Out
/dev/input/event16:	HDA Intel PCH Headphone
/dev/input/event17:	HDA Intel PCH HDMI/DP,pcm=3
/dev/input/event18:	HDA Intel PCH HDMI/DP,pcm=7
/dev/input/event19:	HDA Intel PCH HDMI/DP,pcm=8
Select the device event number [0-19]: 2
# EVEMU 1.2
# Input device name: "Logitech USB-PS/2 Optical Mouse"
# Input device ID: bus 0x03 vendor 0x46d product 0xc03d version 0x110
# Supported events:
#   Event type 0 (EV_SYN)
#     Event code 0 (SYN_REPORT)
#     Event code 1 (SYN_CONFIG)
#     Event code 2 (SYN_MT_REPORT)
#     Event code 3 (SYN_DROPPED)
#     Event code 4 ((null))
#     Event code 5 ((null))
#     Event code 6 ((null))
#     Event code 7 ((null))
#     Event code 8 ((null))
#     Event code 9 ((null))
#     Event code 10 ((null))
#     Event code 11 ((null))
#     Event code 12 ((null))
#     Event code 13 ((null))
#     Event code 14 ((null))
#   Event type 1 (EV_KEY)
#     Event code 272 (BTN_LEFT)
#     Event code 273 (BTN_RIGHT)
#     Event code 274 (BTN_MIDDLE)
#   Event type 2 (EV_REL)
#     Event code 0 (REL_X)
#     Event code 1 (REL_Y)
#     Event code 8 (REL_WHEEL)
#   Event type 4 (EV_MSC)
#     Event code 4 (MSC_SCAN)
# Properties:
N: Logitech USB-PS/2 Optical Mouse
I: 0003 046d c03d 0110
P: 00 00 00 00 00 00 00 00
B: 00 0b 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 07 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 02 03 01 00 00 00 00 00 00
B: 03 00 00 00 00 00 00 00 00
B: 04 10 00 00 00 00 00 00 00
B: 05 00 00 00 00 00 00 00 00
B: 11 00 00 00 00 00 00 00 00
B: 12 00 00 00 00 00 00 00 00
B: 14 00 00 00 00 00 00 00 00
B: 15 00 00 00 00 00 00 00 00
B: 15 00 00 00 00 00 00 00 00

dmesg when connecting:
[90825.909964] usb 3-1.1: new low-speed USB device number 21 using xhci_hcd
[90826.003723] usb 3-1.1: New USB device found, idVendor=046d, idProduct=c03d
[90826.003728] usb 3-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[90826.003731] usb 3-1.1: Product: USB-PS/2 Optical Mouse
[90826.003732] usb 3-1.1: Manufacturer: Logitech
[90826.007400] input: Logitech USB-PS/2 Optical Mouse as /devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1.1/3-1.1:1.0/0003:046D:C03D.0008/input/input105
Comment 1 Peter Hutterer 2016-10-14 04:46:21 UTC
I wonder if that's an incarnation of bug 97880, if the device usually works but not after suspend that suggests the fds are messed up
Comment 2 Peter Hutterer 2016-10-19 02:12:03 UTC
any chance you can try with the patch linked to in bug 97880?
Comment 3 Peter Hutterer 2016-10-19 05:25:45 UTC
I managed to reproduce the issue while I was trying to debug something else. This is triggered when a device is removed while the fd paused. Specifically:

* vt switch away
* plug a USB keyboard/mouse/... in, this triggers something like:
[ 53688.564] (II) systemd-logind: got fd for /dev/input/event2 13:66 fd 16 paused 1
* when VT-switching to the server now, the device enables and everything is fine

but this sequence here breaks things:

* vt switch away
* plug a USB keyboard/mouse/... in, this triggers something like:
[ 53688.564] (II) systemd-logind: got fd for /dev/input/event2 13:66 fd 16 paused 1
* unplug the device again (nothing in the log)
* replug the device
* vt switch back to the server, device is now broken
Comment 5 Peter Hutterer 2016-11-28 04:31:57 UTC
fixed with the patches leading up to 

commit d13cb974426f7f1110b0bdb08c4ebb46ff8975f7
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Oct 21 06:27:57 2016 +1000

    ddx: add new call to purge input devices that weren't added


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.