# Keyboard lost minutes after booting



## big_girl (Jul 14, 2013)

Hello,

I've got a machine with 9.0 x86 compiled from source that's been great for a very long time, but recently I swapped out a keyboard and started having a tricky problem...

The machine was connected to an IOGEAR 8-port KVM switch. It has PS/2 and VGA connectors (old school). I recently swapped out the keyboard for a new one (both Rosewill USB keyboards connected to the KVM with a PS/2 adapter), and when things started acting up (see below), I replaced the old KVM with a new, IOGEAR 4-port USB switch, thinking the old KVM was kaput. 

But now I think the keyboard swap was when the problem started. 

What happens is, regardless of whether I log in or not to GNOME, in about 2-3 minutes, the CPU usage goes to 100% (X.Org) and the keyboard does not accept input. Connecting a USB keyboard directly to the machine at boot also does not work, regardless of USB or PS/2 connection. The mouse, also connected through the KVM, works fine and I can safely shut down the machine.

I'm guessing I probably have multiple keyboard device drivers loaded that are conflicted, but I really have no idea where to look... I messed with the USB settings in the BIOS, but that did not prevent loss of the keyboard. (I should also point out it works right from boot with no delay.) I haven't applied any updates during this period, either.

Any tips would be appreciated!

Thanks!
-bg


----------



## ShelLuser (Jul 14, 2013)

I can think of only one thing: rebooting the server.

PS/2 has always been a bit of a weird connector, in the sense that you more than often would get into trouble if you replaced hardware while the machine was running. My own experiences do not include FreeBSD by the way, but more so Linux and Windows.

I'm well aware that different operating systems could react differently, but a friend once told me that this isn't really an OS issue but something which happens on the hardware level.

So basically I always reset a machine whenever I had to reconnect a PS/2 connector. The only time when I noticed this actually working normally was when I had to work on some Dell PowerEdge 2U servers. Those always coped quite easily with swapping out keyboards, but I do seem to recall that even then USB was always preferred.


----------



## big_girl (Jul 14, 2013)

Hi,

Thanks, but as I implied in my post, the machine (and everything connected to it) has been powered on and off several times while trying to identify the problem.

-bg


----------



## ShelLuser (Jul 14, 2013)

big_girl said:
			
		

> Thanks, but as I implied in my post, the machine (and everything connected to it) has been powered on and off several times while trying to identify the problem.


Oops, you're right. Sorry, I overlooked that part.

I think your best bet is to start by trying to determine the cause of the problem. It could be FreeBSD itself, but it also wouldn't surprise me if there is something within X.Org which is malfunctioning.

Have you tried starting the system in single user mode, or to shut down X (and the login manager) right after the system started to see if that made any difference?


----------



## big_girl (Jul 14, 2013)

Thanks - I was actually hoping someone could suggest what to look for while poking around in single user mode..


----------



## cpm@ (Jul 15, 2013)

Personally, I have not used a KVM switch, but some people have had problems like you. IMHO, a search in the archives of the freebsd-questions mailing list or in the archives of this forum is advisable.

Or if you prefer, try all in one search


----------



## big_girl (Jul 15, 2013)

Thanks, those search functions are sure handy. I used them to locate some other relevant posts about keyboard issues with FreeBSD, and I also used various internet search engines as well. After exhausting those resources, I sought help here on the forums. 

As my post says, I don't believe that the KVM switch is the best place to look; I've been using this one for years with multiple FreeBSD boxes and others and have never had problems. Further, the mouse connected to the switch works perfectly, while keyboards connected directly to the box via USB or PS/2 also do not work.

The problem appears to have started when I replaced the keyboard, before I tried replacing the switch. As I pointed out, the machine was behaving fine on the switch, and had a problem once I replaced the keyboard.


Edit: Solved. Recompiled the kernel and all is well with the new switch. BTW, I like the IOGEAR 4port KVM I just got - model IOKVMCS4P.

Edit2: Also want to say the new KVM works with my EVOLUENT VerticalMouse 4. (My previous KVM did not, and I have a foggy recollection of the EVOLUENT manual saying the mouse would not work with a KVM, so I was pleasantly surprised).


----------



## cpm@ (Jul 17, 2013)

Great that you have solved your problem 

Here was posted the solution that you picked. I think that you could find interesting to read about the classes of USB KVM switches. Is recommended to use the KVM switches which embedded the USB DDM (Dynamic Device Mapping) technology. So when you switch to different target systems, no USB re-enumeration is needed.  That makes switching quickly and all the sharing devices can be used immediately after switching.


----------

