Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 271925 - USB keyboard lost within X session after random intervals
Summary: USB keyboard lost within X session after random intervals
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo X packagers
Depends on:
Reported: 2009-05-30 23:03 UTC by Nagy Zoltan
Modified: 2009-08-23 16:30 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---

xorg log (Xorg.0.log,80.01 KB, text/plain)
2009-07-23 22:02 UTC, Nagy Zoltan
dmesg (_dmesg,85.34 KB, text/plain)
2009-07-23 22:05 UTC, Nagy Zoltan
xorg.conf (xorg.conf,5.58 KB, text/plain)
2009-07-23 22:06 UTC, Nagy Zoltan
xorg.conf current (xorg.conf,6.04 KB, text/plain)
2009-08-12 18:29 UTC, Nagy Zoltan
dmesg -- 2.6.30-gentoo-r4, USB_DEBUG=y (_with_debug,99.52 KB, text/plain)
2009-08-22 17:16 UTC, Nagy Zoltan
xorg log (Xorg.0.log,18.63 KB, text/plain)
2009-08-23 10:03 UTC, Nagy Zoltan
diff of a running(good) and a messed up's log (xd,1.61 KB, text/plain)
2009-08-23 10:08 UTC, Nagy Zoltan

Note You need to log in before you can comment on or make changes to this bug.
Description Nagy Zoltan 2009-05-30 23:03:56 UTC

i'm using a usb keyboard with, 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
 * 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
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.

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]
Comment 8 Nagy Zoltan 2009-07-23 22:06:57 UTC
Created attachment 198953 [details]
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

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 Infrastructure gentoo-dev Security 2009-08-22 18:11:38 UTC
Maybe the X11 team has some more insight.
Comment 13 Rémi Cardona 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.

Comment 14 Rémi Cardona gentoo-dev 2009-08-22 21:13:57 UTC
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

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 [...]/ 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 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 :