KM with mouse roaming having difficulties with auto switching

Sorry for lack of reply, never saw the email with your question.

Everything works on the KVM side. I just switched to a wired mouse, instead of using the MX Ergo. Once that switch was made, everything functioned perfectly. I’m pretty convinced it was the MX Ergo’s problem. (Currently using a Logitech G502X, but have also used a Razer Basilisk, and a corsair Dark Core - all have worked perfectly.)

What I have NOT tried is any other wireless mouse, as I only have a bunch of MX Ergos on the wireless side of things.

Solved: Logitech Unifying mice break KM roaming on Linux — blacklist hid_logitech_dj

Setup: 4-Port KM with Mouse Roaming. PC1/PC3 Windows, PC2 Fedora 44. Logitech MX Anywhere 2 on a Unifying receiver.

Symptom: Worked for weeks, then the mouse only worked on the Fedora box. Hotkey beeped but nothing moved; manually selecting PC1/PC3 gave a dead mouse there too (keyboard fine). Replugging the receiver fixed PC1/PC3 — until the Fedora machine’s USB cable was reconnected,
which killed it instantly, selected or not. A wired mouse was always fine.

Cause: Linux’s hid_logitech_dj puts the receiver into Logitech’s proprietary “DJ mode”, whereit stops emitting standard HID mouse reports. The KM is a USB proxy and needs those reports to do roaming. Two things make it stick: the KM is the receiver’s real USB host, so switching PCs never power-cycles it; and DJ mode lives in the receiver, so once Linux sets it the Windows hosts can’t read the mouse either — which is why it looks like the switch has died.

Why it worked for weeks: on the good boots the command was failing —

logitech-djreceiver: logi_dj_recv_switch_to_dj_mode error:-110

-110 = timeout (19× in one boot), so the receiver stayed in plain mode. After a replug it finally succeeded, and roaming died. Nothing in my config changed; a race just landed the other way.

Fix (Linux host only):

printf ‘blacklist hid_logitech_dj\nblacklist hid_logitech_hidpp\n’ | sudo tee /etc/modprobe.d/km-no-logitech-dj.conf
sudo modprobe -r hid_logitech_hidpp hid_logitech_dj

Then unplug/replug the receiver. It comes back on hid-generic and roaming works on all three PCs.

modprobe -r alone won’t do it — udev reloads the module on the next replug, so the blacklist file is the part that sticks. Also check sudo lsinitrd | grep hid_logitech; if present, run sudo dracut -f. Cost: no HID++ extras (battery %, Solaar, DPI); movement/scroll/buttons unaffected.

Dead ends, to save others time: USB autosuspend on the KM’s hub chain (break was instant, not idle-triggered), and sysfs-rebinding the mouse to hid-generic with the DJ driver still loaded (it refuses HID++ children and leaves the device unbound — mouse goes dead, replug to recover).

Wendell — this may be the “kernel module that’s not loaded” from this thread, except inverted: one that is loaded and shouldn’t be. Possibly worth a line in the Linux docs, since it presents as the switch failing for every host.

1 Like