Skip to content

HID: logitech-dj: Restore device configuration after reset-resume

Mark Pariente linux-input lkml sashiko-reviews stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 0 repliesNew

Changes in v2 from the cover letter

- New patch 1/2: don't add devices from HID++ connect notifications on Unifying receivers (reported by Sashiko).
- Patch 2/2: code unchanged; the commit message notes the dependency
on 1/2.
- v1: https://lore.kernel.org/linux-input/[email protected]/

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2HID: logitech-dj: Don't add Unifying devices from HID++ notificationsdrivers/hid/hid-logitech-dj.c+7 -10 replies
2/2HID: logitech-dj: Re-announce connected devices on reset-resumedrivers/hid/hid-logitech-dj.c+10 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] HID: logitech-dj: Restore device configuration after reset-resume

When a Unifying receiver is reset on resume, for example because a USB KVM switch moved it to another host while the system was suspended, devices that reconnected in the meantime lose their configuration. The most visible case is HID++ hi-res scrolling, which leaves the wheel about 15x slower. Patch 2 has the receiver re-announce its connected devices on reset-resume so that hidpp reconfigures them.

Sashiko pointed out that on Unifying receivers the re-announce can also hit slots without a known device, and that HID++ connect notifications then add those devices with an incomplete report descriptor. That can already happen today, e.g. when Solaar sends the same request on startup, so patch 1 fixes it separately: on Unifying receivers, unknown slots are enumerated through DJ notifications instead.

Changes in v2:
- New patch 1/2: don't add devices from HID++ connect notifications on Unifying receivers (reported by Sashiko).
- Patch 2/2: code unchanged; the commit message notes the dependency
on 1/2.
- v1: https://lore.kernel.org/linux-input/[email protected]/

Testing:
- Both patches applied to the v7.2 driver and loaded as an out-of-tree module on Fedora's 7.2.11 kernel, with an MX Master 3 on a Unifying receiver (046d:c52b) behind a USB KVM switch. Devices enumerate normally, and hi-res scrolling is restored after the reset-resume reproducer described in patch 2.
- The unknown-slot case fixed by patch 1 could not be reproduced here, because this KVM switch fully disconnects the receiver, so it was verified by code inspection only.
- Lightspeed, Nano and 27 MHz receivers were not tested; patch 1 does not change their behaviour, and patch 2 sends them the request logi_dj_recv_query_paired_devices() already uses for them.
- The investigation, patches and changelogs were drafted with an LLM coding assistant, then reviewed and tested by me.

Mark Pariente (2):
HID: logitech-dj: Don't add Unifying devices from HID++ notifications
HID: logitech-dj: Re-announce connected devices on reset-resume

 drivers/hid/hid-logitech-dj.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

base-commit: ae6927c533a4454570950125ca8ba909c45f20f9

Signature · 1 line
2.56.0