Re: USB keyboard losing keystrokes in 2.6.34.2+

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 25 Aug 2010, Chuck Ebbert wrote:

> On Wed, 25 Aug 2010 12:17:21 +0200
> Oliver Neukum <oneukum@xxxxxxx> wrote:
> 
> > Am Mittwoch, 25. August 2010, 10:54:12 schrieb Chuck Ebbert:
> > > If the keyboard has been idle for a while, it's dropping the first
> > > keystroke when you start to type. And booting with
> > > "usbcore.autosuspend=-1" makes the keyboard not accept any input at all.

These symptoms indicate that the keyboard is autosuspending.  
Apparently it drops the first keystroke when it autoresumes.

usbcore.autosuspend=-1 will disable autosuspend for all USB devices by
default, but some program (possibly called by udev) might then enable
it for the keyboard.  Check the /sys/.../power/autosuspend file.

> > Please check whether autosuspend is enabled for this device
> > (/sys/$DEVICE/power/level)

In 2.6.36 the appropriate file is /sys/.../power/control.  power/level
is deprecated.  For the time being the two files should contain the
same thing.

> It's very hard to figure out what directory this device listed by
> lsusb matches in /sys:
> 
>     Bus 002 Device 003: ID 04f2:0402 Chicony Electronics Co., Ltd
> 
> But it looks like it's /sys/bus/usb/devices/usb2/2-1/2-1.1, which
> has these two subdirectories that match on vendor and ID:
> 
> /sys/bus/usb/devices/usb2/2-1/2-1.1/2-1.1:1.0/0003:04F2:0402.0001
> /sys/bus/usb/devices/usb2/2-1/2-1.1/2-1.1:1.1/0003:04F2:0402.0002

That looks like the right directory.  The bus numbers match ("usb2" 
indicates bus 2).  You can check the device number by seeing if
/sys/bus/usb/devices/usb2/2-1/2-1.1/devnum contains "3".

> On 2.6.34, /sys/bus/usb/devices/usb2/2-1/2-1.1/power/level contains
> "auto" whether commit 3d61510f4ecacfe47c75c0eb51c0659dfa77fb1b is
> applied or not.

2.6.34 contains a bug whereby a device's wakeup setting affects whether
or not it is allowed to autosuspend.  That commit changes USB
keyboards' wakeup settings, thereby affecting the autosuspend behavior.  
The bug has been fixed in 2.6.35 and above; the fix was tied in with
too many other things to be back-ported to 2.6.34.stable.

> On 2.6.36-rc2 it contains "on".

The best approach for 2.6.34 is to make sure that power/level contains 
"on" or that power/autosuspend contains -1.  Alternatively, you could 
write "disabled" to the power/wakeup attribute -- but then you wouldn't 
be able to use the keyboard to wake up a suspended system.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux