System Hung When Switching Back with KVM

For three years I’ve been running Ubuntu with three–sometimes four–machines connected to a USB/HDMI KVM switch without any issues.

I got tired of being stuck with bugs in programs that had been fixed upstream lingering in Ubuntu for months (or years in the case of LTS releases), and a few weeks ago switched to EndeavourOS with Gnome on all four machines.

While I’m using a particular machine, I haven’t had any issues at all, but a week ago, when I switched back to machine #3 from machine #2, machine #3 would not respond to any mouse or keyboard input.

Initially, I suspected the KVM, which is hot-pluggable, so I tried unplugging and re-plugging the HDMI and USB inputs for the hung machine, and switching between machines with the KVM, but it did not get the mouse and keyboard working. I plugged a wired mouse directly into the hung machine, and it didn’t work either.

My keyboard doesn’t have a SysReq key, but I tried Alt + Print Screen and REISUB without any result. (I since tried it on machine #2 when it was working, and the key combination didn’t work then, either, so I think it’s not possible with my keyboard.) I didn’t think to try the Caps Lock key at the time to see if it lit up, but it’s the only key with a light on this keyboard, and I know it wasn’t blinking when the system hung.

All the machines are using clean installs of EndeavourOS with Gnome, though I did import my /home folder from my Ubuntu installs with only some app entries in ~/.config. Both are using Intel integrated graphics. At the time it hung, machine #3 was using Xorg, but now it’s on Wayland, as are the rest. When hot-plugging the keyboard didn’t fix the problem, I was thinking it was some issue with machine #3, and planned to do further troubleshooting if the problem recurred on Wayland, but it hasn’t yet.

Today, machine #2 hung when I switched the KVM back from machine #3. No keyboard or mouse input worked. All I had running on machine #2 when it hung was Thunderbird and Firefox with two pinned tabs. I tried hot-plugging the USB from the KVM and switching machines, which didn’t work. I tried a wired mouse plugged directly into machine #2, and it didn’t respond. I used the “reset” button on the case to get it restarted.

Neither of the machines has ever hung while I’ve been using them. The event that triggers the system hangs appears to be disconnecting them from monitor (though the graphics remain fine), mouse, and keyboard using the KVM. Since it’s happening on two different machines that otherwise have been working flawlessly, I’m tentatively thinking the system freeze-ups are not due to temperature, memory, or other hardware issues with either machine, but something software-related.

Here is the output of inxi -Faz on machine #2:

inxi.odt (39.4 KB)

And here is the output of sudo journalctl -b -1 on machine #2 after rebooting it after the system freeze today:

journalctl.odt (80.6 KB)

Unfortunately for troubleshooting, the system(s) don’t hang every time I switch with the KVM. I probably switch 5-10 times a day, and it has only happened twice in three weeks, but it’s really annoying. Any help will be appreciated.

The freeze-ups have been happening more frequently. Now, I can use the KVM to share monitor, keyboard, and mouse, but if I try to switch between machines they consistently hang after several minutes of not being the machine with the focus. I’m back to suspecting the KVM is starting to fail and is at fault, though I did not know a KVM could hang Linux this way.

The more-frequent freeze-ups have allowed me to get a couple more observations. When a system is frozen, the Caps Lock light doesn’t light up, and though I have the power button set to display the shutdown menu, if I push it, the shutdown menu doesn’t appear. Holding the power button down for three seconds or using the reset button on the machine that has one is the only way to get the machine to restart/shut down.

I’m going to see if I can get hold of a new KVM to test.

I got another KVM and I’ve had no problems with system hangs since, so I am going to say the problem was that the old KVM was failing (after ~three years daily use). It just happened to coincide with my change of distribution.

I did not know that a bad KVM could actually hang a Linux system, but I guess it can happen.

Glad you got it fixed. On the computer that is in standby on the KVM, the KVM emulates an active OS on the standby computer while the in use OS uses the KVM as usual. Perhaps, something in EnOS wasn’t compatible with the older KVM, while the brand new KVM was compatible?

One way to prove that would be to use the older KVM on another computer with a different distro and see if it works.


There isn’t much documentation on the old KVM, but I believe that it functions as a switch for the USB mouse and keyboard, rather than doing emulation. The new KVM does do emulation, which may be the difference.

Your suggestion to test on a machine running a different distro is a good one, though I don’t have access to such a setup at the moment. I’m using EndeavourOS on all my machines now, and I have no desire to change. :grinning:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.