You are not logged in.

#1 2018-07-20 17:03:10

poeh
Member
Registered: 2018-07-20
Posts: 3

Mouse not working when connected to monitor's USB hub

Hi,

A couple of days ago I decided to install archlinux on my laptop, I like it so far, but am experiencing some problems with connecting my mouse.

My laptop (XPS 15) is connected to an external monitor using a thunderbolt 2 connection (with a thunderbolt 3 to 2 adapter).
This external monitor has a built-in USB hub to which I have connected my keyboard and mouse (Logitech G502).

The keyboard functions properly, but the problem is that the mouse does not function when connected to this hub. I can't move the pointer or click in the desktop environment (i3).
Its LED lights up and it shows up in `lsusb` and `xinput`, but it doesn't trigger any events in `xev`.
Output of `lsusb`:

Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 006: ID 0bda:0411 Realtek Semiconductor Corp.
Bus 004 Device 005: ID 0bda:0411 Realtek Semiconductor Corp.
Bus 004 Device 002: ID 043e:9a11 LG Electronics USA, Inc.
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 010: ID 046d:c07d Logitech, Inc. G502 Mouse
Bus 003 Device 014: ID 046d:c335 Logitech, Inc. G910 Orion Spectrum Mechanical Keyboard
Bus 003 Device 012: ID 0bda:5411 Realtek Semiconductor Corp.
Bus 003 Device 011: ID 0bda:5411 Realtek Semiconductor Corp.
Bus 003 Device 002: ID 043e:9a10 LG Electronics USA, Inc.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 27c6:5395
Bus 001 Device 002: ID 0cf3:e300 Qualcomm Atheros Communications
Bus 001 Device 004: ID 0c45:671d Microdia
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Output of `lsusb -t`:

/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 10000M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 1: Dev 5, If 0, Class=Hub, Driver=hub/4p, 5000M
            |__ Port 1: Dev 6, If 0, Class=Hub, Driver=hub/4p, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 11, If 0, Class=Hub, Driver=hub/4p, 480M
            |__ Port 3: Dev 14, If 0, Class=Human Interface Device, Driver=usbhid, 12M        << Keyboard
            |__ Port 3: Dev 14, If 1, Class=Human Interface Device, Driver=usbhid, 12M        << Keyboard
            |__ Port 1: Dev 12, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 3: Dev 10, If 0, Class=Human Interface Device, Driver=usbhid, 12M        << Mouse
        |__ Port 3: Dev 10, If 1, Class=Human Interface Device, Driver=usbhid, 12M        << Mouse
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 10000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
    |__ Port 4: Dev 2, If 1, Class=Wireless, Driver=btusb, 12M
    |__ Port 4: Dev 2, If 0, Class=Wireless, Driver=btusb, 12M
    |__ Port 7: Dev 3, If 0, Class=Communications, Driver=cdc_acm, 12M
    |__ Port 7: Dev 3, If 1, Class=CDC Data, Driver=cdc_acm, 12M
    |__ Port 12: Dev 4, If 1, Class=Video, Driver=uvcvideo, 480M
    |__ Port 12: Dev 4, If 0, Class=Video, Driver=uvcvideo, 480M

Output of `xinput`:

⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Wacom HID 488E Finger                     id=13   [slave  pointer  (2)]
⎜   ↳ SYNA2393:00 06CB:7A13 Touchpad            id=14   [slave  pointer  (2)]
⎜   ↳ PS/2 Generic Mouse                        id=25   [slave  pointer  (2)]
⎜   ↳ Logitech Gaming Mouse G502                id=15   [slave  pointer  (2)]
⎜   ↳ Logitech Gaming Mouse G502                id=17   [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)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ Power Button                              id=9    [slave  keyboard (3)]
    ↳ Sleep Button                              id=10   [slave  keyboard (3)]
    ↳ Integrated_Webcam_HD: Integrate           id=11   [slave  keyboard (3)]
    ↳ Wacom HID 488E Pen                        id=12   [slave  keyboard (3)]
    ↳ Intel HID events                          id=20   [slave  keyboard (3)]
    ↳ Intel HID 5 button array                  id=21   [slave  keyboard (3)]
    ↳ Dell WMI hotkeys                          id=22   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=23   [slave  keyboard (3)]
    ↳ Logitech Gaming Mouse G502                id=16   [slave  keyboard (3)]
    ↳ Logitech Gaming Keyboard G910             id=18   [slave  keyboard (3)]
    ↳ Logitech Gaming Keyboard G910             id=19   [slave  keyboard (3)]

If I connect the G502 directly to an USB port on the laptop it does function properly.
An other (cheap/unbranded) mouse does work when connected to the monitor's USB hub.
Interestingly the G502 connected through the monitor's USB hub does function in the UEFI settings menu.

The following `dmesg` messages are printed when I connect the G502 to one of the monitor's usb ports:

[ 2337.909992] usb 3-1.3: new full-speed USB device number 8 using xhci_hcd
[ 2338.130077] usb 3-1.3: New USB device found, idVendor=046d, idProduct=c07d, bcdDevice=88.02
[ 2338.130080] usb 3-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2338.130082] usb 3-1.3: Product: Gaming Mouse G502
[ 2338.130084] usb 3-1.3: Manufacturer: Logitech
[ 2338.130086] usb 3-1.3: SerialNumber: 056533743533
[ 2338.139248] input: Logitech Gaming Mouse G502 as /devices/pci0000:00/0000:00:1b.0/0000:02:00.0/0000:03:01.0/0000:05:00.0/0000:06:03.0/0000:07:00.0/usb3/3-1/3-1.3/3-1.3:1.0/0003:046D:C07D.0008/input/input36
[ 2338.139444] hid-generic 0003:046D:C07D.0008: input,hidraw3: USB HID v1.11 Mouse [Logitech Gaming Mouse G502] on usb-0000:07:00.0-1.3/input0
[ 2338.141373] input: Logitech Gaming Mouse G502 as /devices/pci0000:00/0000:00:1b.0/0000:02:00.0/0000:03:01.0/0000:05:00.0/0000:06:03.0/0000:07:00.0/usb3/3-1/3-1.3/3-1.3:1.1/0003:046D:C07D.0009/input/input37
[ 2338.196999] hid-generic 0003:046D:C07D.0009: input,hiddev1,hidraw4: USB HID v1.11 Keyboard [Logitech Gaming Mouse G502] on usb-0000:07:00.0-1.3/input1

In the Xorg.0.log the following is reported when connecting the mouse to the monitor:

[  7615.810] (II) config/udev: Adding input device Logitech Gaming Mouse G502 (/dev/input/mouse0)
[  7615.810] (II) No input driver specified, ignoring this device.
[  7615.810] (II) This device may have been added with another device file.
[  7615.931] (II) config/udev: Adding input device Logitech Gaming Mouse G502 (/dev/input/event6)
[  7615.932] (**) Logitech Gaming Mouse G502: Applying InputClass "libinput keyboard catchall"
[  7615.932] (II) Using input driver 'libinput' for 'Logitech Gaming Mouse G502'
[  7615.934] (II) systemd-logind: got fd for /dev/input/event6 13:70 fd 31 paused 0
[  7615.934] (**) Logitech Gaming Mouse G502: always reports core events
[  7615.934] (**) Option "Device" "/dev/input/event6"
[  7615.934] (**) Option "_source" "server/udev"
[  7615.936] (II) event6  - Logitech Gaming Mouse G502: is tagged by udev as: Keyboard
[  7615.936] (II) event6  - Logitech Gaming Mouse G502: device is a keyboard
[  7615.936] (II) event6  - Logitech Gaming Mouse G502: device removed
[  7615.936] (II) libinput: Logitech Gaming Mouse G502: needs a virtual subdevice
[  7615.936] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1b.0/0000:02:00.0/0000:03:01.0/0000:05:00.0/0000:06:03.0/0000:07:00.0/usb3/3-1/3-1.1/$
[  7615.936] (II) XINPUT: Adding extended input device "Logitech Gaming Mouse G502" (type: MOUSE, id 18)
[  7615.936] (**) Option "AccelerationScheme" "none"
[  7615.936] (**) Logitech Gaming Mouse G502: (accel) selected scheme none/0
[  7615.936] (**) Logitech Gaming Mouse G502: (accel) acceleration factor: 2.000
[  7615.936] (**) Logitech Gaming Mouse G502: (accel) acceleration threshold: 4
[  7615.938] (II) event6  - Logitech Gaming Mouse G502: is tagged by udev as: Keyboard
[  7615.938] (II) event6  - Logitech Gaming Mouse G502: device is a keyboard
[  7615.938] (**) Logitech Gaming Mouse G502: Applying InputClass "libinput keyboard catchall"
[  7615.938] (II) Using input driver 'libinput' for 'Logitech Gaming Mouse G502'
[  7615.938] (II) systemd-logind: returning pre-existing fd for /dev/input/event6 13:70
[  7615.938] (**) Logitech Gaming Mouse G502: always reports core events
[  7615.938] (**) Option "Device" "/dev/input/event6"
[  7615.938] (**) Option "_source" "_driver/libinput"
[  7615.938] (II) libinput: Logitech Gaming Mouse G502: is a virtual subdevice
[  7615.938] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1b.0/0000:02:00.0/0000:03:01.0/0000:05:00.0/0000:06:03.0/0000:07:00.0/usb3/3-1/3-1.1/$
[  7615.938] (II) XINPUT: Adding extended input device "Logitech Gaming Mouse G502" (type: KEYBOARD, id 19)
[  7615.957] (II) config/udev: Adding input device Logitech Gaming Mouse G502 (/dev/input/event5)
[  7615.957] (**) Logitech Gaming Mouse G502: Applying InputClass "libinput pointer catchall"
[  7615.957] (II) Using input driver 'libinput' for 'Logitech Gaming Mouse G502'
[  7616.013] (II) systemd-logind: got fd for /dev/input/event5 13:69 fd 58 paused 0
[  7616.013] (**) Logitech Gaming Mouse G502: always reports core events
[  7616.013] (**) Option "Device" "/dev/input/event5"
[  7616.013] (**) Option "_source" "server/udev"
[  7616.015] (II) event5  - Logitech Gaming Mouse G502: is tagged by udev as: Mouse
[  7616.015] (II) event5  - Logitech Gaming Mouse G502: device is a pointer
[  7616.015] (II) event5  - Logitech Gaming Mouse G502: device removed
[  7616.015] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1b.0/0000:02:00.0/0000:03:01.0/0000:05:00.0/0000:06:03.0/0000:07:00.0/usb3/3-1/3-1.1/$
[  7616.015] (II) XINPUT: Adding extended input device "Logitech Gaming Mouse G502" (type: MOUSE, id 25)
[  7616.015] (**) Option "AccelerationScheme" "none"
[  7616.015] (**) Logitech Gaming Mouse G502: (accel) selected scheme none/0
[  7616.015] (**) Logitech Gaming Mouse G502: (accel) acceleration factor: 2.000
[  7616.015] (**) Logitech Gaming Mouse G502: (accel) acceleration threshold: 4
[  7616.017] (II) event5  - Logitech Gaming Mouse G502: is tagged by udev as: Mouse
[  7616.017] (II) event5  - Logitech Gaming Mouse G502: device is a pointer

I would like to just keep my mouse connected to the monitor, this way I can easily use the mouse for my laptops and desktop just by switching the input on my monitor.

Does anyone have an idea what could cause this problem or a suggestion on how to find the problem?

Offline

#2 2018-07-20 21:04:52

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,843

Re: Mouse not working when connected to monitor's USB hub

Do you get input at eg. /usr/lib/libinput/libinput-debug-events, evtest or simply "sudo cat /dev/input/eventN"?
What is certainly interesting is that the mouse shows up as multiple devices (not the additional keyboard, that's "normal" with ultra-cool gaming mice, but you've double entries for mouse and actual keyboard)

Offline

#3 2018-07-21 00:11:00

poeh
Member
Registered: 2018-07-20
Posts: 3

Re: Mouse not working when connected to monitor's USB hub

In `evtest` and `libinput debug-events` the mouse is displayed twice, but both show no input when moving/clicking the mouse. Below is the list of devices from `evtest`:

Available devices:
/dev/input/event0:	Lid Switch
/dev/input/event1:	Power Button
/dev/input/event2:	Sleep Button
/dev/input/event3:	Power Button
/dev/input/event4:	AT Translated Set 2 keyboard
/dev/input/event5:	Intel HID events
/dev/input/event6:	Intel HID 5 button array
/dev/input/event7:	Dell WMI hotkeys
/dev/input/event8:	PC Speaker
/dev/input/event9:	SynPS/2 Synaptics TouchPad
/dev/input/event10:	Integrated_Webcam_HD: Integrate
/dev/input/event11:	SYNA2393:00 06CB:7A13 Touchpad
/dev/input/event12:	Wacom HID 488E Pen
/dev/input/event13:	Wacom HID 488E Finger
/dev/input/event14:	Video Bus
/dev/input/event15:	Video Bus
/dev/input/event16:	HDA Intel PCH Headphone Mic
/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
/dev/input/event20:	HDA Intel PCH HDMI/DP,pcm=9
/dev/input/event21:	HDA Intel PCH HDMI/DP,pcm=10
/dev/input/event23:	Logitech Gaming Keyboard G910
/dev/input/event24:	Logitech Gaming Keyboard G910
/dev/input/event25:	Logitech Gaming Mouse G502
/dev/input/event26:	Logitech Gaming Mouse G502

I just found a (cumbersome) way get the mouse working by suspending and unsuspending the laptop (while the mouse is connected to the monitor's USB hub). I have not yet done anything to configure/setup suspend, so there are probably some things going wrong when suspending (such as a problem with bbswitch not being able to enable the dGPU; also the fans seem to just keep spinning when the laptop is suspended, I'm not sure if that is supposed to happen or maybe I didn't wait long enough?).
I am not sure why the mouse starts working after suspending and resuming.

`evtest`, `lsusb` and `xinput` show the same devices as before but the tests now of course do show input when moving/clicking the mouse.
Below is the output from dmesg related to the suspending and resuming:

[ 9125.623517] PM: suspend entry (s2idle)
[ 9125.623517] PM: Syncing filesystems ... done.
[ 9125.655024] bbswitch: enabling discrete graphics
[ 9125.655043] pci 0000:01:00.0: Refused to change power state, currently in D3
[ 9125.655046] Freezing user space processes ... (elapsed 0.001 seconds) done.
[ 9125.656452] OOM killer disabled.
[ 9125.656452] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 9125.657572] Suspending console(s) (use no_console_suspend to debug)
[ 9125.659226] wlp59s0: deauthenticating from 6c:70:9f:ea:32:3e by local choice (Reason: 3=DEAUTH_LEAVING)
[ 9126.049207] thunderbolt 0000:04:00.0: stopping RX ring 0
[ 9126.049223] thunderbolt 0000:04:00.0: disabling interrupt at register 0x38200 bit 12 (0x1001 -> 0x1)
[ 9126.049232] thunderbolt 0000:04:00.0: stopping TX ring 0
[ 9126.049247] thunderbolt 0000:04:00.0: disabling interrupt at register 0x38200 bit 0 (0x1 -> 0x0)
[ 9126.049254] thunderbolt 0000:04:00.0: control channel stopped
[ 9126.129920] thunderbolt 0000:04:00.0: control channel starting...
[ 9126.129925] thunderbolt 0000:04:00.0: starting TX ring 0
[ 9126.130126] thunderbolt 0000:04:00.0: enabling interrupt at register 0x38200 bit 0 (0x0 -> 0x1)
[ 9126.130136] thunderbolt 0000:04:00.0: starting RX ring 0
[ 9126.130277] thunderbolt 0000:04:00.0: enabling interrupt at register 0x38200 bit 12 (0x1 -> 0x1001)
[ 9126.153830] pci 0000:01:00.0: Refused to change power state, currently in D3
[ 9126.155123] thunderbolt 0000:04:00.0: stopping RX ring 0
[ 9126.155145] thunderbolt 0000:04:00.0: disabling interrupt at register 0x38200 bit 12 (0x1001 -> 0x1)
[ 9126.155166] thunderbolt 0000:04:00.0: stopping TX ring 0
[ 9126.155188] thunderbolt 0000:04:00.0: disabling interrupt at register 0x38200 bit 0 (0x1 -> 0x0)
[ 9126.155208] thunderbolt 0000:04:00.0: control channel stopped

[ 9162.666267] thunderbolt 0000:04:00.0: control channel starting...
[ 9162.666268] thunderbolt 0000:04:00.0: starting TX ring 0
[ 9162.666283] thunderbolt 0000:04:00.0: enabling interrupt at register 0x38200 bit 0 (0x0 -> 0x1)
[ 9162.666284] thunderbolt 0000:04:00.0: starting RX ring 0
[ 9162.666294] thunderbolt 0000:04:00.0: enabling interrupt at register 0x38200 bit 12 (0x1 -> 0x1001)
[ 9162.671772] pci 0000:01:00.0: Refused to change power state, currently in D3
[ 9162.701104] pci 0000:01:00.0: Refused to change power state, currently in D3
[ 9162.708904] [drm] HuC: Loaded firmware i915/kbl_huc_ver02_00_1810.bin (version 2.0)
[ 9162.714177] [drm] GuC: Loaded firmware i915/kbl_guc_ver9_39.bin (version 9.39)
[ 9162.714285] i915 0000:00:02.0: GuC firmware version 9.39
[ 9162.714286] i915 0000:00:02.0: GuC submission enabled
[ 9162.714286] i915 0000:00:02.0: HuC enabled
[ 9163.061656] ata3: SATA link down (SStatus 4 SControl 300)
[ 9163.428305] ath10k_pci 0000:3b:00.0: Unknown eventid: 118809
[ 9163.431344] ath10k_pci 0000:3b:00.0: Unknown eventid: 90118
[ 9164.054428] OOM killer enabled.
[ 9164.054430] Restarting tasks ... 
[ 9164.055700] usb 6-1.1.1: USB disconnect, device number 10
[ 9164.056092] done.
[ 9164.136491] usb 6-1.1: reset SuperSpeed USB device number 9 using xhci_hcd
[ 9164.143306] PM: suspend exit
[ 9164.463065] usb 6-1.1.1: new SuperSpeed USB device number 11 using xhci_hcd
[ 9164.475356] usb 6-1.1: USB disconnect, device number 9
[ 9164.616858] usb 6-1: reset SuperSpeed USB device number 2 using xhci_hcd
[ 9164.960154] usb 6-1.1: new SuperSpeed USB device number 12 using xhci_hcd
[ 9164.996763] usb 6-1.1: New USB device found, idVendor=0bda, idProduct=0411, bcdDevice= 1.17
[ 9164.996768] usb 6-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 9164.996771] usb 6-1.1: Product: 4-Port USB 3.0 Hub
[ 9164.996774] usb 6-1.1: Manufacturer: Generic
[ 9165.006183] hub 6-1.1:1.0: USB hub found
[ 9165.008144] hub 6-1.1:1.0: 4 ports detected
[ 9165.309357] usb 6-1.1.1: new SuperSpeed USB device number 13 using xhci_hcd
[ 9165.344136] usb 6-1.1.1: New USB device found, idVendor=0bda, idProduct=0411, bcdDevice= 1.17
[ 9165.344143] usb 6-1.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 9165.344148] usb 6-1.1.1: Product: 4-Port USB 3.0 Hub
[ 9165.344152] usb 6-1.1.1: Manufacturer: Generic
[ 9165.352962] hub 6-1.1.1:1.0: USB hub found
[ 9165.354967] hub 6-1.1.1:1.0: 4 ports detected
[ 9169.001843] wlp59s0: authenticate with 6c:70:9f:ea:32:3e
[ 9169.049705] wlp59s0: send auth to 6c:70:9f:ea:32:3e (try 1/3)
[ 9169.151663] wlp59s0: send auth to 6c:70:9f:ea:32:3e (try 2/3)
[ 9169.153551] wlp59s0: authenticated
[ 9169.155072] wlp59s0: associate with 6c:70:9f:ea:32:3e (try 1/3)
[ 9169.159094] wlp59s0: RX AssocResp from 6c:70:9f:ea:32:3e (capab=0x1411 status=0 aid=4)
[ 9169.161869] wlp59s0: associated
[ 9169.244804] wlp59s0: Limiting TX power to 20 (20 - 0) dBm as advertised by 6c:70:9f:ea:32:3e

When disconnecting and reconnecting the mouse from and to the monitor's USB hub the mouse stops functioning again.
I find this all very strange. Do you have any idea why this happens or suggestions on how to make the mouse work without suspending the laptop?

Offline

#4 2018-07-21 05:14:33

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,843

Re: Mouse not working when connected to monitor's USB hub

Try passing "usbcore.autosuspend=-1" to the kernel parameters.
Do you use powersaving stuff like tlp, laptop-mode-tools or powertop --autotune? (They'll likely override the above parameter - it's possible to limit the impact, but for testing purposes you better disable those things first)

Offline

#5 2018-07-21 18:43:42

poeh
Member
Registered: 2018-07-20
Posts: 3

Re: Mouse not working when connected to monitor's USB hub

I have `TLP` and `powertop` installed but don't really use them and have the services disabled.
Passing the "usbcore.autosuspend=-1" kernel parameter does not seem to have any effect.

Offline

Board footer

Powered by FluxBB