Bug 5049

Summary: doubled keystrokes especially with 'acpi'
Product: ACPI Reporter: Sanjoy Mahajan (sanjoy)
Component: OtherAssignee: Luming Yu (luming.yu)
Status: REJECTED UNREPRODUCIBLE    
Severity: normal CC: acpi-bugzilla
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.13-rc6 Subsystem:
Regression: --- Bisected commit-id:

Description Sanjoy Mahajan 2005-08-11 20:56:48 UTC
Latest kernel w/o this: It's old, at least back to 2.6.11
Distribution: Debian testing
Hardware Environment: TP 600X
Software Environment:  See Bug #4989 for acpidmp output.

Problem Description: Quite often my keystrokes are doubled.  If I'm typing in
emacs, that shows up as "mainn () {" for example.  At first I thought my typing
had got sloppy, or my autorepeat delay was too low, but I doubt it because I can
reproduce the problem using 'acpi':

# acpi

     Battery 1: charged, 100%
     Battery 2: charged, 100%
# 
# 

Notice the blank line after running acpi, which I think is a doubling of the
<RETURN> at the end of the 'acpi' line.  And the shell grabs the second <RETURN>
and produces the last # line.

I think, but don't swear to it, that the problem went away when I compiled the
kernel with preempts; and maybe also when EC burst mode was enabled.

The reason I suspect it's related to acpi and/or EC is that I just got rid of
the problem of doubling keystrokes in Emacs (unless I run 'acpi', which always
gives me the doubling): by setting the thermal-zone polling intervals to 0 (no
polling).  Whereas I usually set it to 10 seconds.

So my guess is that when acpi either polls for new temperatures, or asks for the
battery state (via 'acpi'), the system will double whatever key I have typed in
that narrow time slice.

Steps to reproduce: Run 'acpi'
Comment 1 Luming Yu 2005-08-12 00:25:22 UTC
Please try linux-2.6.13-rc6 with patch filed at bug 3851. Pleast test it with  
ec_burst=1 and ec_burst=0.   
Comment 2 Sanjoy Mahajan 2005-08-12 07:19:33 UTC
I've tested the patch with ec_burst=0 and ec_burst=1.  Both seem to fix the
doubled keystrokes.
Comment 3 Len Brown 2005-09-02 22:48:43 UTC
thanks for confirming the patch in bug 3851 addresses the issue.

So can you confirm that 2.6.13 with no fix and with default
ec_burst=0 has this issue.

2.6.13 does not include the latest bug 3851 patch,
so if ec_burst=0 is not sufficient to avoid the problem there,
then we need to consider updating 2.6.13.1 with the bug 3851 fix.
Comment 4 Sanjoy Mahajan 2005-09-02 23:13:47 UTC
> So can you confirm that 2.6.13 with no fix and with default
> ec_burst=0 has this issue.

I just tried 2.6.13 and I cannot trigger the double keystrokes.  I
made sure that the patch hadn't been applied to by mistake (i.e. that
I had the old version of ec.c), and I did.  So I'm not sure which
change fixed (or hid?) the problem.

Comment 5 Len Brown 2005-09-07 19:13:40 UTC
thanks for re-testing and confirming that 2.6.13 works.
I don't see a release with a problem that can be debugged,
so I'm closing this bug.