Cannot connect USB keyboard and mouse through KVM switch

Need help with peripherals or devices?
Post Reply
Message
Author
User avatar
creektivity
Posts: 11
Joined: 2020-02-29 00:51

Cannot connect USB keyboard and mouse through KVM switch

#1 Post by creektivity »

As far as I understand (not much!), the gist of the problem seems to be that the system does not "see" the external keyboard (K) or mouse (M).

It was working, but when I changed the connection from a direct connection between my Debian laptop and the external K/M to a connection through a KVM switch (to accommodate a newly added laptop), it worked ONCE but then, after switching to the other laptop (running Windows 10 and working fine) and back, the external monitor is still connected (via VGA) and shows my Debian laptop, but the external K/M are unresponsive (even though they are getting power as indicated by their lights). The built-in K/M on the laptop do still work.

More details: I'm running Debian 10/Gnome 3.30.2 on a 64-bit Dell Latitude E6230 laptop. The external K/M are PS/2 devices both connected to a single USB adapter. The monitor is a Dell P2210, and the connection is as such:

External K/M > adapter > monitor downstream USB
Monitor upstream USB > (one) KVM switch USB port > (two) USB ports (one on each laptop)

KVM switch is IOGEAR model GCS72U, which is a manually switched non-emulated switch that acts like a simple switched USB hub (per IOGEAR's support).

User avatar
Bloom
Posts: 378
Joined: 2017-11-11 12:23
Been thanked: 1 time

Re: Cannot connect USB keyboard and mouse through KVM switch

#2 Post by Bloom »

This is from last year, but I see it has never been answered.

Modern KVM switches are often presented to a Debian system as a Logitech Human interface Device. The system loads the module hid_logitech_dj and that doesn't work, so gone are your usb keyboard and mouse.
To try if this is the problem, try executing via ssh or via a directly coupled keyboard and mouse:

Code: Select all

sudo /sbin/rmmod hid_logitech_dj
If after executing this command your KVM keyboard and mouse work, this is the culprit. So disable it permanently, use this:

Code: Select all

echo "blacklist hid_logitech_dj" | sudo tee /etc/modprobe.d/logitech_dj.conf
This will be loaded upon your next reboot and blacklists the problematic Logitech module. You will need to do this on every Linux system connected to such a KBM switch. Windows has no such problem and will work with the KVM keyboard and mouse.

User avatar
creektivity
Posts: 11
Joined: 2020-02-29 00:51

Re: Cannot connect USB keyboard and mouse through KVM switch

#3 Post by creektivity »

That did not work and that module does not seem to be loaded:

Code: Select all

root@watercourse2:/home/brian# /sbin/rmmod hid_logitech_dj
rmmod: ERROR: Module hid_logitech_dj is not currently loaded
Thank you for your response and please let me know if you have other ideas.

User avatar
Bloom
Posts: 378
Joined: 2017-11-11 12:23
Been thanked: 1 time

Re: Cannot connect USB keyboard and mouse through KVM switch

#4 Post by Bloom »

What is make and model of your KVM switch?

I have found one from Kceve that doesn't use that Logitech module either and still refuses to have Linux work with the keyboard and mouse attached to the proper KVM ports. I got it to work by using an exteral usb hub on the cable that comes from the first Linux pc and then attaching a micro mouse and the kvm switch pc port to that hub. And presto! Suddenly the KVM mouse and keyboard work. It seems to have something to do with EDID scanning where a Linux pc doesn't recognize the KVM mouse and keyboard als proper HID devices and so doesn't use them although they are sometimes seen with lsusb. Weird things.

User avatar
creektivity
Posts: 11
Joined: 2020-02-29 00:51

Re: Cannot connect USB keyboard and mouse through KVM switch

#5 Post by creektivity »

This is an iogear 2-port USB cable KVM switch, model GCS72U.

Don't know whether this is relevant, but the switch has separate USB ports for the K and M, but since my K and M are both plugged into a (Dell P2210) monitor, I just run the one USB upstream cable from the monitor to one of the ports in the switch (leaving the other empty).

This works fine for the Windows machine, but for my Linux laptop I need to unplug the upstream cable from the switch directly into a USB port on the laptop for it to work.

There are other strange things that can happen with screen resolution, etc., but generally I know how to work around them. Am just wondering whether there's a way to fix it without having to work-around.

Post Reply