Bug 625758 - 2.6.34 kernel drops initial keystrokes when USB keyboard has been idle
Summary: 2.6.34 kernel drops initial keystrokes when USB keyboard has been idle
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 626219 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-20 11:28 UTC by Rui Matos
Modified: 2010-08-30 08:01 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-30 08:01:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
lspci -vnn (9.14 KB, text/plain)
2010-08-21 09:28 UTC, Rui Matos
no flags Details
/proc/cpuinfo (3.32 KB, text/plain)
2010-08-21 09:29 UTC, Rui Matos
no flags Details
lsusb -v (41.32 KB, text/plain)
2010-08-21 09:35 UTC, Rui Matos
no flags Details

Description Rui Matos 2010-08-20 11:28:10 UTC
Kernel version exhibiting the problem: 2.6.34.4-41.fc13.i686.PAE from koji.

It seems the input subsystem/driver is losing the first keystroke in a sequence:

1. After idling some seconds in the tty2 console bash prompt I hit Q, W and E at "typing speed".
2. Only 'w' and 'e' are echoed.
3. If I keep typing it's OK. If I stop and resume typing after some seconds the 1st keystroke is lost again.

I used evtest on the device and it too doesn't get the 1st keystroke in a sequence so the problem seems to be indeed inside the kernel.

The current F13 kernel version 2.6.33.6-147.2.4.fc13.i686.PAE works OK.

Any hints on debugging this further? Some kernel boot flags perhaps?

Comment 1 Chuck Ebbert 2010-08-21 07:31:23 UTC
I'm seeing this too, but not on every machine. What kind of hardware is it happeing on for you? Please attach (as attachments, not inline text) output of the 'lspci -vnn' command and contents of /proc/cpu.

Also, is your keyboard USB or PS/2?

Comment 2 Rui Matos 2010-08-21 09:28:30 UTC
Created attachment 440093 [details]
lspci -vnn

Comment 3 Rui Matos 2010-08-21 09:29:23 UTC
Created attachment 440094 [details]
/proc/cpuinfo

Comment 4 Rui Matos 2010-08-21 09:35:04 UTC
Created attachment 440095 [details]
lsusb -v

The keyboard is USB. It's the Lite-On Tech IBM USB Travel Keyboard with UltraNav. Here's what the kernel prints about it:

usb 2-1.5.3: new low speed USB device using ehci_hcd and address 4
usb 2-1.5.3: New USB device found, idVendor=04b3, idProduct=3019
usb 2-1.5.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1.5.3: Product: IBM USB Travel Keyboard with UltraNav
usb 2-1.5.3: Manufacturer: Lite-On Tech
input: Lite-On Tech IBM USB Travel Keyboard with UltraNav as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5.3/2-1.5.3:1.0/input/input9
generic-usb 0003:04B3:3019.0001: input,hidraw0: USB HID v1.00 Keyboard [Lite-On Tech IBM USB Travel Keyboard with UltraNav] on usb-0000:00:1d.0-1.5.3/input0
input: Lite-On Tech IBM USB Travel Keyboard with UltraNav as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5.3/2-1.5.3:1.1/input/input10
generic-usb 0003:04B3:3019.0002: input,hidraw1: USB HID v1.00 Device [Lite-On Tech IBM USB Travel Keyboard with UltraNav] on usb-0000:00:1d.0-1.5.3/input1

Comment 5 Chuck Ebbert 2010-08-23 05:54:48 UTC
*** Bug 626219 has been marked as a duplicate of this bug. ***

Comment 6 Chuck Ebbert 2010-08-23 05:59:12 UTC
Does booting with the kernel option "usbcore.autosuspend=-1" make any difference?

Comment 7 Rui Matos 2010-08-23 10:16:49 UTC
(In reply to comment #6)
> Does booting with the kernel option "usbcore.autosuspend=-1" make any
> difference?

That makes it worse: no input from the USB keyboard is registered with that option.

Comment 8 Chuck Ebbert 2010-08-23 13:05:42 UTC
Try running this command as root instead of using the usbcore.autosuspend option:

  for node in /sys/bus/usb/devices/*/power/control; do echo "on" >$node ; done

Comment 9 Rui Matos 2010-08-23 13:33:07 UTC
(In reply to comment #8)
> Try running this command as root instead of using the usbcore.autosuspend
> option:
> 
>   for node in /sys/bus/usb/devices/*/power/control; do echo "on" >$node ; done

This seems to fix it, yes.

Comment 10 Maciej Żenczykowski 2010-08-24 06:57:10 UTC
With:

# uname -a
Linux zeus.lan 2.6.34.5-44.fc13.x86_64 #1 SMP Mon Aug 23 00:25:05 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux

The following:

# echo on > '/sys/class/input/input4/device/power/control'

fixes the problem.

Which is the end effect of:

for i in /sys/class/input/input*/device; do
  C=`cat $i/bInterfaceClass`
  SC=`cat $i/bInterfaceSubClass`
  P=`cat $i/bInterfaceProtocol`
  # 03 01 01 == Human Interface Device, Boot Interface SubClass, Keyboard
  if [[ $C$SC$P == 030101 ]]; then
    echo "${i}"
    echo on > "${i}/power/control"
  fi
done 2>/dev/null

Comment 11 Chuck Ebbert 2010-08-24 19:56:47 UTC
Should be fixed in 2.6.34.5-45

Comment 12 Chuck Ebbert 2010-08-25 09:36:38 UTC
Posted upstream:

http://marc.info/?l=linux-usb&m=128272657410313&w=2

Comment 13 Mads Kiilerich 2010-08-29 10:45:52 UTC
I confirm this is a problem in f13 updates-testing, and that it is fixed by kernel-PAE-2.6.34.6-47.fc13.i686 (and probably earlier).

Comment 14 Chuck Ebbert 2010-08-30 08:01:39 UTC
Closing this now since the bug never hit a released kernel.


Note You need to log in before you can comment on or make changes to this bug.