Situation
I have a peripheral mouse and keyboard connected to a USB port on a Thunderbolt 3 dock.
Mouse (or keyboard) <---USB---> Thunderbolt 3 dock <---TB3---> NotebookThe notebook is a Razer Blade 2019 Advanced with RTX2070 Max-Q, running the NVIDIA 460 driver. The Thunderbolt 3 dock is a HP Elite Thunderbolt 3 dock. All with newest BIOS and firmware upgrades. The issue appears regardless of mouse and keyboard make.
Issue
The mouse (and keyboard) hangs or freezes after I stopped moving / using it. When I plug it into the USB port of the Thunderbolt 3 dock it works flawlessly until I stop moving or using it. Sometimes I can move a second time but only very shortly.
Forensics
The logs show nothing. There is nothing indicative compared to plugging the devices into a USB port on the laptop itself. I attached a log to this post at the end.
Kernel version is 5.8.0-48-generic. I tried disabling any autosuspend options with setting e.g. usbcore.autosuspend=-1 kernel commandline. I checked powertop and set everything to Bad. Since the Thunderbolt 3 port is connected to the RTX2070 discrete GPU, I tried the nouveau driver and the same issue applies. I removed tlp and the issue still applies.
The mouse does not disappear from the device tree when it freezes. I tried to observe differences in the /sys/bus/usb/devices/.../power and other files comparing when the device is connected to an internal USB port vs. a USB port on the Thunderbolt 3 dock. I could not find any differences.
I can replicate the behavior without replugging by going into the respective /sys/bus/usb/devices/7-1/7-1.2 folder and reauthorizing the device, e.g.echo 0 > authorized; echo 1 > authorized. Every time I do so, the mouse can very shortly be used until I stop moving it and then it freezes again.
I tried setting the level and control and others in the /sys/.../power folder to on, but it doesn't change anything.
Others
Other USB devices (e.g. flashdrives) don't have this issue on the USB ports of the Thunderbolt 3 dock. I tried also other HID devices and the issue persists.
The problem does not appear on other non-Linux OSes, e.g. Windows.
The problem appears also on Live USB.
The problem appears also with the nouveau driver.
The problem appears on any USB port on the Thunderbolt 3 dock.
The problem also appears with Fedora 33,34.
Syslog: When replugging the USB mouse
Apr 10 15:02:25 blade kernel: [ 1760.207524] usb 7-1.2: new full-speed USB device number 6 using xhci_hcd
Apr 10 15:02:26 blade kernel: [ 1760.437240] usb 7-1.2: New USB device found, idVendor=046d, idProduct=c332, bcdDevice= 3.02
Apr 10 15:02:26 blade kernel: [ 1760.437245] usb 7-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 10 15:02:26 blade kernel: [ 1760.437249] usb 7-1.2: Product: Gaming Mouse G502
Apr 10 15:02:26 blade kernel: [ 1760.437252] usb 7-1.2: Manufacturer: Logitech
Apr 10 15:02:26 blade kernel: [ 1760.437254] usb 7-1.2: SerialNumber:
Apr 10 15:02:26 blade kernel: [ 1760.447749] input: Logitech Gaming Mouse G502 as /devices/pci0000:00/0000:00:1d.4/0000:04:00.0/0000:05:01.0/0000:07:00.0/0000:08:00.0/0000:09:00.0/usb7/7-1/7-1.2/7-1.2:1.0/0003:046D:C332.0013/input/input61
Apr 10 15:02:26 blade kernel: [ 1760.448299] hid-generic 0003:046D:C332.0013: input,hidraw1: USB HID v1.11 Mouse [Logitech Gaming Mouse G502] on usb-0000:09:00.0-1.2/input0
Apr 10 15:02:26 blade kernel: [ 1760.450590] input: Logitech Gaming Mouse G502 Keyboard as /devices/pci0000:00/0000:00:1d.4/0000:04:00.0/0000:05:01.0/0000:07:00.0/0000:08:00.0/0000:09:00.0/usb7/7-1/7-1.2/7-1.2:1.1/0003:046D:C332.0014/input/input62
Apr 10 15:02:26 blade kernel: [ 1760.507664] input: Logitech Gaming Mouse G502 Consumer Control as /devices/pci0000:00/0000:00:1d.4/0000:04:00.0/0000:05:01.0/0000:07:00.0/0000:08:00.0/0000:09:00.0/usb7/7-1/7-1.2/7-1.2:1.1/0003:046D:C332.0014/input/input63
Apr 10 15:02:26 blade kernel: [ 1760.507811] input: Logitech Gaming Mouse G502 System Control as /devices/pci0000:00/0000:00:1d.4/0000:04:00.0/0000:05:01.0/0000:07:00.0/0000:08:00.0/0000:09:00.0/usb7/7-1/7-1.2/7-1.2:1.1/0003:046D:C332.0014/input/input64
Apr 10 15:02:26 blade kernel: [ 1760.508071] hid-generic 0003:046D:C332.0014: input,hiddev0,hidraw9: USB HID v1.11 Keyboard [Logitech Gaming Mouse G502] on usb-0000:09:00.0-1.2/input1
Apr 10 15:02:26 blade mtp-probe: checking bus 7, device 6: "/sys/devices/pci0000:00/0000:00:1d.4/0000:04:00.0/0000:05:01.0/0000:07:00.0/0000:08:00.0/0000:09:00.0/usb7/7-1/7-1.2"
Apr 10 15:02:26 blade mtp-probe: bus: 7, device: 6 was not an MTP device
Apr 10 15:02:26 blade boltd[1361]: probing: started [1000]
Apr 10 15:02:26 blade mtp-probe: checking bus 7, device 6: "/sys/devices/pci0000:00/0000:00:1d.4/0000:04:00.0/0000:05:01.0/0000:07:00.0/0000:08:00.0/0000:09:00.0/usb7/7-1/7-1.2"
Apr 10 15:02:26 blade mtp-probe: bus: 7, device: 6 was not an MTP device
Apr 10 15:02:29 blade boltd[1361]: probing: timeout, done: [2863040] (2000000) 6 2 Answers
This is a bigger issue
This apparently can't be answered easily and is indicative of a larger problem with and inside internal systems such as BIOS, drivers and local firmware. Apparently, the issue is widespread also with other combinations of Thunderbolt 3 devices.
The reader might consult these sources for further reference:
- USB over thunderbolt turns off every once in a while in Ubuntu Launchpad bug database
- Linux + Nvidia driver + dock station + external monitors in Nvidia Linux forums.
Ubuntu does not support Thunderbolt 3: