Mouse freezes after boot with ATEN KVM-switch

Hi,

I run Fedora 32-cinnamon and have an ATEN CS 1924 4-Port KVM-switch (Display port). When I boot Fedora my mouse does not always work after boot.

I’ve done some testing and it seems like something triggers the loading of the mouse driveer during boot. If I slowly move the mouse during the boot process it almost always work but if I on the other hand just marks Fedora 32 in my grub menu and leave the computer for +10 mins it almost never works when I come back.

I have a Logitech mouse and keyboard attached to the KVM-switch and the keyboard always work as it should.

I have updated the switch with the latest firmware but that is probably older than Fedora 32. Should that really be the problem? The mouse is a simple usb mouse and probably older than both Fedora 32 and the KVM-switch…

  1. Is there a way to solve this
  2. Is there some service to restart so that I don’t have to reboot every time this happens.

If the mouse works after boot it’s very rarly freezes later on. Also switching between computers have no positive or negative impact. CentOS7 on the same host does not have this problem. I think it has happened with CentOS8 on the same host but it was a long time ago. Maybe before FW-upgrade.

Help is appreciated.

Regards,
/Fredrik

USB-Kernel bugs are quite common iI recently became aware of. syzkaller/found_bugs_usb.md at master · google/syzkaller · GitHub

Edit: in the case you have a port for an USB Hub/Switch on that KVM, you may want to try this port for your mouse. Not the one marked as special mouse port.

Are you using the newest 5.12 kernel? If yes maybe try an older one.

Test fedora 34 live cd and see if you have same problems. Anyway in a few days your version is an unsupported one.

If everything fails check out barrier, it shares mouse and keyboard over network.

Thanks for your answers. Yes, I use the latest kernel released 5 day ago but I’ve been having this problem with all kernels last year or so. Using an older kernel could probably be a solutions since CentOS7 doesn’t have this problem but I prefer to keep the system updated with the latest patches. However, an update to 33 or 34 will likely happen shortly. Don’t know if it solves the problem or makes it worse…

Hi,

I’m using the combination of an ATEN KVM (CS1764A) and a Logitech wireless desktop set myself, this is indeed a somewhat tricky combination.

I might be able to help, but first I need more info, so I have a bunch of questions for you:

  1. Are your mouse and/or mouse+keyboard wireless too ?

  2. Is the KVM pointed to the machine you are booting while it is booted (some input devices actually use 2 way communication when they are proped during boot and for the communication from the input-device back to the machine which is booting to work the KVM switch needs to point to the machine while it is booting).

  3. Can you run “ls -l /sys/bus/hid/devices/*/driver” in a terminal and copy and paste the output in your next reply?

  4. Can you also run “lsusb” and “lsusb -t” and provide the output of both commands please?

Regards,

Hans

In any case, good luck!

RHEL 8.4 recently announced GA
https://developers.redhat.com/articles/2021/05/19/red-hat-enterprise-linux-84-now-generally-available#

and CentOS 9 is in the make.
https://blog.centos.org/2021/05/centos-community-newsletter-may-2021-2105/

Hey Hans, welcome back again. :grinning:

Hi Hans,

Thanks for the help.

Yes I have to make the KVM point to the machine that boots otherwise the auto-resolution stuff doesn’t work as I want.

No, neither the mouse nor the keyboard are wireless. Plain old usb kabel connected directly to the KVM-switch. Ironically I bought cabled usb to reduce the risk for trouble… I think I had problem with a Dell usb wired mouse as well.

The three commands are pasted below. The mouse was working when I ran the commands if that makes any difference to your analysis.
Let me know if there is anything else I can provide.

Regards,
/Fredrik

[root@lighthouse ~]# ls -l /sys/bus/hid/devices/*/driver
lrwxrwxrwx. 1 root root 0 25 maj 20.41 /sys/bus/hid/devices/0003:046D:C30E.0001/driver → …/…/…/…/…/…/…/…/…/…/bus/hid/drivers/hid-generic
lrwxrwxrwx. 1 root root 0 25 maj 20.41 /sys/bus/hid/devices/0003:046D:C30E.0002/driver → …/…/…/…/…/…/…/…/…/…/bus/hid/drivers/hid-generic
lrwxrwxrwx. 1 root root 0 25 maj 20.41 /sys/bus/hid/devices/0003:046D:C30E.0003/driver → …/…/…/…/…/…/…/…/…/…/bus/hid/drivers/hid-generic

[root@lighthouse ~]# lsusb
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 05e3:0745 Genesys Logic, Inc. Logilink CR0012
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 011 Device 002: ID 0557:2410 ATEN International Co., Ltd 4-Port USB 3.0 Hub
Bus 011 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 010 Device 004: ID 046d:c30e Logitech, Inc. UltraX Keyboard (Y-BL49)
Bus 010 Device 003: ID 0557:8021 ATEN International Co., Ltd Hub
Bus 010 Device 002: ID 0557:5411 ATEN International Co., Ltd 4-Port USB 2.0 Hub
Bus 010 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

[root@lighthouse ~]# lsusb -t
/: Bus 11.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
|__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
/: Bus 10.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
|__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 3: Dev 3, If 0, Class=Hub, Driver=hub/4p, 12M
|__ Port 1: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 1: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 1: Dev 4, If 2, Class=Human Interface Device, Driver=usbhid, 12M
/: Bus 09.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
/: Bus 08.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
/: Bus 07.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/4p, 12M
/: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/2p, 12M
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/5p, 12M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/5p, 12M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/4p, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/5p, 480M
|__ Port 5: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 480M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/5p, 480M

So you have this issue with a wired mouse, that is somewhat unexpected I must say.

This sounds like an issue with the firmware in the KVM-switch then.

On my CS1764a I can force a reset of the attached USB devices by doing the following:

  1. Press and hold numlock
  2. Press and release the numpad ‘-’ key
  3. Release numlock
  4. The capslock (and other) LED(s) should be flashing now
  5. Now press the F5 key to reset attached USB devices

Most Aten KVM switches also have 2 modes for the mouse an emulated mode where extra features like ctrl + mouse-wheel scroll can be tied to switching kvm-input and a direct pass-through mode.

You should be able to see your current KVM settings by opening a text-editor and then doing Num-lock + ‘-’ (as described above) followed by pressing F4 instead of F5.

On my Aten this says the following atm:

hotkey:
[num lock]+[-] and [scroll lock],[scroll lock]

os setting:
port1    auto-detect
port2    auto-detect
port3    auto-detect
port4    auto-detect
mouse switch: off
mouse emulation: on
power on detection: off
port1    english
port2    english
port3    english
port4    english

Notice the mouse emulation: on if you press Num-lock + ‘-’ followed by pressing ‘M’ that will toggle the mouse-emulation option, perhaps that helps?

Thank you for the tip. I checked and I had mouse emulation off though keyboard emulation on and since the keyboard has always worked the trick might be to turn mouse emulation on as well. I’ll try that for a while and drop a comment with the result so that you know.

/F

I solved my problem with a KVM differnty.

The port for the mouse is left free and I’ve taken the port for a general USB hub.
That solved my problem, but I don’t know how your switch looks like.

Hi Hans,

Now I’ve been running with mouse emulation for some time and have never had a mouse freeze since. I got the feeling you helped me solve my problem. Many thanks for that, it was quite annoying.

@Ralf, I had you solution as backup plan but now I don’t need to use it. Tnx.

@swefredde I’m happy that the problem is solved.