I have long had the problem of losing my ps/2 keyboard when my logitech headset was unplugged. The mouse (USB) still works, but the keyboard doesn't generate events. I eventually have to reboot to restore the keyboard. Oddly, after quitting xwindows properly (and selecting reboot or shutdown in gdm), the computer will hang in at the top of the shutdown sequence-- the cursor just blinks in the top left of the screen, as if it's trying to access something that's not there... This was not a severe problem, as I could always just not unplug the USB. Unfortunately, the keyboard lockup has now happened multiple times when going back and forth between jedit and the new firefox. Firefox alone doesn't cause the problem. I'll be clicking back and forth and then... no keyboard. I should say also that i have both hotplug and coldplug emerged. Incidentally, plugging back the headset doesn't restore its functionality once it's been disconnected (ie, hotplug doesn't seem to be doing anything) AMD64. 2.6.11. Any thoughts? Any logs that might be helpful here, let me know and I'll post 'em. I filed this under the core system component. Hope that was the right one. Reproducible: Always Steps to Reproduce: 1. boot linux 2. Unplog USB logitech. 3. ps/2 keyboard is done. or 1. run jedit for a few hours 2. wait for keyboard to randomly lock. # emerge info Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-3.4.3, glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r4 x86_64) ================================================================= System uname: 2.6.11-gentoo-r4 x86_64 AMD Athlon(tm) 64 Processor 3500+ Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 7 2005, 02:30:25)] distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] dev-lang/python: 2.3.4-r1 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.6.3, 1.4_p6, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r1 sys-devel/libtool: 1.5.10-r4 virtual/os-headers: 2.6.8.1-r4 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CFLAGS="-march=k8 -pipe -O2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=k8 -pipe -O2" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox" GENTOO_MIRRORS="ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo ftp://csociety-ftp.ecn.purdue.edu/pub/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="X a52 aac acpi aim alsa amd64 avi berkdb bitmap-fonts cddb cdr crypt cups curl divx4linux dvd dvdr esd faad fam ffmpeg flac font-server foomatic foomaticdb fortran gif gimpprint gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml imagemagick imlib ipv6 java jp2 jpeg junit libgda libsndfile libwww lzw lzw-tiff mad matroska mozilla mp3 mpeg mysql ncurses nls nptl nptlonly nvidia offensive oggvorbis openal opengl oscar oss pam perl php png ppds python quicktime readline sdl ssl tcltk tcpd tiff tokenizer truetype truetype-fonts type1-fonts usb userlocales wxwindows xinerama xml2 xpm xrandr xv xvid yahoo zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Can you please attach the "dmesg" output after the keyboard has locked up. It should be possible to make a script to save this output to a file, then add a shortcut on your desktop to execute this, which you can just click when you experience the problem.
I'm also interested in this one from the jEdit point of view. I'm wondering if its a bug within Java (doubtful jEdit, since jEdit doesn't interface with hardware at that level). In my experiences though, problems like "this application in conjunction with this application when I do this set of events sometimes causes this part of hardware to malfunction" usually is faulty hardware or misconfigured kernel, but anything is possible! If you can get that dmesg or just make sure you have proper kernel syslogging setup (usually /var/log/kern.log), I'd love to see that output. Also, what make and model is your motherboard? Thanks
Well I'm pleased to report that at least the unplug/replug USB bug seems to be fixed. I just tried it-- unplugging and didn't lose keyboard. Then replugged and again, keyboard is still here! Here's the dmesg output: usb 2-1.1: USB disconnect, address 3 usb 2-1.1: new full speed USB device using ohci_hcd and address 6 I've since upgraded to 2.6.11-r6, so maybe somethign was fixed from r4? The downside is that replugging it in didn't restore my headset. (Ie, sound is gone, the mic isn't working, and it doesn't appear in the mixer app). But that's another bug I guess. At least I can still type. unplugged/replugged again. Dmesg output: usb 2-1.1: USB disconnect, address 6 usb 2-1.1: new full speed USB device using ohci_hcd and address 7 as far as the java bug goes.. I'm gonna try fooling with it a little and will get back to this bug :) W
Looks like I spoke to soon. This time I pulled the plug when I was actually using the headset.. got this lovely dmesg... usb 2-1.1: USB disconnect, address 3 cannot submit datapipe for urb 0, err = -19 cannot submit datapipe for urb 0, err = -19 usb 2-1.1: new full speed USB device using ohci_hcd and address 6 cannot find the slot for index 1 (range 0-1) cannot create card instance 0 snd-usb-audio: probe of 2-1.1:1.0 failed with error -5 Keyboard locked at that point. Even when I re-plugged it back in. Then, when I tried rebooting (via gnome), it hung on the shutdown routine, with this lovely error: Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP: <ffffffff80236a80>{strlen+0} PGD 3ee66067 PUD 3ee60067 PMD 0 Oops: 0000 [1] PREEMPT CPU 0 Modules linked in: it87 i2c_sensor i2c_isa i2c_nforce2 i2c_core snd_usb_audio snd_usb_lib snd_intel8x0 snd_ac97_codec nvidia video loop Pid: 3, comm: events/0 Tainted: P 2.6.11-gentoo-r6 RIP: 0010:[<ffffffff80236a80>] <ffffffff80236a80>{strlen+0} RSP: 0018:ffff81000214bbc0 EFLAGS: 00010282 RAX: 0000000000000058 RBX: ffff81000223a0e0 RCX: 000000000000001a RDX: ffff810025385ef0 RSI: 00000000000000d0 RDI: 0000000000000000 RBP: 0000000000000001 R08: ffff81000223a058 R09: 00000000000003a8 R10: ffffffff802a41c0 R11: ffffffff8018b3c0 R12: ffff810025385ef0 R13: 00000000000000d0 R14: ffff81000223a0e0 R15: ffff81000223a058 FS: 00002aaaaade7ae0(0000) GS:ffffffff8054f600(0000) knlGS:00000000560e2b30 CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b CR2: 0000000000000000 CR3: 000000003ee6f000 CR4: 00000000000006e0 Process events/0 (pid: 3, threadinfo ffff81000214a000, task ffff81003ffb06e0) Stack: ffffffff80233abe ffffffff804b4ec0 ffff81000223a098 ffff810025385ef0 ffff81003dd9f6d8 00000000000003a8 ffffffff802a4226 0000000000000286 ffff810002216780 0000000000000002 Call Trace:<ffffffff80233abe>{kobject_get_path+30} <ffffffff802a4226>{class_hotplug+102} <ffffffff80234862>{kobject_hotplug+498} <ffffffff80233ebe>{kobject_del+14} <ffffffff802a46b8>{class_device_del+232} <ffffffff802a46e9>{class_device_unregister+9} <ffffffff80350669>{snd_unregister_device+185} <ffffffff8035b4e3>{snd_pcm_dev_unregister+115} <ffffffff80350fc0>{snd_card_free_thread+0} <ffffffff8035543a>{snd_device_free+90} <ffffffff8035569b>{snd_device_free_all+75} <ffffffff80350ecd>{snd_card_free+333} <ffffffff80145bb0>{autoremove_wake_function+0} <ffffffff804097e1>{thread_return+109} <ffffffff80145bb0>{autoremove_wake_function+0} <ffffffff8012bbb4>{__wake_up+84} <ffffffff80351048>{snd_card_free_thread+136} <ffffffff80140edd>{worker_thread+525} <ffffffff8012bae0>{default_wake_function+0} <ffffffff804097e1>{thread_return+109} <ffffffff8012bae0>{default_wake_function+0} <ffffffff80140cd0>{worker_thread+0} <ffffffff8014551d>{kthread+205} <ffffffff8010de47>{child_rip+8} <ffffffff80231610>{dummy_d_instantiate+0} <ffffffff80145450>{kthread+0} <ffffffff8010de3f>{child_rip+0} Code: 80 3f 00 48 89 f8 74 08 48 ff c0 80 38 00 eb f6 48 29 f8 c3 RIP <ffffffff80236a80>{strlen+0} RSP <ffff81000214bbc0> CR2: 0000000000000000 Hope this means something to someone. W
Please test vanilla-sources-2.6.12_rc2
Okay, unmasked and tested 2.6.12-rc2. The bug is still there: first I unplugged when it was NOT in use. It seems to have worked alright... Apr 14 03:02:19 [kernel] usb 2-1.1: USB disconnect, address 3 Apr 14 03:02:23 [kernel] usb 2-1.1: new full speed USB device using ohci_hcd and address 6 Apr 14 03:02:29 [kernel] usb 2-1.1: USB disconnect, address 6 Apr 14 03:02:31 [kernel] usb 2-1.1: new full speed USB device using ohci_hcd and address 7 Apr 14 03:02:33 [kernel] usb 2-1.1: USB disconnect, address 7 Apr 14 03:02:35 [kernel] usb 2-1.1: new full speed USB device using ohci_hcd and address 8 Apr 14 03:02:37 [kernel] usb 2-1.1: USB disconnect, address 8 Apr 14 03:02:40 [kernel] usb 2-1.1: new full speed USB device using ohci_hcd and address 9 Apr 14 03:05:16 [kernel] usb 2-1.1: USB disconnect, address 9 Apr 14 03:05:19 [kernel] usb 2-1.1: new full speed USB device using ohci_hcd and address 10 Seems to be fine. Next, I pulled the plug while talking in Skype... Apr 14 03:05:19 [kernel] cannot find the slot for index 1 (range 0-1) Keyboard locked up at this point. I then attempted to log out from GNOME: Apr 14 03:05:48 [su(pam_unix)] session closed for user root - Last output repeated twice - Apr 14 03:05:48 [kernel] Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP: Apr 14 03:05:48 [kernel] <ffffffff8023ba80>{strlen+0} Apr 14 03:05:48 [gconfd (waldo-10452)] Exiting Apr 14 03:05:48 [gdm-autologin(pam_unix)] session closed for user waldo Apr 14 03:05:48 [gdm] PAM pam_putenv: delete non-existent entry; REMOTEHOST Apr 14 03:05:48 [PAM-env] Unknown PAM_ITEM: <DISPLAY> Apr 14 03:05:48 [gdm] PAM pam_putenv: delete non-existent entry; DISPLAY Apr 14 03:05:48 [PAM-env] Unknown PAM_ITEM: <XAUTHORITY> Apr 14 03:05:48 [gdm] PAM pam_putenv: delete non-existent entry; XAUTHORITY Apr 14 03:05:48 [gdm] Master rebooting... At this point the computer locked up. Cursor stuck in the top left part of the screen, unable to get past the login procedure. I tried it again. After a reboot, i unplugged/replugged: Apr 14 03:11:07 [kernel] usb 2-1.1: USB disconnect, address 3 Apr 14 03:11:09 [kernel] usb 2-1.1: new full speed USB device using ohci_hcd and address 6 then got on skype. Actually talking... Unplugged... Apr 14 03:12:28 [kernel] usb 2-1.1: USB disconnect, address 6 Replugged... Apr 14 03:12:32 [kernel] usb 2-1.1: new full speed USB device using ohci_hcd and address 7 Apr 14 03:12:32 [kernel] cannot find the slot for index 1 (range 0-1) Keyboard is gone. Now trying to shutdown... Apr 14 03:13:47 [kernel] Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP: Apr 14 03:13:47 [gconfd (waldo-10320)] Exiting Apr 14 03:13:48 [gdm-autologin(pam_unix)] session closed for user waldo Apr 14 03:13:48 [gdm] PAM pam_putenv: delete non-existent entry; REMOTEHOST Apr 14 03:13:48 [PAM-env] Unknown PAM_ITEM: <DISPLAY> Apr 14 03:13:48 [gdm] PAM pam_putenv: delete non-existent entry; DISPLAY Apr 14 03:13:48 [PAM-env] Unknown PAM_ITEM: <XAUTHORITY> Apr 14 03:13:48 [gdm] PAM pam_putenv: delete non-existent entry; XAUTHORITY Apr 14 03:13:48 [gdm] Master halting... And it just sits there. Again, it looks like GNOME and gdm are done. we're back in text and the cursor is locked in the top-left part of the screen, pre-shutdown routine. Hope this is helpful. Don't know what all those PAM errors are about, but they don't seem to be related as far as I can tell. (there were a few of them earlier too). W
Okay, I want to be specific-- the info above is from /var/log/everything/current. Here is the equivalent output of dmesg: --Unplug/replug w/logitech headset not actively used: usb 2-1.1: USB disconnect, address 3 usb 2-1.1: new full speed USB device using ohci_hcd and address 6 --Unplug with logitech in use: usb 2-1.1: USB disconnect, address 6 --replug with logitech in use: usb 2-1.1: new full speed USB device using ohci_hcd and address 7 cannot find the slot for index 1 (range 0-1) cannot create card instance 0 snd-usb-audio: probe of 2-1.1:1.0 failed with error -5 --Trying again: unplug/replug: usb 2-1.1: USB disconnect, address 7 usb 2-1.1: new full speed USB device using ohci_hcd and address 8 cannot find the slot for index 1 (range 0-1) cannot create card instance 0 snd-usb-audio: probe of 2-1.1:1.0 failed with error -5 --Logout (note: not shutdown/restart!) from GNOME: Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP: <ffffffff8023ba80>{strlen+0} PGD 3ea17067 PUD 3ea10067 PMD 0 Oops: 0000 [1] PREEMPT CPU 0 Modules linked in: it87 i2c_sensor i2c_isa i2c_nforce2 i2c_core sk98lin snd_usb_audio snd_usb_lib snd_rawmidi snd_intel8x0 snd_ac97_codec nvidia video loop Pid: 3, comm: events/0 Tainted: P 2.6.12-rc2 RIP: 0010:[<ffffffff8023ba80>] <ffffffff8023ba80>{strlen+0} RSP: 0018:ffff81000214bbc0 EFLAGS: 00010282 RAX: 0000000000000058 RBX: ffff8100022524e0 RCX: 000000000000001a RDX: ffff8100022509f0 RSI: 00000000000000d0 RDI: 0000000000000000 RBP: 0000000000000001 R08: ffff810002252458 R09: 00000000000003a8 R10: ffffffff802a0da0 R11: ffffffff80325d40 R12: ffff8100022509f0 R13: 00000000000000d0 R14: ffff8100022524e0 R15: 000000000000001a FS: 00002aaaaade7ae0(0000) GS:ffffffff80550000(0000) knlGS:00000000560e2b30 CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b CR2: 0000000000000000 CR3: 000000003ea22000 CR4: 00000000000006e0 Process events/0 (pid: 3, threadinfo ffff81000214a000, task ffff81003ffb06d0) Stack: ffffffff80238dbe ffffffff804b4ae0 ffff810002252498 ffff8100022509f0 00000000000003a8 ffff810002252458 ffffffff802a0e0a 0000000000000286 0000000000000003 000000000226ac00 Call Trace:<ffffffff80238dbe>{kobject_get_path+30} <ffffffff802a0e0a>{class_hotplug+106} <ffffffff80239bc2>{kobject_hotplug+498} <ffffffff802391de>{kobject_del+14} <ffffffff802a1360>{class_device_del+256} <ffffffff802a1389>{class_device_unregister+9} <ffffffff80353b29>{snd_unregister_device+185} <ffffffff8035e6b3>{snd_pcm_dev_unregister+115} <ffffffff803544e0>{snd_card_free_thread+0} <ffffffff803590aa>{snd_device_free+90} <ffffffff8035930b>{snd_device_free_all+75} <ffffffff803543dd>{snd_card_free+349} <ffffffff801458f0>{autoremove_wake_function+0} <ffffffff801458f0>{autoremove_wake_function+0} <ffffffff80354570>{snd_card_free_thread+144} <ffffffff8014099d>{worker_thread+541} <ffffffff8012b080>{default_wake_function+0} <ffffffff8012b080>{default_wake_function+0} <ffffffff80140780>{worker_thread+0} <ffffffff801452ad>{kthread+205} <ffffffff8010e357>{child_rip+8} <ffffffff80236450>{dummy_d_instantiate+0} <ffffffff801451e0>{kthread+0} <ffffffff8010e34f>{child_rip+0} Code: 80 3f 00 48 89 f8 74 08 48 ff c0 80 38 00 eb f6 48 29 f8 c3 RIP <ffffffff8023ba80>{strlen+0} RSP <ffff81000214bbc0> CR2: 0000000000000000 <6>agpgart: Found an AGP 3.0 compliant device at 0000:00:00.0. agpgart: Putting AGP V3 device at 0000:00:00.0 into 8x mode agpgart: Putting AGP V3 device at 0000:01:00.0 into 8x mode --Logging out from gdm froze as described above, but added nothing to dmesg. Again, the above is w/2.6.12-rc2. W
Please enable USB debugging in 2.6.12_rc2 and file an upstream bug report at http://bugzilla.kernel.org including the new dmesg output similarly as you did here. Please update this bug with the upstream URL.
Done. http://bugzilla.kernel.org/show_bug.cgi?id=4495 W
You could try these changes: http://cvs.sourceforge.net/viewcvs.py/alsa/alsa-kernel/usb/usbaudio.c?r1=1.119&r2=1.120 http://cvs.sourceforge.net/viewcvs.py/alsa/alsa-kernel/usb/usx2y/usbusx2y.c?r1=1.9&r2=1.10
Try gentoo-sources-2.6.11-r7. I included the fix there.
Manually applied patches to 2.6.12-r4.. worked like a charm. NO more lockups.. Thanks.
closing
Changing to CLOSED