PDA

View Full Version : USB keyboard and mouse locks up



hceuterpe
11th January 2007, 02:57 AM
I have a KVM switch that effectively disconnects itself from a computer (such as unplugging from the computer). THe switching mechanism works great on my 3 other boxes, but not so with my linux box.

Sometimes (totally out of the blue I can't recreate it, and it doesn't follow any given pattern) the USB keyboard and mouse doesn't come back. I even went so far is to do an rmmod on the modules of ehci_ucd and ohci_ucd and the command hangs. The system is still responsive but USB functionality, even after I switch ports for my KVM is dead.

I get the following message:

Jan 9 22:30:26 linux kernel: usb 2-1.1.4: USB disconnect, address 16
Jan 9 22:30:26 linux kernel: Unable to handle kernel paging request at ffff8100808ce580 RIP:
Jan 9 22:30:26 linux kernel: [<ffffffff802422a9>] strcmp+0x0/0x1a
Jan 9 22:30:26 linux kernel: PGD 8063 PUD 0
Jan 9 22:30:26 linux kernel: Oops: 0000 [1] SMP
Jan 9 22:30:26 linux kernel: last sysfs file: /devices/platform/i2c-9191/9191-0290/in4_input
Jan 9 22:30:26 linux kernel: CPU 0
Jan 9 22:30:26 linux kernel: Modules linked in: snd_rtctimer udf loop vmnet(U) parport_pc vmmon(U) autofs4 it87 hwmon_vid hwmon eeprom i2c_isa nls_utf8 cifs ipv6 vfat fat dm_multipath video sbs i2c_ec button battery asus_acpi ac lp parport snd_intel8x0 snd_ac97_codec snd_ac97_bus snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device nvidia(U) snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd forcedeth k8_edac soundcore edac_mc ohci1394 snd_page_alloc serio_raw ide_cd floppy i2c_nforce2 cdrom ieee1394 i2c_core pl2303 pcspkr shpchp usbserial dm_snapshot dm_zero dm_mirror dm_mod sata_nv libata sd_mod scsi_mod ext3 jbd ehci_hcd ohci_hcd uhci_hcd
Jan 9 22:30:26 linux kernel: Pid: 145, comm: khubd Tainted: P 2.6.18-1.2869.fc6 #1
Jan 9 22:30:26 linux kernel: RIP: 0010:[<ffffffff802422a9>] [<ffffffff802422a9>] strcmp+0x0/0x1a
Jan 9 22:30:26 linux kernel: RSP: 0018:ffff810037d47d08 EFLAGS: 00010246
Jan 9 22:30:26 linux kernel: RAX: ffff8100808ce580 RBX: ffff81007e4fd918 RCX: ffffffff804590d0
Jan 9 22:30:26 linux kernel: RDX: ffff810037ec3110 RSI: ffff810037ec3158 RDI: ffff8100808ce580
Jan 9 22:30:26 linux kernel: RBP: ffff81007e4fd910 R08: ffff81007e57db88 R09: ffff810037ec3110
Jan 9 22:30:26 linux kernel: R10: ffff810037d47d70 R11: ffffffff803a3a62 R12: ffff81007f920248
Jan 9 22:30:26 linux kernel: R13: ffff81007f957640 R14: ffff810037ec3158 R15: ffff81007f3a7800
Jan 9 22:30:26 linux kernel: FS: 0000000046409940(0000) GS:ffffffff805e4000(0000) knlGS:00000000f3343b90
Jan 9 22:30:26 linux kernel: CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
Jan 9 22:30:26 linux kernel: CR2: ffff8100808ce580 CR3: 000000007be02000 CR4: 00000000000006e0
Jan 9 22:30:26 linux kernel: Process khubd (pid: 145, threadinfo ffff810037d46000, task ffff810037d170c0)
Jan 9 22:30:26 linux kernel: Stack: ffffffff802f99df ffff810037ec3150 ffff810037ec3020 ffffffff8058c1b0
Jan 9 22:30:26 linux kernel: ffff81007fcc2088 0000000000000004 ffffffff803a4594 ffff810037ec3210
Jan 9 22:30:26 linux kernel: ffff810037ec3020 ffff810037ec3020 ffffffff803a48b7 0000000000000000
Jan 9 22:30:26 linux kernel: Call Trace:
Jan 9 22:30:26 linux kernel: [<ffffffff802f99df>] sysfs_hash_and_remove+0x5e/0x10e
Jan 9 22:30:26 linux kernel: [<ffffffff803a4594>] __device_release_driver+0x33/0x94
Jan 9 22:30:26 linux kernel: [<ffffffff803a48b7>] device_release_driver+0x3d/0x5f
Jan 9 22:30:26 linux kernel: [<ffffffff803a3e77>] bus_remove_device+0x9b/0xb0
Jan 9 22:30:26 linux kernel: [<ffffffff803a2c33>] device_del+0x149/0x184
Jan 9 22:30:26 linux kernel: [<ffffffff803d4588>] usb_disable_device+0x7c/0xf5
Jan 9 22:30:26 linux kernel: [<ffffffff803d0e60>] usb_disconnect+0xb3/0x137
Jan 9 22:30:26 linux kernel: [<ffffffff803d1b76>] hub_thread+0x3b0/0xb1e
Jan 9 22:30:26 linux kernel: [<ffffffff80232727>] kthread+0xd3/0x106
Jan 9 22:30:26 linux kernel: [<ffffffff8025cb65>] child_rip+0xa/0x11
Jan 9 22:30:26 linux kernel: DWARF2 unwinder stuck at child_rip+0xa/0x11
Jan 9 22:30:26 linux kernel: Leftover inexact backtrace:
Jan 9 22:30:26 linux kernel: [<ffffffff8029a681>] keventd_create_kthread+0x0/0x66
Jan 9 22:30:26 linux kernel: [<ffffffff8035230f>] vgacon_cursor+0x0/0x1a5
Jan 9 22:30:26 linux kernel: [<ffffffff80232654>] kthread+0x0/0x106
Jan 9 22:30:26 linux kernel: [<ffffffff8025cb5b>] child_rip+0x0/0x11
Jan 9 22:30:26 linux kernel:
Jan 9 22:30:26 linux kernel:
Jan 9 22:30:26 linux kernel: Code: 8a 17 88 d0 2a 06 48 ff c6 84 c0 75 09 84 d2 74 05 48 ff c7
Jan 9 22:30:26 linux kernel: RIP [<ffffffff802422a9>] strcmp+0x0/0x1a
Jan 9 22:30:26 linux kernel: RSP <ffff810037d47d08>
Jan 9 22:30:26 linux kernel: CR2: ffff8100808ce580
Jan 9 22:30:26 linux kernel: <3>BUG: sleeping function called from invalid context at kernel/rwsem.c:20
Jan 9 22:30:26 linux kernel: in_atomic():0, irqs_disabled():1
Jan 9 22:30:26 linux kernel:
Jan 9 22:30:26 linux kernel: Call Trace:
Jan 9 22:30:26 linux kernel: [<ffffffff80268e9f>] show_trace+0x34/0x47
Jan 9 22:30:26 linux kernel: [<ffffffff80268ec4>] dump_stack+0x12/0x17
Jan 9 22:30:26 linux kernel: [<ffffffff8029c99c>] down_read+0x15/0x23
Jan 9 22:30:26 linux kernel: [<ffffffff80294f91>] blocking_notifier_call_chain+0x13/0x36
Jan 9 22:30:26 linux kernel: [<ffffffff80214e69>] do_exit+0x1f/0x8c2
Jan 9 22:30:26 linux kernel: [<ffffffff802644e0>] do_page_fault+0x794/0x80f
Jan 9 22:30:26 linux kernel: [<ffffffff8025c99d>] error_exit+0x0/0x84
Jan 9 22:30:26 linux kernel: DWARF2 unwinder stuck at error_exit+0x0/0x84
Jan 9 22:30:26 linux kernel: Leftover inexact backtrace:
Jan 9 22:30:26 linux kernel: [<ffffffff803a3a62>] klist_devices_put+0x0/0xc
Jan 9 22:30:26 linux kernel: [<ffffffff804590d0>] klist_release+0x0/0x45
Jan 9 22:30:26 linux kernel: [<ffffffff802422a9>] strcmp+0x0/0x1a
Jan 9 22:30:26 linux kernel: [<ffffffff802f99df>] sysfs_hash_and_remove+0x5e/0x10e
Jan 9 22:30:26 linux kernel: [<ffffffff803a4594>] __device_release_driver+0x33/0x94
Jan 9 22:30:26 linux kernel: [<ffffffff803a48b7>] device_release_driver+0x3d/0x5f
Jan 9 22:30:26 linux kernel: [<ffffffff803a3e77>] bus_remove_device+0x9b/0xb0
Jan 9 22:30:26 linux kernel: [<ffffffff803a2c33>] device_del+0x149/0x184
Jan 9 22:30:26 linux kernel: [<ffffffff803d4588>] usb_disable_device+0x7c/0xf5
Jan 9 22:30:26 linux kernel: [<ffffffff803d0e60>] usb_disconnect+0xb3/0x137
Jan 9 22:30:26 linux kernel: [<ffffffff803d1b76>] hub_thread+0x3b0/0xb1e
Jan 9 22:30:26 linux kernel: [<ffffffff80260009>] __sched_text_start+0x3f9/0xad1
Jan 9 22:30:26 linux kernel: [<ffffffff8026073f>] thread_return+0x5e/0xef
Jan 9 22:30:26 linux kernel: [<ffffffff8029a835>] autoremove_wake_function+0x0/0x2e
Jan 9 22:30:26 linux kernel: [<ffffffff803d17c6>] hub_thread+0x0/0xb1e
Jan 9 22:30:26 linux kernel: [<ffffffff8029a681>] keventd_create_kthread+0x0/0x66
Jan 9 22:30:26 linux kernel: [<ffffffff80232727>] kthread+0xd3/0x106
Jan 9 22:30:26 linux kernel: [<ffffffff8025cb65>] child_rip+0xa/0x11
Jan 9 22:30:26 linux kernel: [<ffffffff8029a681>] keventd_create_kthread+0x0/0x66
Jan 9 22:30:26 linux kernel: [<ffffffff8035230f>] vgacon_cursor+0x0/0x1a5
Jan 9 22:30:26 linux kernel: [<ffffffff80232654>] kthread+0x0/0x106
Jan 9 22:30:26 linux kernel: [<ffffffff8025cb5b>] child_rip+0x0/0x11
Jan 9 22:30:26 linux kernel:
Jan 9 22:36:31 linux kernel: hub 2-1.1:1.0: cannot reset port 1 (err = -71)
Jan 9 22:36:31 linux last message repeated 4 times
Jan 9 22:36:31 linux kernel: hub 2-1.1:1.0: Cannot enable port 1. Maybe the USB cable is bad?
Jan 9 22:36:31 linux kernel: hub 2-1.1:1.0: cannot disable port 1 (err = -71)
Jan 9 22:36:31 linux kernel: hub 2-1.1:1.0: cannot reset port 1 (err = -71)
Jan 9 22:36:31 linux last message repeated 4 times
Jan 9 22:36:31 linux kernel: hub 2-1.1:1.0: Cannot enable port 1. Maybe the USB cable is bad?
Jan 9 22:36:31 linux kernel: hub 2-1.1:1.0: cannot disable port 1 (err = -71)
Jan 9 22:36:31 linux kernel: hub 2-1.1:1.0: cannot reset port 1 (err = -71)
Jan 9 22:36:31 linux last message repeated 4 times
Jan 9 22:36:31 linux kernel: hub 2-1.1:1.0: Cannot enable port 1. Maybe the USB cable is bad?
Jan 9 22:36:31 linux kernel: hub 2-1.1:1.0: cannot disable port 1 (err = -71)
Jan 9 22:36:31 linux kernel: hub 2-1.1:1.0: cannot reset port 1 (err = -71)
Jan 9 22:36:31 linux last message repeated 4 times
Jan 9 22:36:31 linux kernel: hub 2-1.1:1.0: Cannot enable port 1. Maybe the USB cable is bad?
Jan 9 22:36:31 linux kernel: hub 2-1.1:1.0: cannot disable port 1 (err = -71)
Jan 9 22:36:31 linux kernel: hub 2-1.1:1.0: cannot disable port 1 (err = -71)
Jan 9 22:36:31 linux kernel: usb 2-1: clear tt 1 (0040) error -71
Jan 9 22:36:31 linux last message repeated 24 times





Anyone got any ideas?

Dies
11th January 2007, 03:30 AM
Have you tried unplugging before switching over then plugging back in?

hceuterpe
11th January 2007, 07:34 AM
Actually the KVM literally does the same as if I were to disconnect a hub the devices were connected and connect to another computer.

It looks like the module itself has a panic.

kothog
28th June 2007, 03:51 AM
Actually the KVM literally does the same as if I were to disconnect a hub the devices were connected and connect to another computer.

It looks like the module itself has a panic.

I have almost identical error messages with my DVI/USB KVM switch, but I don't get any panics. My error messages look like this:

input: CHESEN PS2 to USB Converter as /class/input/input165
input: USB HID v1.10 Keyboard [CHESEN PS2 to USB Converter] on usb-0000:00:02.0-
4.1
input: CHESEN PS2 to USB Converter as /class/input/input166
usb 1-4.1: reset low speed USB device using ohci_hcd and address 85
usb 1-4.1: failed to restore interface 0 altsetting 0 (error=-110)
usb 1-4.1: USB disconnect, address 85
[...]
input: ATEN Advance Tech Inc. CS-1762 V1.4.132 as /class/input/input169
input: USB HID v1.00 Keyboard [ATEN Advance Tech Inc. CS-1762 V1.4.132] on usb-0
000:00:02.0-4.1
input: ATEN Advance Tech Inc. CS-1762 V1.4.132 as /class/input/input170
input: USB HID v1.00 Mouse [ATEN Advance Tech Inc. CS-1762 V1.4.132] on usb-0000
:00:02.0-4.1
[...]
usb 1-4.1: reset low speed USB device using ohci_hcd and address 87
usb 1-4.1: device descriptor read/all, error -110
hub 1-4:1.0: cannot disable port 1 (err = -110)
hub 1-4:1.0: cannot reset port 1 (err = -110)
hub 1-4:1.0: cannot reset port 1 (err = -110)
hub 1-4:1.0: cannot reset port 1 (err = -110)
hub 1-4:1.0: cannot reset port 1 (err = -110)
hub 1-4:1.0: cannot reset port 1 (err = -110)
hub 1-4:1.0: Cannot enable port 1. Maybe the USB cable is bad?
[ etc ]

I'm trying to share the KVM between my NetBSD machine and my Linux machine. The Linux machine:

2.6.18-8.1.6.el5.centos.plus #1 SMP Mon Jun 25 13:39:21 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux

... keeps trying to fiddle with the KVM--it resets it over and over again so it becomes unusable when focus shifts away to the NetBSD machine. It's so bad I actually have to disconnect the USB cable from the Linux side just to use my NetBSD machine.

The only way I've found to fix this is to plug the USB devices directly into the machine and bypass the KVM entirely. That sucks.

Did you end up finding a solution to your problem?

(Apologies for posting w/out a Fedora install.. I'm kinda desperate here and after an exhaustive search for the error messages, this place has the only other people with what appear to be identical problems.)

kothog
28th June 2007, 03:52 AM
Just a quick note: it is simply not possible to use the Linux machine with the KVM. Re-reading my post, it sounds like it's possible to use the Linux machine when focus is on it, but that's not the case. Unfortunately.

hceuterpe
28th June 2007, 08:58 PM
Actually do you own an nVidia board?

The ATen/IOGear KVM switches are great but they are flaky with certain boards. I don't think it's limited to nVidia boards either...

I had to stick a USB hub inbetween the computer and the USB cable of the KVM. This didn't happen in linux 2.4 but it did in linux 2.6 also plagued real bad in 32-bit (and x64) Windows NT based systems (2000,XP 2003, etc)

NOTE:****Not all USB hubs will work for this. It's not easy to find out which ones do and which don't. . I bought a i-rocks unit but apparently they quite doin' business in the US so I don't knwo what to tell you. At least one IOgear USB hub even didn't help things.

Also seriously check your cable. The short USB cable between the hub and the computer actually was bad and hence I kept getting those nasty errors. I replaced that and it's been fine ever since.


I have almost identical error messages with my DVI/USB KVM switch, but I don't get any panics. My error messages look like this:

input: CHESEN PS2 to USB Converter as /class/input/input165
input: USB HID v1.10 Keyboard [CHESEN PS2 to USB Converter] on usb-0000:00:02.0-
4.1
input: CHESEN PS2 to USB Converter as /class/input/input166
usb 1-4.1: reset low speed USB device using ohci_hcd and address 85
usb 1-4.1: failed to restore interface 0 altsetting 0 (error=-110)
usb 1-4.1: USB disconnect, address 85
[...]
input: ATEN Advance Tech Inc. CS-1762 V1.4.132 as /class/input/input169
input: USB HID v1.00 Keyboard [ATEN Advance Tech Inc. CS-1762 V1.4.132] on usb-0
000:00:02.0-4.1
input: ATEN Advance Tech Inc. CS-1762 V1.4.132 as /class/input/input170
input: USB HID v1.00 Mouse [ATEN Advance Tech Inc. CS-1762 V1.4.132] on usb-0000
:00:02.0-4.1
[...]
usb 1-4.1: reset low speed USB device using ohci_hcd and address 87
usb 1-4.1: device descriptor read/all, error -110
hub 1-4:1.0: cannot disable port 1 (err = -110)
hub 1-4:1.0: cannot reset port 1 (err = -110)
hub 1-4:1.0: cannot reset port 1 (err = -110)
hub 1-4:1.0: cannot reset port 1 (err = -110)
hub 1-4:1.0: cannot reset port 1 (err = -110)
hub 1-4:1.0: cannot reset port 1 (err = -110)
hub 1-4:1.0: Cannot enable port 1. Maybe the USB cable is bad?
[ etc ]

I'm trying to share the KVM between my NetBSD machine and my Linux machine. The Linux machine:

2.6.18-8.1.6.el5.centos.plus #1 SMP Mon Jun 25 13:39:21 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux

... keeps trying to fiddle with the KVM--it resets it over and over again so it becomes unusable when focus shifts away to the NetBSD machine. It's so bad I actually have to disconnect the USB cable from the Linux side just to use my NetBSD machine.

The only way I've found to fix this is to plug the USB devices directly into the machine and bypass the KVM entirely. That sucks.

Did you end up finding a solution to your problem?

(Apologies for posting w/out a Fedora install.. I'm kinda desperate here and after an exhaustive search for the error messages, this place has the only other people with what appear to be identical problems.)

kothog
28th June 2007, 09:50 PM
Yes, it's an nVidia board. Asus M8N-E I believe. I was feeling desperate today so I started pricing out USB switches.. I figure that since I can connect the keyboard/mouse combo directly to the machine and have it "just work" then perhaps I should just get another switch and use it in tandem.

The annoying part is that I have a Windows x64 OS installed on another partition and the worst that happens with it is that from time to time it resets the switch which pauses the keyboard input for a moment.

Meanwhile, my NetBSD partition works perfectly 100% of the time when used on conjunction with my other NetBSD machine (which is the "other" machine connected to the KVM.)

USB hub huh? Hrm. That'd be interesting. I'll have to pick one up and see if it makes a difference.

And I'll double-check the cable is okay. Evidence supporting your bad cable theory: the sound cable is flakey and needs to be jiggled to get it working properly.

I'm really, really disappointed in the Aten. It shouldn't be disconnecting/reconnecting. There's really no need for that. Just present a virtual device and leave it connected full-time! Also, the flakiness when plugged into an nVidia board is really pissing me off too.

Meanwhile, thanks for your note. In your case, your i-Rocks USB hub solved the problem? Or was it just the cable and *presto*?

I'll have to test now with the cable to see whether the machine that works is actually just the Cable That Works.



Actually do you own an nVidia board?

The ATen/IOGear KVM switches are great but they are flaky with certain boards. I don't think it's limited to nVidia boards either...

I had to stick a USB hub inbetween the computer and the USB cable of the KVM. This didn't happen in linux 2.4 but it did in linux 2.6 also plagued real bad in 32-bit (and x64) Windows NT based systems (2000,XP 2003, etc)

NOTE:****Not all USB hubs will work for this. It's not easy to find out which ones do and which don't. . I bought a i-rocks unit but apparently they quite doin' business in the US so I don't knwo what to tell you. At least one IOgear USB hub even didn't help things.

Also seriously check your cable. The short USB cable between the hub and the computer actually was bad and hence I kept getting those nasty errors. I replaced that and it's been fine ever since.

hceuterpe
30th June 2007, 06:31 AM
No Aten did a good job with the keyboard. Most other KVMs emulate mouse and keyboard so if you anything more than the most basic equipment, you won't get any extras. Heck one of my older KVM switches even had funky multi-key stroke issues. The short 1 pause or so really shouldn't be a nuissance. Further you are using a PS/2-USB adapter. Those devices have been known to wreak havoc on KVMs. Some work great, others lousy and it correlates with how much you paid for it. You're playing a rather risky game with the setup you have.. For the price of a correct adapter, you could just get a USB keyboard instead.

FYI: i-ROCKs still sells their hubs. Try newegg. They don't have rebates for them like they used, but I know the 4100M (correct #?) for certain works with that KVM. Trust me if you wanted DVI in 4-ports your switch is the best you're going to find.

zenarcher
30th June 2007, 07:51 AM
I am using two computers here...one with Fedora 7 and the other with SUSE 10.2....using a KVM switch. My KVM switch is strictly a USB device, switching keyboard, mouse, display and sound between the two computers. Likewise, I'm using Nvidia video cards in both systems. Not a single problem with the setup at all. It worked just the same with Fedora Core 6, prior to the Fedora 7 install. Switches back and forth flawlessly and no problems at boot, either.

You can see what I'm using here in my signature.

Cheers,
zenarcher

hceuterpe
30th June 2007, 07:55 AM
Actually no linux 2.4 is fine, linux 2.6 is not. I think they fine tuned Linux 2.6. Probably along the lines with the HAL daemon. Again I recommend you try the USB hub route and using a native USB keyboard. Your problems will go away once you do!

kothog
1st July 2007, 10:01 PM
The 1-second pause is:

1. Fatal in a first-person shooter.
2. Really bad when typing an important letter, since subsequent to the pause it doesn't recall any keystrokes that happened during the pause.

Since this note, I've discovered a really interesting URL which describes my problem *exactly*. It's here:

ATEN KVM vs. nForce Chipsets (http://www.homepcnetwork.com/feedbackf.htm#ATEN%20CS-1764)

I've ordered an i-Rocks USB hub, but as I understand it, i-Rocks doesn't do business in north america anymore and it's getting harder to find i-Rocks hubs. Oh well. If they're as compatible as they sound, that's a big loss for us. Meanwhile, I'll post if the hub-between-computer-and-kvm solution works for me with my incoming i-Rocks USB 4-port "crystal" hub.

Now I only have one more problem: running god-damned compiz on my AMD 64 X2 (AM2) nForce-based system with a GeForce 7300 GS hard-locks the whole machine. I know for a fact it's not a heat nor load issue, because I can run 3DMark all day long in my Windows (legitimate) x64 install with some codebreakers in the background. Sigh. Off to nvnews.net.. The crappy part is the *exact same* video card works perfectly in a S939 Opteron 165-based system with less RAM and a slower mobo. Double-sigh..

P.S. I can't use anything but a PS/2 to USB converter because the best keyboard in the world (Fujitsu 4726) only comes in PS/2 models. There is no better keyboard than the Fujitsu. Anywhere. It's literally the best keyboard. And the CHESEN converter I use works perfectly when plugged directly into the machine in question. Therefore, I believe it's still the crappy nForce chipset screwing me over..


No Aten did a good job with the keyboard. Most other KVMs emulate mouse and keyboard so if you anything more than the most basic equipment, you won't get any extras. Heck one of my older KVM switches even had funky multi-key stroke issues. The short 1 pause or so really shouldn't be a nuissance. Further you are using a PS/2-USB adapter. Those devices have been known to wreak havoc on KVMs. Some work great, others lousy and it correlates with how much you paid for it. You're playing a rather risky game with the setup you have.. For the price of a correct adapter, you could just get a USB keyboard instead.

FYI: i-ROCKs still sells their hubs. Try newegg. They don't have rebates for them like they used, but I know the 4100M (correct #?) for certain works with that KVM. Trust me if you wanted DVI in 4-ports your switch is the best you're going to find.