Bug 217523 - Since kernel 6.3.1 logitech unify receiver not working properly, part II
Summary: Since kernel 6.3.1 logitech unify receiver not working properly, part II
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Input Devices (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: drivers_input-devices
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-03 09:21 UTC by guy.b
Modified: 2023-06-25 08:05 UTC (History)
6 users (show)

See Also:
Kernel Version: 6.3.1
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description guy.b 2023-06-03 09:21:07 UTC
Hello,

Since kernel 6.3.1 the boot process hangs (~ 5 seconds) by uevent triggering and once booted and remove the unify receiver and plug it again there is a massive lag (~ 15 seconds) before that the receiver get ready for the mouse and keyboard to be functional.

Even with the patch (#38) from the first report it doesn't work, see here :

https://bugzilla.kernel.org/show_bug.cgi?id=217412

And for the Archlinux bug report and working kernel/patch :

linux-6.3.2.arch1-1.1-x86_64.pkg.tar.zst & linux-headers-6.3.2.arch1-1.1-x86_64.pkg.tar.zst

see here :

https://bugs.archlinux.org/task/78427

If more info are needed please let me know.

Thanks.
Comment 1 The Linux kernel's regression tracker (Thorsten Leemhuis) 2023-06-03 10:04:41 UTC
(In reply to guy.b from comment #0)
>
> If more info are needed please let me know.

FWIW, you ideally want bugs to be self-sufficient, links to other places and earlier discussion make things really hard to follow and confusing (and then developers might not bother to look closer). Thus a few questions:

* you mean this patch doesn't work https://git.kernel.org/torvalds/c/6199d23c91ce53bfed455f09a8c5ed170d516824 ?

* does the behaviour or anything in the logs change if you apply 6199d23c91ce5 ontop of a kernel that is broken (say 6.3.5) (side note: attaching logs from a failure case might be good)

* Do I rememberer correctly that reverting 586e8fede7953b1695b5ccc6112eff9b052e79ac fixed the problem for you?
Comment 2 guy.b 2023-06-03 10:25:48 UTC
(In reply to The Linux kernel's regression tracker (Thorsten Leemhuis) from comment #1)
> (In reply to guy.b from comment #0)
> >
> > If more info are needed please let me know.
> 
> FWIW, you ideally want bugs to be self-sufficient, links to other places and
> earlier discussion make things really hard to follow and confusing (and then
> developers might not bother to look closer). Thus a few questions:
> 
> * you mean this patch doesn't work
> https://git.kernel.org/torvalds/c/6199d23c91ce53bfed455f09a8c5ed170d516824 ?
> 
> * does the behaviour or anything in the logs change if you apply
> 6199d23c91ce5 ontop of a kernel that is broken (say 6.3.5) (side note:
> attaching logs from a failure case might be good)
> 
> * Do I rememberer correctly that reverting
> 586e8fede7953b1695b5ccc6112eff9b052e79ac fixed the problem for you?

Sorry for that but you suggested to open a new bug report. Anyway, the patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6199d23c91ce53bfed455f09a8c5ed170d516824 doesn't work. 

The behaviour doesn't change still boot hang and receiver lagging by unplug/plug again. I should try again to confirm what changes with that patch but if I remember well, the errors logitech-hidpp-device 0003:046D:405E.0004: hidpp_devicenametype_get_count: received protocol error 0x07 & kernel: logitech-hidpp-device 0003:046D:405E.0023: Couldn't get wheel multiplier (error -110) are gone.


Yes, reverting 586e8fede7953b1695b5ccc6112eff9b052e79ac fixed all the problems.
Comment 3 guy.b 2023-06-03 10:51:13 UTC
Just rebooted with kernel linux-6.3.2.arch1-1.1 patched with https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6199d23c91ce53bfed455f09a8c5ed170d516824. 

No log errors but the boot hangs 15 seconds by uevent triggering even worse then the kernel 6.3.1 (~5s). The unplug/plug the receiver hangs ~ 5s. Here the boot logs about logitech :

usb 1-8: new full-speed USB device number 2 using xhci_hcd
jun 03 12:36:19 Cockpit kernel: usb 1-8: New USB device found, idVendor=046d, idProduct=c52b, bcdDevice=24.10
jun 03 12:36:19 Cockpit kernel: usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=0
jun 03 12:36:19 Cockpit kernel: usb 1-8: Product: USB Receiver
jun 03 12:36:19 Cockpit kernel: usb 1-8: Manufacturer: Logitech
jun 03 12:36:19 Cockpit kernel: input: Logitech USB Receiver as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.0/0003:046D:C52B.0001/input/input4
jun 03 12:36:19 Cockpit kernel: hid-generic 0003:046D:C52B.0001: input,hidraw0: USB HID v1.11 Keyboard [Logitech USB Receiver] on usb-0000:00:14.0-8/input0
jun 03 12:36:19 Cockpit kernel: input: Logitech USB Receiver Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.1/0003:046D:C52B.0002/input/input5
jun 03 12:36:19 Cockpit kernel: input: Logitech USB Receiver Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.1/0003:046D:C52B.0002/input/input6
jun 03 12:36:19 Cockpit kernel: input: Logitech USB Receiver System Control as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.1/0003:046D:C52B.0002/input/input7
jun 03 12:36:19 Cockpit kernel: hid-generic 0003:046D:C52B.0002: input,hiddev96,hidraw1: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-0000:00:14.0-8/input1
jun 03 12:36:19 Cockpit kernel: hid-generic 0003:046D:C52B.0003: hiddev97,hidraw2: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:14.0-8/input2
jun 03 12:36:19 Cockpit kernel: usbcore: registered new interface driver usbhid
jun 03 12:36:19 Cockpit kernel: usbhid: USB HID core driver
jun 03 12:36:19 Cockpit kernel: logitech-djreceiver 0003:046D:C52B.0003: hiddev96,hidraw0: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:14.0-8/input2
jun 03 12:36:19 Cockpit kernel: input: Logitech Wireless Device PID:405e Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.2/0003:046D:C52B.0003/0003:046D:405E.0004/input/input9
jun 03 12:36:19 Cockpit kernel: input: Logitech Wireless Device PID:405e Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.2/0003:046D:C52B.0003/0003:046D:405E.0004/input/input10
jun 03 12:36:19 Cockpit kernel: hid-generic 0003:046D:405E.0004: input,hidraw1: USB HID v1.11 Keyboard [Logitech Wireless Device PID:405e] on usb-0000:00:14.0-8/input2:1
jun 03 12:36:19 Cockpit kernel: input: Logitech Wireless Device PID:2010 Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.2/0003:046D:C52B.0003/0003:046D:2010.0005/input/input14
jun 03 12:36:19 Cockpit kernel: hid-generic 0003:046D:2010.0005: input,hidraw2: USB HID v1.11 Keyboard [Logitech Wireless Device PID:2010] on usb-0000:00:14.0-8/input2:2
jun 03 12:36:19 Cockpit kernel: input: Logitech Wireless Device PID:101b Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.2/0003:046D:C52B.0003/0003:046D:101B.0006/input/input18
jun 03 12:36:19 Cockpit kernel: hid-generic 0003:046D:101B.0006: input,hidraw3: USB HID v1.11 Mouse [Logitech Wireless Device PID:101b] on usb-0000:00:14.0-8/input2:3
jun 03 12:36:19 Cockpit kernel: input: Logitech Wireless Device PID:405e as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.2/0003:046D:C52B.0003/0003:046D:405E.0004/input/input22
jun 03 12:36:19 Cockpit kernel: logitech-hidpp-device 0003:046D:405E.0004: input,hidraw1: USB HID v1.11 Keyboard [Logitech Wireless Device PID:405e] on usb-0000:00:14.0-8/input2:1
jun 03 12:36:19 Cockpit kernel: logitech-hidpp-device 0003:046D:405E.0004: HID++ 4.5 device connected.
jun 03 12:36:19 Cockpit kernel: input: Logitech Wireless Device PID:2010 as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.2/0003:046D:C52B.0003/0003:046D:2010.0005/input/input23
jun 03 12:36:19 Cockpit kernel: logitech-hidpp-device 0003:046D:2010.0005: input,hidraw2: USB HID v1.11 Keyboard [Logitech Wireless Device PID:2010] on usb-0000:00:14.0-8/input2:2
jun 03 12:36:19 Cockpit kernel: input: Logitech Wireless Device PID:101b as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.2/0003:046D:C52B.0003/0003:046D:101B.0006/input/input24
jun 03 12:36:19 Cockpit kernel: logitech-hidpp-device 0003:046D:101B.0006: input,hidraw3: USB HID v1.11 Mouse [Logitech Wireless Device PID:101b] on usb-0000:00:14.0-8/input2:3

And in xfce > parameters > mouse/keyboard the devices are not named by name (Logitech Marathon 705) but by PID (Logitech Wireless Device PID:405e).

Hope it helps.
Comment 4 guy.b 2023-06-03 10:56:50 UTC
Sorry ! In #3 rebooted with kernel linux-6.3.5.arch1-1.1 patched not with kernel linux-6.3.2.arch1-1.1.
Comment 5 guy.b 2023-06-03 11:16:35 UTC
After a few minutes of idle and then moving the mouse I get an error in journalctl -f :

kernel: logitech-hidpp-device 0003:046D:405E.0010: Couldn't get wheel multiplier (error -110)
Comment 6 vova7890 2023-06-04 21:58:21 UTC
Same problem. I researched this some time ago. I noticed that if I add a small delay between commands to the dongle - everything goes fine. Repeated request(586e8fede7953b1695b5ccc6112eff9b052e79ac) made the situation more visible
Comment 7 L K 2023-06-05 17:29:25 UTC
I am running the latest 6.4-rc5 kernel released June 04, 2023. The patch from https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6199d23c91ce53bfed455f09a8c5ed170d516824 that is part of 6.4-rc5 only partly addresses the issues I am running into. 

Setup: 

Keyboard: Logitech K860
Mouse: Logitech MX Master 3

Both input devices are connected to logitech unifying receiver. 

I share the devices between two computers (OS X and Linux) using a USB-3 KVM switch. 

The two issues I see: 

* On boot, the keyboard (Logitech K860) and mouse (MX Master 3) take long to be recognized for me to type the LUKS password. 
* When I switch computers via KVM, the keyboard is detected ~2s after switch but the mouse takes forever (~6s) to be recognized. (FWIW, the switch to OS X via the same switch is almost instant - I can type and use the mouse almost instantly post switch). 

The patch above fixes the boot time recognition of the devices. I can now type the LUKS password without much delays (My perceived delay is 1 to 2s - not the end of the world). 

However, the patch does not address issue (2) for me and is reproducible 100% of the time. 

This tells me there is another code path that is still unaddressed by the patch above. 

Logs from dmesg - kvm switched to OS X and back 

```
[ 1509.899185] usb 1-9.3: USB disconnect, device number 11
[ 1509.899188] usb 1-9.3.3: USB disconnect, device number 12
[ 1509.900496] usb 1-9.3.4: USB disconnect, device number 13
[ 1510.153491] usb 2-9.3: USB disconnect, device number 4
[ 4434.537624] usb 2-9.3: new SuperSpeed USB device number 5 using xhci_hcd
[ 4434.567418] usb 2-9.3: New USB device found, idVendor=05e3, idProduct=0626, bcdDevice= 6.63
[ 4434.567420] usb 2-9.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4434.567421] usb 2-9.3: Product: USB3.1 Hub
[ 4434.567422] usb 2-9.3: Manufacturer: GenesysLogic
[ 4434.587411] hub 2-9.3:1.0: USB hub found
[ 4434.588737] hub 2-9.3:1.0: 4 ports detected
[ 4434.654070] usb 1-9.3: new high-speed USB device number 14 using xhci_hcd
[ 4434.765226] usb 1-9.3: New USB device found, idVendor=05e3, idProduct=0610, bcdDevice= 6.63
[ 4434.765228] usb 1-9.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4434.765229] usb 1-9.3: Product: USB2.1 Hub
[ 4434.765230] usb 1-9.3: Manufacturer: GenesysLogic
[ 4434.766483] hub 1-9.3:1.0: USB hub found
[ 4434.766772] hub 1-9.3:1.0: 4 ports detected
[ 4435.070726] usb 1-9.3.3: new full-speed USB device number 15 using xhci_hcd
[ 4435.188861] usb 1-9.3.3: New USB device found, idVendor=04f3, idProduct=0c3d, bcdDevice= 1.65
[ 4435.188863] usb 1-9.3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4435.188864] usb 1-9.3.3: Product: ELAN:Fingerprint
[ 4435.188864] usb 1-9.3.3: Manufacturer: ELAN
[ 4435.304103] usb 1-9.3.4: new full-speed USB device number 16 using xhci_hcd
[ 4435.423570] usb 1-9.3.4: New USB device found, idVendor=046d, idProduct=c52b, bcdDevice=24.11
[ 4435.423572] usb 1-9.3.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4435.423573] usb 1-9.3.4: Product: USB Receiver
[ 4435.423574] usb 1-9.3.4: Manufacturer: Logitech
[ 4435.447698] logitech-djreceiver 0003:046D:C52B.0012: hiddev97,hidraw2: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:14.0-9.3.4/input2
[ 4435.618166] logitech-hidpp-device 0003:046D:4088.0013: HID++ 4.5 device connected.
[ 4435.819995] logitech-hidpp-device 0003:046D:4088.0013: hidpp_devicenametype_get_count: received protocol error 0x07
[ 4436.278638] input: Logitech Wireless Device PID:4088 as /devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9.3/1-9.3.4/1-9.3.4:1.2/0003:046D:C52B.0012/0003:046D:4088.0013/input/input39
[ 4436.279050] logitech-hidpp-device 0003:046D:4088.0013: input,hidraw3: USB HID v1.11 Keyboard [Logitech Wireless Device PID:4088] on usb-0000:00:14.0-9.3.4/input2:1
[ 4436.373201] logitech-hidpp-device 0003:046D:4082.0014: HID++ 4.5 device connected.
[ 4436.481864] logitech-hidpp-device 0003:046D:4082.0014: hidpp_devicenametype_get_count: received protocol error 0x07
[ 4436.904455] input: Logitech Wireless Device PID:4082 as /devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9.3/1-9.3.4/1-9.3.4:1.2/0003:046D:C52B.0012/0003:046D:4082.0014/input/input40
[ 4436.904863] logitech-hidpp-device 0003:046D:4082.0014: input,hidraw4: USB HID v1.11 Keyboard [Logitech Wireless Device PID:4082] on usb-0000:00:14.0-9.3.4/input2:2
[ 4442.101049] input: Logitech I\xe7\xe0\x04 as /devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9.3/1-9.3.4/1-9.3.4:1.2/0003:046D:C52B.0012/0003:046D:1028.0015/input/input41
[ 4442.101476] logitech-hidpp-device 0003:046D:1028.0015: input,hidraw6: USB HID v1.11 Mouse [Logitech I\xe7\xe0\x04] on usb-0000:00:14.0-9.3.4/input2:3
```

Happy to perform any testing and report back.
Comment 8 L K 2023-06-05 17:29:48 UTC
I am running the latest 6.4-rc5 kernel released June 04, 2023. The patch from https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6199d23c91ce53bfed455f09a8c5ed170d516824 that is part of 6.4-rc5 only partly addresses the issues I am running into. 

Setup: 

Keyboard: Logitech K860
Mouse: Logitech MX Master 3

Both input devices are connected to logitech unifying receiver. 

I share the devices between two computers (OS X and Linux) using a USB-3 KVM switch. 

The two issues I see: 

* On boot, the keyboard (Logitech K860) and mouse (MX Master 3) take long to be recognized for me to type the LUKS password. 
* When I switch computers via KVM, the keyboard is detected ~2s after switch but the mouse takes forever (~6s) to be recognized. (FWIW, the switch to OS X via the same switch is almost instant - I can type and use the mouse almost instantly post switch). 

The patch above fixes the boot time recognition of the devices. I can now type the LUKS password without much delays (My perceived delay is 1 to 2s - not the end of the world). 

However, the patch does not address issue (2) for me and is reproducible 100% of the time. 

This tells me there is another code path that is still unaddressed by the patch above. 

Logs from dmesg - kvm switched to OS X and back 

```
[ 1509.899185] usb 1-9.3: USB disconnect, device number 11
[ 1509.899188] usb 1-9.3.3: USB disconnect, device number 12
[ 1509.900496] usb 1-9.3.4: USB disconnect, device number 13
[ 1510.153491] usb 2-9.3: USB disconnect, device number 4
[ 4434.537624] usb 2-9.3: new SuperSpeed USB device number 5 using xhci_hcd
[ 4434.567418] usb 2-9.3: New USB device found, idVendor=05e3, idProduct=0626, bcdDevice= 6.63
[ 4434.567420] usb 2-9.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4434.567421] usb 2-9.3: Product: USB3.1 Hub
[ 4434.567422] usb 2-9.3: Manufacturer: GenesysLogic
[ 4434.587411] hub 2-9.3:1.0: USB hub found
[ 4434.588737] hub 2-9.3:1.0: 4 ports detected
[ 4434.654070] usb 1-9.3: new high-speed USB device number 14 using xhci_hcd
[ 4434.765226] usb 1-9.3: New USB device found, idVendor=05e3, idProduct=0610, bcdDevice= 6.63
[ 4434.765228] usb 1-9.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4434.765229] usb 1-9.3: Product: USB2.1 Hub
[ 4434.765230] usb 1-9.3: Manufacturer: GenesysLogic
[ 4434.766483] hub 1-9.3:1.0: USB hub found
[ 4434.766772] hub 1-9.3:1.0: 4 ports detected
[ 4435.070726] usb 1-9.3.3: new full-speed USB device number 15 using xhci_hcd
[ 4435.188861] usb 1-9.3.3: New USB device found, idVendor=04f3, idProduct=0c3d, bcdDevice= 1.65
[ 4435.188863] usb 1-9.3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4435.188864] usb 1-9.3.3: Product: ELAN:Fingerprint
[ 4435.188864] usb 1-9.3.3: Manufacturer: ELAN
[ 4435.304103] usb 1-9.3.4: new full-speed USB device number 16 using xhci_hcd
[ 4435.423570] usb 1-9.3.4: New USB device found, idVendor=046d, idProduct=c52b, bcdDevice=24.11
[ 4435.423572] usb 1-9.3.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4435.423573] usb 1-9.3.4: Product: USB Receiver
[ 4435.423574] usb 1-9.3.4: Manufacturer: Logitech
[ 4435.447698] logitech-djreceiver 0003:046D:C52B.0012: hiddev97,hidraw2: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:14.0-9.3.4/input2
[ 4435.618166] logitech-hidpp-device 0003:046D:4088.0013: HID++ 4.5 device connected.
[ 4435.819995] logitech-hidpp-device 0003:046D:4088.0013: hidpp_devicenametype_get_count: received protocol error 0x07
[ 4436.278638] input: Logitech Wireless Device PID:4088 as /devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9.3/1-9.3.4/1-9.3.4:1.2/0003:046D:C52B.0012/0003:046D:4088.0013/input/input39
[ 4436.279050] logitech-hidpp-device 0003:046D:4088.0013: input,hidraw3: USB HID v1.11 Keyboard [Logitech Wireless Device PID:4088] on usb-0000:00:14.0-9.3.4/input2:1
[ 4436.373201] logitech-hidpp-device 0003:046D:4082.0014: HID++ 4.5 device connected.
[ 4436.481864] logitech-hidpp-device 0003:046D:4082.0014: hidpp_devicenametype_get_count: received protocol error 0x07
[ 4436.904455] input: Logitech Wireless Device PID:4082 as /devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9.3/1-9.3.4/1-9.3.4:1.2/0003:046D:C52B.0012/0003:046D:4082.0014/input/input40
[ 4436.904863] logitech-hidpp-device 0003:046D:4082.0014: input,hidraw4: USB HID v1.11 Keyboard [Logitech Wireless Device PID:4082] on usb-0000:00:14.0-9.3.4/input2:2
[ 4442.101049] input: Logitech I\xe7\xe0\x04 as /devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9.3/1-9.3.4/1-9.3.4:1.2/0003:046D:C52B.0012/0003:046D:1028.0015/input/input41
[ 4442.101476] logitech-hidpp-device 0003:046D:1028.0015: input,hidraw6: USB HID v1.11 Mouse [Logitech I\xe7\xe0\x04] on usb-0000:00:14.0-9.3.4/input2:3
```

Happy to perform any testing and report back.
Comment 9 Jiri Kosina 2023-06-06 13:26:39 UTC
This is now solved by

    https://git.kernel.org/linus/7c28afd5512e371773dbb2bf95a31ed5625651d9

in Linus' tree.
Comment 10 guy.b 2023-06-06 21:10:52 UTC
Tested right now and can confirm that the boot delay and unplug/plug hang is solved with :

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6199d23c91ce53bfed455f09a8c5ed170d516824
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7c28afd5512e371773dbb2bf95a31ed5625651d9

Applied on Archlinux kernel linux-6.3.6.arch1-1.3-x86_64

Thanks a lot.
Comment 11 vova7890 2023-06-06 23:54:21 UTC
Same for me
Comment 12 L K 2023-06-07 13:21:04 UTC
Confirming boot delay is fixed and also KVM switch delay is now fixed on linux master HEAD a4d7d7011219 with this patch. I suddenly find joy in using my computer again. Thanks for your good work!
Comment 13 Bastien Nocera 2023-06-25 08:05:02 UTC
Closing as per comment 10, comment 11 and comment 12.

Note You need to log in before you can comment on or make changes to this bug.