Bug 207465

Summary: [regression] Logitech G700s extra G buttons don't work in wireless mode
Product: Drivers Reporter: Andrey Semashev (andysem)
Component: Input DevicesAssignee: drivers_input-devices
Status: NEW ---    
Severity: normal CC: benjamin.tissoires, fabio.ornellas
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 5.4.0 Subsystem:
Regression: Yes Bisected commit-id:
Attachments: Output of `libinput list-devices` when the mouse is wired
Output of `libinput list-devices` when the mouse is wireless
Kernel log
lsusb output
lspci output

Description Andrey Semashev 2020-04-27 13:56:59 UTC
Created attachment 288765 [details]
Output of `libinput list-devices` when the mouse is wired

Starting with Linux kernel 5.4.0, extra buttons G4-G10 on the side and top of the Logitech G700s mouse don't work when the mouse is connected over the wireless dongle. The buttons do work in wired connection.

The problem is not present with kernel 5.3.18. It is present with 5.4.28, 5.5.19, 5.6.7.

In wireless mode, the `libinput list-devices` command does not show additional input devices, including the keyboard device, associated with the mouse. Only the "Logitech G700s" pointer device is shown.
Comment 1 Andrey Semashev 2020-04-27 13:57:30 UTC
Created attachment 288767 [details]
Output of `libinput list-devices` when the mouse is wireless
Comment 2 Andrey Semashev 2020-04-27 13:58:41 UTC
Created attachment 288769 [details]
Kernel log
Comment 3 Andrey Semashev 2020-04-27 13:59:49 UTC
Created attachment 288771 [details]
lsusb output
Comment 4 Andrey Semashev 2020-04-27 14:00:38 UTC
Created attachment 288773 [details]
lspci output
Comment 5 Andrey Semashev 2020-04-27 14:01:49 UTC
This may be related to https://bugzilla.kernel.org/show_bug.cgi?id=204519 , although that bug describes the opposite problem (the buttons didn't work in wired mode).
Comment 6 Andrey Semashev 2020-04-27 14:45:21 UTC
The workaround is to blacklist hid_logitech_hidpp and hid_logitech_dj modules. After that the buttons start working as expected.
Comment 7 Fabio Pugliese Ornellas 2020-05-19 11:16:10 UTC
When I hook the receiver, I get https://pastebin.com/hUSZA63G:

```
[396619.063389] logitech-djreceiver 0003:046D:C531.003E: logi_dj_hidpp_event: invalid device index:254
```

I was looking at recent changes, and I'm guessing this commit is to blame:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=992ff2cc9ec6e30ccc64c341b052e8ccb370db90
Comment 8 Fabio Pugliese Ornellas 2020-05-19 11:28:49 UTC
PS: Wireshark USB packet capture on G700s dongle connect:

https://www.dropbox.com/s/nhk23xuucckaof2/g700s.pcapng?dl=1