Bug 216903

Summary: /drivers/hid/hid-logitech-hidpp.c after 6.0 drop HiRes Scroll for Performance Mouse MX
Product: Drivers Reporter: berilko
Component: Input DevicesAssignee: drivers_input-devices
Status: RESOLVED CODE_FIX    
Severity: normal CC: bugzilla, stefan.bruens
Priority: P1    
Hardware: Other   
OS: Linux   
Kernel Version: 6.1+ Subsystem:
Regression: No Bisected commit-id:

Description berilko 2023-01-08 19:14:21 UTC
Since 6.1 Kernel driver for hid-logitech-hidpp no more detect Performance MX as FastScroll

Self-made patch is:
--- archlinux-linux/drivers/hid/hid-logitech-hidpp.c	2023-01-09 00:41:25.310773805 +0700
+++ archlinux-linux/drivers/hid/hid-logitech-hidpp.c	2023-01-09 01:09:10.844967608 +0700
@@ -3479,7 +3479,7 @@
 						  HIDPP_GET_REGISTER,
 						  HIDPP_ENABLE_FAST_SCROLL,
 						  NULL, 0, &response);
-		if (!ret) {
+		if (!ret || /* Patch for Performance MX */ hidpp->hid_dev->product == 0x101a) {
 			hidpp->capabilities |= HIDPP_CAPABILITY_HIDPP10_FAST_SCROLL;
 			hid_dbg(hidpp->hid_dev, "Detected HID++ 1.0 fast scroll\n");
 		}
Comment 1 Stefan BrĂ¼ns 2023-01-08 23:39:50 UTC
Unfortunately, the hires auto detection is broken for HID++1.0 devices.

https://elixir.bootlin.com/linux/latest/source/drivers/hid/hid-logitech-hidpp.c#L3477

```
		ret = hidpp_send_rap_command_sync(hidpp,
						  REPORT_ID_HIDPP_SHORT,
						  HIDPP_GET_REGISTER,
						  HIDPP_ENABLE_FAST_SCROLL,
						  NULL, 0, &response);
```

This command tries to read from register 0x40, while the FAST_SCROLL feature is BIT(6) (0x40) in register 0x01.

For my M705, enabling and disabling of FAST_SCROLL is possible (writing 0x42/0x02 to register 0x1), and the current setting can be read back.

I don't think auto-detection is possible for HID++1.0 devices.
Comment 3 berilko 2023-01-18 08:41:30 UTC
(In reply to Bastien Nocera from comment #2)
> Patch here:
> https://patchwork.kernel.org/project/linux-input/patch/20230116130937.391441-
> 1-hadess@hadess.net/

And when to expect inclusion in the master branch?
Comment 4 berilko 2023-04-04 06:47:51 UTC
Patch included in 6.1.16+ and 6.2.3+