USB Mouse needs to be re-plugged to be detected

Hello all, I am having a strange issue where sometimes on boot my mouse will not be detected and I have to unplug and re-plug it into the USB port. I tried 5.4, 5.6, and 5.7 kernels and the same issue happened on all three.

inxi -Fx

System:    Host: BIGBOSS Kernel: 5.7.9-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.1.0 Desktop: KDE Plasma 5.19.3 
           Distro: Manjaro Linux 
Machine:   Type: Desktop Mobo: Micro-Star model: B360 GAMING PLUS (MS-7B22) v: 2.0 serial: <root required> 
           UEFI: American Megatrends v: 2.60 date: 02/21/2019 
CPU:       Topology: 6-Core model: Intel Core i5-8400 bits: 64 type: MCP arch: Kaby Lake rev: A L2 cache: 9216 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 33613 
           Speed: 800 MHz min/max: 800/4000 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] vendor: Gigabyte 
           driver: amdgpu v: kernel bus ID: 03:00.0 
           Display: x11 server: X.Org 1.20.8 driver: amdgpu FAILED: ati unloaded: modesetting,radeon 
           resolution: 1920x1080~60Hz, 1920x1080~60Hz 
           OpenGL: renderer: AMD Radeon RX 5600 XT (NAVI10 DRM 3.37.0 5.7.9-1-MANJARO LLVM 10.0.0) v: 4.6 Mesa 20.1.3 
           direct render: Yes 
Audio:     Device-1: Intel Cannon Lake PCH cAVS vendor: Micro-Star MSI driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
           Device-2: Advanced Micro Devices [AMD/ATI] Navi 10 HDMI Audio driver: snd_hda_intel v: kernel bus ID: 03:00.1 
           Sound Server: ALSA v: k5.7.9-1-MANJARO 
Network:   Device-1: Intel Ethernet I219-V vendor: Micro-Star MSI driver: e1000e v: 3.2.6-k port: efa0 bus ID: 00:1f.6 
           IF: eno1 state: up speed: 1000 Mbps duplex: full mac: 00:d8:61:1a:52:79 
Drives:    Local Storage: total: 1.58 TiB used: 16.88 GiB (1.0%) 
           ID-1: /dev/sda vendor: Intel model: SSDSC2CT240A4 size: 223.57 GiB 
           ID-2: /dev/sdb vendor: Samsung model: SSD 850 EVO 500GB size: 465.76 GiB 
           ID-3: /dev/sdc vendor: Western Digital model: WD1001FALS-00J7B1 size: 931.51 GiB 
Partition: ID-1: / size: 122.84 GiB used: 16.85 GiB (13.7%) fs: ext4 dev: /dev/sda5 
Sensors:   System Temperatures: cpu: 35.0 C mobo: N/A gpu: amdgpu temp: 40 C 
           Fan Speeds (RPM): N/A gpu: amdgpu fan: 0 
Info:      Processes: 202 Uptime: 7m Memory: 15.58 GiB used: 1.48 GiB (9.5%) Init: systemd Compilers: gcc: 10.1.0 
           clang: 10.0.0 Shell: zsh v: 5.8 inxi: 3.0.37 

sudo dmesg | grep usb

[    0.331669] usbcore: registered new interface driver usbfs
[    0.331669] usbcore: registered new interface driver hub
[    0.331669] usbcore: registered new device driver usb
[    0.586533] usbcore: registered new interface driver usbserial_generic
[    0.586535] usbserial: USB Serial support registered for generic
[    1.189441] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.07
[    1.189442] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.189443] usb usb1: Product: xHCI Host Controller
[    1.189444] usb usb1: Manufacturer: Linux 5.7.9-1-MANJARO xhci-hcd
[    1.189444] usb usb1: SerialNumber: 0000:00:14.0
[    1.191058] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.07
[    1.191059] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.191060] usb usb2: Product: xHCI Host Controller
[    1.191060] usb usb2: Manufacturer: Linux 5.7.9-1-MANJARO xhci-hcd
[    1.191061] usb usb2: SerialNumber: 0000:00:14.0
[    1.518371] usb 1-9: new full-speed USB device number 2 using xhci_hcd
[    1.663187] usb 1-9: New USB device found, idVendor=22d4, idProduct=1803, bcdDevice= 2.00
[    1.663189] usb 1-9: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    1.663190] usb 1-9: Product: ENDGAME GEAR XM1
[    1.663190] usb 1-9: Manufacturer: LVT
[    1.788332] usb 1-10: new full-speed USB device number 3 using xhci_hcd
[    1.930319] usb 1-10: New USB device found, idVendor=0c45, idProduct=7691, bcdDevice= 0.65
[    1.930320] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    1.930321] usb 1-10: Product: USB Keyboard
[    1.930322] usb 1-10: Manufacturer: SONiX
[    8.699325] usbhid 1-9:1.0: can't add hid device: -71
[    8.699350] usbhid: probe of 1-9:1.0 failed with error -71
[    8.700179] usbhid 1-9:1.1: can't add hid device: -71
[    8.700198] usbhid: probe of 1-9:1.1 failed with error -71
[    8.703626] usbcore: registered new interface driver usbhid
[    8.703629] usbhid: USB HID core driver
[    8.709758] input: SONiX USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.0/0003:0C45:7691.0001/input/input18
[    8.765424] hid-generic 0003:0C45:7691.0001: input,hidraw0: USB HID v1.11 Keyboard [SONiX USB Keyboard] on usb-0000:00:14.0-10/input0
[    8.765751] input: SONiX USB Keyboard Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.1/0003:0C45:7691.0002/input/input19
[    8.822006] input: SONiX USB Keyboard System Control as /devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.1/0003:0C45:7691.0002/input/input20
[    8.822277] input: SONiX USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.1/0003:0C45:7691.0002/input/input21
[    8.822689] hid-generic 0003:0C45:7691.0002: input,hidraw1: USB HID v1.11 Keyboard [SONiX USB Keyboard] on usb-0000:00:14.0-10/input1

After I unplug and re-plug, the following lines appear:

[  107.219002] usb 1-9: USB disconnect, device number 2
[  109.596561] usb 1-9: new full-speed USB device number 4 using xhci_hcd
[  109.737881] usb 1-9: New USB device found, idVendor=22d4, idProduct=1803, bcdDevice= 2.00
[  109.737887] usb 1-9: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  109.737891] usb 1-9: Product: ENDGAME GEAR XM1
[  109.737894] usb 1-9: Manufacturer: LVT
[  109.740097] input: LVT ENDGAME GEAR XM1 as /devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9:1.0/0003:22D4:1803.0003/input/input22
[  109.740397] hid-generic 0003:22D4:1803.0003: input,hidraw2: USB HID v1.11 Mouse [LVT ENDGAME GEAR XM1] on usb-0000:00:14.0-9/input0
[  109.741804] input: LVT ENDGAME GEAR XM1 Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9:1.1/0003:22D4:1803.0004/input/input23
[  109.800122] input: LVT ENDGAME GEAR XM1 Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9:1.1/0003:22D4:1803.0004/input/input24
[  109.800355] hid-generic 0003:22D4:1803.0004: input,hiddev0,hidraw3: USB HID v1.00 Keyboard [LVT ENDGAME GEAR XM1] on usb-0000:00:14.0-9/input1

This problem does not occur on Windows using the same hardware. Any ideas?

First guess ..
Quick check is turn off TLP.
Most likely you want to add USB to its ignore section in the conf.

I disabled USB autosuspend in TLP and it didn't work. It looks like usbhid devices are automatically excluded from TLP suspend anyway.

Ah ok .. there were some tweaks to TLP being proposed in the past .. couldnt remember which/if applied.

Well .. its worth noting you are missing your latest BIOS - might want to consider updating.

Updated the BIOS. Same result.

interesting, just noticed the following in sudo dmesg | grep usb

[    0.329158] usbcore: registered new interface driver usbfs
[    0.329158] usbcore: registered new interface driver hub
[    0.329158] usbcore: registered new device driver usb
[    0.586178] usbcore: registered new interface driver usbserial_generic
[    0.586181] usbserial: USB Serial support registered for generic
[    1.164081] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.07
[    1.164082] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.164083] usb usb1: Product: xHCI Host Controller
[    1.164084] usb usb1: Manufacturer: Linux 5.7.9-1-MANJARO xhci-hcd
[    1.164084] usb usb1: SerialNumber: 0000:00:14.0
[    1.165821] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.07
[    1.165822] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.165822] usb usb2: Product: xHCI Host Controller
[    1.165823] usb usb2: Manufacturer: Linux 5.7.9-1-MANJARO xhci-hcd
[    1.165824] usb usb2: SerialNumber: 0000:00:14.0
[    1.494527] usb 1-5: new high-speed USB device number 2 using xhci_hcd
[    1.640254] usb 1-5: New USB device found, idVendor=054c, idProduct=0243, bcdDevice= 2.00
[    1.640260] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.640263] usb 1-5: Product: Storage Media
[    1.640267] usb 1-5: Manufacturer: Sony
[    1.640269] usb 1-5: SerialNumber: 5A0901150170950
[    1.764454] usb 1-9: new full-speed USB device number 3 using xhci_hcd
[    1.905886] usb 1-9: New USB device found, idVendor=22d4, idProduct=1803, bcdDevice= 2.00
[    1.905888] usb 1-9: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    1.905890] usb 1-9: Product: ENDGAME GEAR XM1
[    1.905891] usb 1-9: Manufacturer: LVT
[    2.034488] usb 1-10: new full-speed USB device number 4 using xhci_hcd
[    2.176152] usb 1-10: New USB device found, idVendor=0c45, idProduct=7691, bcdDevice= 0.65
[    2.176154] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    2.176155] usb 1-10: Product: USB Keyboard
[    2.176156] usb 1-10: Manufacturer: SONiX
[    3.642477] usb-storage 1-5:1.0: USB Mass Storage device detected
[    3.642547] scsi host6: usb-storage 1-5:1.0
[    3.642599] usbcore: registered new interface driver usb-storage
[    3.644753] usbcore: registered new interface driver uas
[    8.705332] usbhid 1-9:1.0: can't add hid device: -71
[    8.705355] usbhid: probe of 1-9:1.0 failed with error -71
[    8.706095] usbhid 1-9:1.1: can't add hid device: -71
[    8.706113] usbhid: probe of 1-9:1.1 failed with error -71
[    8.709424] usbcore: registered new interface driver usbhid
[    8.709427] usbhid: USB HID core driver
[    8.719004] input: SONiX USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.0/0003:0C45:7691.0001/input/input18
[    8.774862] hid-generic 0003:0C45:7691.0001: input,hidraw0: USB HID v1.11 Keyboard [SONiX USB Keyboard] on usb-0000:00:14.0-10/input0
[    8.775166] input: SONiX USB Keyboard Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.1/0003:0C45:7691.0002/input/input19
[    8.831522] input: SONiX USB Keyboard System Control as /devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.1/0003:0C45:7691.0002/input/input20
[    8.831836] input: SONiX USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.1/0003:0C45:7691.0002/input/input21
[    8.832222] hid-generic 0003:0C45:7691.0002: input,hidraw1: USB HID v1.11 Keyboard [SONiX USB Keyboard] on usb-0000:00:14.0-10/input1

What's with usbhid: probe of 1-9:1.1 failed with error -71?

Interestingly, I tried an older USB mouse that I have and it works fine. I wonder if this is a bad interaction with the hardware.

Forum kindly sponsored by