From: Mark Pariente <markpariente@gmail.com>
To: Jiri Kosina <jikos@kernel.org>, Benjamin Tissoires <bentiss@kernel.org>
Cc: "Filipe Laíns" <lains@riseup.net>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
"Mark Pariente" <markpariente@gmail.com>,
stable@vger.kernel.org
Subject: [PATCH] HID: logitech-dj: Re-announce connected devices on reset-resume
Date: Sun, 18 Oct 2026 15:46:27 -0700 [thread overview]
Message-ID: <20261018224627.60328-1-markpariente@gmail.com> (raw)
If a receiver is reset on resume, for example because a USB KVM switch
moved it to another host while the system was suspended, its paired
devices may have reconnected to it while the host was not listening.
The connection notification the receiver queued for the host is lost
in the USB reset, so hid-logitech-hidpp never re-runs its connect
handling for the device.
Devices drop host-configured state when they reconnect, so whatever
hidpp configured on connect is silently lost. The most visible case is
HID++ 2.0 hi-res scrolling: the mouse reverts to low-resolution wheel
reports while hidpp keeps scaling them by the hi-res multiplier, so
scrolling becomes extremely slow (1/15 of the normal speed on an MX
Master 3) until the receiver is replugged or the mouse power cycled.
logi_dj_reset_resume() only switches the receiver back to DJ mode. Also
ask the receiver to re-announce its connected devices with the HID++
"fake device arrival" request, which is already used to query paired
devices on non-DJ receivers, and which Solaar sends to all receivers on
startup. The resulting connect notifications are forwarded to the
existing child devices, whose drivers then reconfigure them.
Reproduced with an MX Master 3 on a Unifying receiver (046d:c52b)
behind a USB KVM switch: suspend, switch the KVM away and back, move
the mouse while the host is still suspended, then resume. Without this
change the wheel stays in low-res mode with the hi-res multiplier
applied; with it, hidpp re-enables hi-res scrolling after resume.
Fixes: 534a7b8e10ec ("HID: Add full support for Logitech Unifying receivers")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=203421
Link: https://gitlab.freedesktop.org/libinput/libinput/-/issues/528
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Mark Pariente <markpariente@gmail.com>
---
Tested on Fedora's 7.2.11 kernel, with this change applied to the v7.2
driver and loaded as an out-of-tree module. Only tested with a Unifying
receiver (046d:c52b) and an MX Master 3; Lightspeed, Nano and 27 MHz
receivers were not tested. Investigation, patch and changelog were
drafted with an LLM coding assistant, then reviewed and tested by me.
drivers/hid/hid-logitech-dj.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index 6e8db01d27ec..cdb20fdc7b21 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -2010,6 +2010,16 @@ static int logi_dj_reset_resume(struct hid_device *hdev)
return 0;
logi_dj_recv_switch_to_dj_mode(djrcv_dev, 0);
+
+ /*
+ * Paired devices may have reconnected and lost their configuration
+ * (e.g. hi-res scrolling) while the receiver was unpowered or switched
+ * away by a KVM. Have the receiver re-announce connected devices so
+ * the child drivers run their connect handling again.
+ */
+ if (djrcv_dev->dj_mode && logi_dj_recv_query_hidpp_devices(djrcv_dev))
+ hid_err(hdev, "%s: failed to query connected devices\n", __func__);
+
return 0;
}
base-commit: ae6927c533a4454570950125ca8ba909c45f20f9
--
2.56.0
next reply other threads:[~2026-10-18 22:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-18 22:46 Mark Pariente [this message]
2026-10-18 23:02 ` [PATCH] HID: logitech-dj: Re-announce connected devices on reset-resume sashiko-bot
2026-10-18 23:31 ` Mark R. Pariente
2026-10-18 23:26 ` [PATCH v2 0/2] HID: logitech-dj: Restore device configuration after reset-resume Mark Pariente
2026-10-18 23:26 ` [PATCH v2 1/2] HID: logitech-dj: Don't add Unifying devices from HID++ notifications Mark Pariente
2026-10-18 23:26 ` [PATCH v2 2/2] HID: logitech-dj: Re-announce connected devices on reset-resume Mark Pariente
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261018224627.60328-1-markpariente@gmail.com \
--to=markpariente@gmail.com \
--cc=bentiss@kernel.org \
--cc=jikos@kernel.org \
--cc=lains@riseup.net \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox