Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 271925

Summary: USB keyboard lost within X session after random intervals
Product: Gentoo Linux Reporter: Nagy Zoltan <kirk>
Component: [OLD] UnspecifiedAssignee: Gentoo X packagers <x11>
Status: RESOLVED NEEDINFO    
Severity: normal CC: ikelos
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: xorg log
dmesg
xorg.conf
xorg.conf current
dmesg -- 2.6.30-gentoo-r4, USB_DEBUG=y
xorg log
diff of a running(good) and a messed up's log

Description Nagy Zoltan 2009-05-30 23:03:56 UTC
hi,

i'm using a usb keyboard with x.org/kde, after random amount of time - the keyboard just 'stops' working - disconnects i think,
but the strange is: i can't resurrect it by replugging.
after the event occurs i checked the following:
 * xev - no events are generated by the keyboard
   * i plugged in another usb keyboard - both of them are unworkable.
 * usbview - the keyboard is seen in the usb device tree
 * X.org log - nothing unusual
   * syslog too
 * i changed keyboard a few days ago, but the problem persists (it's not the keyboard ;)
 * i've tried to connect my keyboard directly to the first port of the machine
 * it maybe counts: i've a small usb

 * freqency: first 3 times was ~3-7 days, last 2 was in the last 8 hours
   * when the problem happens i _always_ typing something.
 * if i close down the x session, in the terminal the keyboard does work,
   and if i restart the x-server it works again.

i've tried to search for occurences of this kind of problem - but i don't have too much luck.

i appreciate any suggestions - what should i look for next time.


Reproducible: Sometimes





xorg-server     ~1.5.3-r6
linux(vanilla)  2.6.28.9
kde             3.5.9-r4

# lsusb -t -v

Bus#  0
`-Dev#   1 Vendor 0x1d6b Product 0x0001
Bus#  7
`-Dev#   1 Vendor 0x1d6b Product 0x0001
Bus#  6
`-Dev#   1 Vendor 0x1d6b Product 0x0001
Bus#  5
`-Dev#   1 Vendor 0x1d6b Product 0x0001
Bus#  4
`-Dev#   1 Vendor 0x1d6b Product 0x0001
Bus#  3
`-Dev#   1 Vendor 0x1d6b Product 0x0001
Bus#  2
`-Dev#   1 Vendor 0x1d6b Product 0x0002
Bus#  1
`-Dev#   1 Vendor 0x1d6b Product 0x0002
  `-Dev#   2      ID 05e3:0606 Genesys Logic, Inc. D-Link DUB-H4 USB 2.0 Hub
    |-Dev#   3    ID 04b3:3016 IBM Corp. UltraNav Keyboard Hub
    | |-Dev#   6  ID 04b3:3018 IBM Corp. UltraNav Keyboard
    | `-Dev#   7  ID 06cb:0009 Synaptics, Inc. Composite TouchPad and TrackPoint
    |-Dev#   4    ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
    | |-Dev#   8  ID 03eb:2104 Atmel Corp. AVR ISP mkII
    | |-Dev#   9  ID 04d8:8001 Microchip Technology, Inc.
    | `-Dev#  10  ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
    `-Dev#   5    ID 046d:c03e Logitech, Inc. Premium Optical Wheel Mouse
Comment 1 Nagy Zoltan 2009-05-30 23:30:31 UTC
i've bump into the problem again:
xset led 3 -- lits the scroll lock led

i can write down what i've doing when the last three problems occured:
 - i played with a flash game, which used keyboard shortcut(gemcraft)
 - the last two was during i watched a movie(mplayer) while i entered some commands into konsole
 
i've a bunch of usb wakeup autoresume in the kernel logs like:
[ 4554.500007] hub 3-0:1.0: hub_resume
[ 4554.500024] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
[ 4554.500091] usb usb2: usb auto-resume
[ 4554.500094] ehci_hcd 0000:00:1d.7: resume root hub
[ 4554.538258] hub 2-0:1.0: hub_resume
[ 4554.538280] hub 2-0:1.0: state 7 ports 6 chg 0000 evt 0000

i don't think this hurts much, but i will disable this support next time i rebuild my kernel.
Comment 2 Mike Auty (RETIRED) gentoo-dev 2009-06-06 13:32:31 UTC
Hi there, could you also please state whether you're using evdev of xkb and include your xorg.conf file (if you have one) and /var/log/Xorg.0.log (I know you mentioned nothing unusual, but it will include information about how the keyboard's being detected and so on).

Also, could you please clarify what you mean by "I've a small usb"?  Does that mean you have a small number of USB ports, or that your computer has a USB-mini connector rather than a full-size USB port?

Please also check /etc/hal/fdi/policy to see if there are any .fdi files present that may have an effect on hal/evdev.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2009-06-11 06:00:50 UTC
Please reopen this bug report once you have collected and added more information about this problem.
Comment 4 Nagy Zoltan 2009-06-11 09:23:17 UTC
sorry - i've read some pointers about intel isb controllers, i changed the bios setting from legacy usb support - and since then, the bug doesn't occured. I hope this solves the problem.

https://bugs.launchpad.net/linux/+bug/275351/comments/13

i will reopen once it appears again
Comment 5 Nagy Zoltan 2009-07-23 21:33:16 UTC
it doesnt fixed

i've noticed a new thinng: the keyboard is working,just there is a long delay between i press the key and the X emits the event of the keypress

Comment 6 Nagy Zoltan 2009-07-23 22:02:45 UTC
Created attachment 198950 [details]
xorg log
Comment 7 Nagy Zoltan 2009-07-23 22:05:18 UTC
Created attachment 198952 [details]
dmesg
Comment 8 Nagy Zoltan 2009-07-23 22:06:57 UTC
Created attachment 198953 [details]
xorg.conf
Comment 9 Nagy Zoltan 2009-08-12 18:23:47 UTC
i still have the problem, here is what i've tried:
 * i've removed all unnecessary usb devices
 * USB_SUSPEND is disabled in current kernel
 * i've heard about a similar problem which was solved with 'irqpoll'
   boot option -> causes my system to not boot (tried twice, halted at different
   stages)

if i restart the x server the keyboard is working again -> the problem is in the x server or in the driver?
  the keyboard problem i experience can be intentional:
if an event on the device is generated, it's not propagated further from the driver until a given amount of time have past --- this can be intentional ( it makes sense, mostly in cases where the driver should tolerate false pozitive events )
  but what i don't know is where to get/set a variable like this...
Comment 10 Nagy Zoltan 2009-08-12 18:29:39 UTC
Created attachment 201069 [details]
xorg.conf current

i've replaced my vga cards
Comment 11 Nagy Zoltan 2009-08-22 17:16:43 UTC
Created attachment 201949 [details]
dmesg -- 2.6.30-gentoo-r4, USB_DEBUG=y
Comment 12 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-08-22 18:11:38 UTC
Maybe the X11 team has some more insight.
Comment 13 Rémi Cardona (RETIRED) gentoo-dev 2009-08-22 21:13:37 UTC
Here's a few suggestions :
1) rebuild xorg-server with USE="hal"
2) comment out all InputDevice sections and the Input bits in ServerLayout from your xorg.conf

That should make the X server use HAL and evdev to automatically configure devices.

My guess is that this keyboard is busted somehow. I doubt X has anything to do.

Thank
Comment 14 Rémi Cardona (RETIRED) gentoo-dev 2009-08-22 21:13:57 UTC
resolution
Comment 15 Nagy Zoltan 2009-08-23 10:03:57 UTC
Created attachment 202004 [details]
xorg log

hal is already enabled, i figured it out it can help a few weeks ago --- but i forgot to update the xorg log,
i've: xorg-server 1.6.3
hal input_devices_evdev input_devices_keyboard input_devices_mouse input_devices_synaptics nptl sdl video_cards_fglrx video_cards_radeon video_cards_radeonhd xorg

x11-drivers/xf86-input-mouse       1.4.0
x11-drivers/xf86-input-evdev       2.1.3
x11-drivers/xf86-input-keyboard    1.3.2
x11-drivers/xf86-input-synaptics   9999
master/b95995c6665d147e4857d8616b57aa8a25fc3f6f

but the synaptics module is unloading because it doesn't know my keyboard
 ( the problem occured when i used a regular usb keyboard, so the keyboard hardware should be ok )
Comment 16 Nagy Zoltan 2009-08-23 10:08:21 UTC
Created attachment 202006 [details]
diff of a running(good) and a messed up's log

diff -Naur /var/log/Xorg.0.log*

this show some useful things, but because i normally exit from x in these cases - it can be the normal shutdown log.
Comment 17 Nagy Zoltan 2009-08-23 11:09:52 UTC
i've rebuilt the xf86-driver-keyboard, with the 
ErrorF that prints the keycode enabled, but the message doesn't appear anywhere (stdout/Xorg.0.log)

readelf -a [...]/drv_kdb.so shows the reference for ErrorF (the original version doesn't have it) so i think i've done it right.

if i can intercept all messages xf86-input-keyboard gets, then i can decide next time if the problem is in the drivers before x or in something after that point.

Comment 18 Rémi Cardona (RETIRED) gentoo-dev 2009-08-23 16:30:26 UTC
You have HAL and yet you still manually configure input devices in your xorg.conf... this is wrong.

Please move to a full HAL-only setup. In short, you should only have xf86-input-evdev left on your system.

Here's how to do so : http://www.gentoo.org/proj/en/desktop/x/x11/xorg-server-1.5-upgrade-guide.xml

Thanks