From owner-freebsd-questions@FreeBSD.ORG Tue Aug 10 02:44:37 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE83416A4CE for ; Tue, 10 Aug 2004 02:44:37 +0000 (GMT) Received: from mail.myhostinghome.net (dweimer.mcmsys.com [207.243.167.147]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3AE3143D41 for ; Tue, 10 Aug 2004 02:44:37 +0000 (GMT) (envelope-from dweimer@myhostinghome.net) Received: from www.myhostinghome.net (localhost.myhostinghome.net [127.0.0.1]) i7A2iaU2021426 for ; Mon, 9 Aug 2004 21:44:36 -0500 (CDT) (envelope-from dweimer@myhostinghome.net) Received: from 207.243.167.148 (SquirrelMail authenticated user dweimer); by www.myhostinghome.net with HTTP; Mon, 9 Aug 2004 21:44:36 -0500 (CDT) Message-ID: <58982.207.243.167.148.1092105876.squirrel@207.243.167.148> Date: Mon, 9 Aug 2004 21:44:36 -0500 (CDT) From: "Dean E. Weimer" To: freebsd-questions@FreeBSD.org User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: USB KVM Keyboard Drop Work-Around (almost, need help!!) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Aug 2004 02:44:38 -0000 Bear with on this one, it is a little long, but I wanted to describe problem with as much detail as possible. I recently purchased a USB KVM to switch between my Windows XP Box and FreeBSD (5.2.1-RELEASE) file/web development server. I was able to use the USB keyboard after a boot, but as soon as I switched to the XP Box and back to the FreeBSD machine it would no longer recognize the USB keyboard. Search the mailing lists, Google, and Yahoo, showed that I wasn't the only one with this problem, but I could not find a fix or work around. After some searching I discovered that by using the command "usr/sbin/kbdcontrol -k /dev/kbd1 < /dev/console" that I could then see the USB keyboard again. Furthermore I discovered that when I switched back and fourth with the KVM these messages showed up in the "/var/log/messages" syslog. When Leaving: ukbd0: at uhub1 port 1 (addr 3) disconnected ukbd0: detached uhid0: at uhub1 port 1 (addr 3) disconnected uhid0: detached ums0: at uhub1 port 2 (addr 4) disconnected ums0: detached When Returning: ukbd0: CHESEN USB Keyboard, rev 1.10/1.10, addr 3, iclass 3/1 kbd1 at ukbd0 uhid0: CHESEN USB Keyboard, rev 1.10/1.10, addr 3, iclass 3/0 ums0: Cypress Sem PS2/USB Browser Combo Mouse, rev 1.00/0.00, addr 4, iclass 3/1 ums0: 5 buttons and Z dir. So logic told me that if I could figure out a way to execute the "usr/sbin/kbdcontrol -k /dev/kbd1 < /dev/console" command based on the log I would have a functional work around. I used Swatch (/usr/ports/security/swatch) form the ports tree to attempt to solve this program. My configuration for swatch contains the following: watchfor /kbd1 at ukbd0/ bell 3 exec /usr/sbin/kbdcontrol -k /dev/kbd1 < /dev/console I am starting swatch at startup as a Daemon from a script in the "/usr/local/etc/rc.d/ directory" simply passing it the --config-file, --tail, and --daemon options. At first all works great, can switch frequently between machines, the only catch is it takes a few seconds for the mouse and keyboard to be detected, but no longer than it takes XP. But every few days the swatch daemon seems to hang. I can ssh into the box from my freebsd machine, kill the swatch process and relaunch the daemon, and again it works for a few days and then hangs?? Anybody have any ideas?? Please Copy my email -- dweimer@myhostinghome.net with any replies... -- Thanks, Dean E. Weimer dweimer@myhostinghome.net http://www.myhostinghome.net/