Bug 142329 - keyboard misbehavior after APM suspend recovery (on Thinkpad T40)
keyboard misbehavior after APM suspend recovery (on Thinkpad T40)
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Dave Jones
Depends On:
  Show dependency treegraph
Reported: 2004-12-08 18:12 EST by Satish Balay
Modified: 2015-01-04 17:13 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-07-15 14:15:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
lspci, lsmod, dmesg (18.02 KB, text/plain)
2004-12-08 18:12 EST, Satish Balay
no flags Details
fix for corrupted keyboard after resume (1.96 KB, patch)
2005-04-09 12:40 EDT, Jürgen Botz
no flags Details | Diff

  None (edit)
Description Satish Balay 2004-12-08 18:12:38 EST
Description of problem:
During recovery from APM suspend the keyboard doesn't recover properly - and
keyboard functionality is lost. 'Mouse' continues to work (and logging in
remotely via network continues to work)

Version-Release number of selected component (if applicable):


How reproducible:
perhaps 1 in 10 tries.

Steps to Reproduce:
1. install FC3 on a thinkpad T40
2. install latest updates
3. boot to APM & console mode with 'acpi=off 3'
4. try suspend with 'Fn-F3' (and restore with 'Fn')
- and see if the keyboard input continues to work
 Repeat '4' untill error messages on console.
Actual results:

The keyboard stops working - and different chars appear on the screen.
Alt-Ctrl-Del doesn't work. 

- However the mouse continues to work (so if I'm in gnome - I can reboot)
- Netowork continues to work - so if I can login via netowrk - then I can reboot)

Expected results:

No such crash

Additional info:

Normally this happens with X. I've tried reproducing it in 'console' only mode -
and it did crash.

Normally I also have 'ath_pci' (madwifi) driver loaded - but for this test run -
It wan't loaded

I have the following messages in /var/log/messages (after the crash)
Dec  8 16:35:39 asterix kernel: PCI: Sharing IRQ 11 with 0000:02:00.0
Dec  8 16:35:39 asterix kernel: hub 1-0:1.0: reactivate --> -22
Dec  8 16:35:39 asterix kernel: hub 1-0:1.0: reactivate --> -22
Dec  8 16:35:39 asterix kernel: atkbd.c: Unknown key pressed (translated set 2,
code 0x5a on isa0060/serio0).
Dec  8 16:35:39 asterix kernel: atkbd.c: Use 'setkeycodes 5a <keycode>' to make
it known.
Dec  8 16:35:39 asterix kernel: atkbd.c: Unknown key pressed (translated set 2,
code 0x5a on isa0060/serio0).
Dec  8 16:35:39 asterix kernel: atkbd.c: Use 'setkeycodes 5a <keycode>' to make
it known.
Dec  8 16:35:41 asterix kernel: atkbd.c: Unknown key pressed (translated set 2,
code 0x5a on isa0060/serio0).
Dec  8 16:35:41 asterix kernel: atkbd.c: Use 'setkeycodes 5a <keycode>' to make
it known.
Comment 1 Satish Balay 2004-12-08 18:12:38 EST
Created attachment 108159 [details]
lspci, lsmod, dmesg
Comment 2 Satish Balay 2004-12-08 18:23:49 EST
Also - this 'crash' happens with ACPI as well
Comment 3 Pete Toscano 2004-12-09 13:47:20 EST
I've seen this with my T40, APM, and the ipw2100 driver.  The first time I've
seen it happen was this morning.
Comment 4 Satish Balay 2004-12-13 17:50:10 EST
Still happens with 2.6.9-1.715_FC3 (no madwifi install yet)

I'm logged into gnome - and the breakage happened perhaps after 15th (or so) attempt

I can continue to login remotely into this machine.
Comment 5 Satish Balay 2004-12-15 17:13:59 EST
Juergen reposted this issue on LKML - and looks like this is an
upstream issue (with folks having this problem with SuSE/Debian) - but
so far its primarily thinkpads (T40/T41P/T42/X31)


Maybe this is thinkpad specific (perhaps bios) issue..
Comment 6 Satish Balay 2004-12-15 17:45:27 EST
I've now updated BIOS on the T40 from 3.08a to 3.13. I've tried suspend/resume
with 715 kernel for about 25 times - but couldn't reproduce the error.

I'll go back to my normal 3 suspends a day routine - and see if this issue
reappears. (and now back to 681 kernel)
Comment 7 Satish Balay 2004-12-15 19:06:24 EST
BTW: BIOS update  requires 'Embedded Controller Program' update. I've updated
mine from 1.02 to 3.04 (to be consitant with the 3.13-bios requirements - but in
the wrong order)

Adding this text here - in case others are planning on trying a bios update.
Comment 8 Satish Balay 2004-12-15 21:16:09 EST
Ok - it happened again - this time with 681_FC3 - so the bios updates are not
the solution.
Comment 9 Valentine Kouznetsov 2004-12-16 16:45:07 EST
Hi, I have similar problems with Compaq Evo N600c. It started when I
upgraded from FC2 to FC3. BUT!!! The problem solved if you manually
download source kernel-2.6.9-1.681_FC3.src.rpm, isntall it and build
kernel manually. Here what I did:
1) rpm -ivh kernel-2.6.9-1.681_FC3.src.rpm
2) cd /usr/src/redhat/SPECS
3) rpmbuild -bp --target=i686 kernel-2.6.spec
this step only does unpacking the kernel and applying patches.
4) build kernel manually 
    - cd /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/
    - make xconfig (oldconfig)
    - make bzImage && make modules && make modules_install
    - cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.9-1.681_custom
    - mkinitrd /boot/initrd-2.6.9-1.681_custom.img 2.6.9-prep
Once installed APM works fine again.

I think there is a bug either in a build target or post of FC3 spec file.
The kernel is fine, it's certainly FC3 specific bug.
Comment 10 Valentine Kouznetsov 2004-12-19 18:28:50 EST
strange things happens, even first attempts of using custom build kernel
gave working apm system, lately I got still the same problem with apm
as before. 
Comment 11 Valentine Kouznetsov 2004-12-21 00:03:34 EST
it seems to me I found one solution which works for my laptop,
Compaq Evo N600c. I just add atkbd.reset option to FC3 kernel and
everything works fine, although I do see the following messages in my
Dec 20 23:52:59 localhost kernel: atkbd.c: keyboard reset failed on
Dec 20 23:52:59 localhost kernel: atkbd.c: keyboard reset failed on
Dec 20 23:52:59 localhost kernel: atkbd.c: keyboard reset failed on
Dec 20 23:52:59 localhost apmd[2557]: Normal Resume after 00:00:14
(96% unknown) AC power

But I think they correspond to other "optional keyboards" (serio1,2,3)
and the one I'm using is assigned as serio0.

It would be interesting if other people try this option.
Comment 12 Jürgen Botz 2005-03-01 16:22:21 EST
Valentine (comment #11) must have been mistaken or lucky... giving the
kernel the atkbd.reset boot-time option does not solve the problem.  I
still get the hosed keyboard after some some sleep-wake cycles,
usually between 2 and 8.
Comment 13 Need Real Name 2005-03-16 19:10:36 EST
I have had this same problem on waking up from ACPI sleep on a Thinkpad T41p in
FC3 with many different kernels. The mouse (Trackpoint) is fine, everything else
is fine, but the keyboard generates strings of garbage whenever you touch it. I
have noticed that it seems to happen if I touch the keyboard during the wake-up
process. If I wait until it is completely awake before touching the keyboard, it
is fine, but if I touch a key before then it gets into this state. There may be
other ways to trigger the problem but it happens every time when I do this.
Comment 14 Tapani Tarvainen 2005-03-25 01:40:44 EST
I have the same problem in an ancient HP Omnibook 4100, which has been running  
various Linux versions starting with 2.0.something when it was new in 1998,  
with no apm problems whatsoever. With FC3 the keyboard gets messed up every 
time after returning from suspend. It's not completely random though, each key 
seems to produce same effect each time, and as if the key got stuck. E.g., 'a' 
acts like hitting return and holding it down, 't' is like holding 'z', &c. 
Mouse continues to work normally.  
Comment 15 Tapani Tarvainen 2005-03-25 09:55:07 EST
Additional note: I built straight from kernel.org sources 
and the problem went away. Given Valentin's experience above it may 
be too early to declare victory, but for now things look good. 
Comment 16 Satish Balay 2005-04-08 19:38:13 EDT
There is a post on linux-thinkpad list about this bug & a patch. Adding this
reference to bugzilla

Comment 17 Jürgen Botz 2005-04-09 12:40:43 EDT
Created attachment 112911 [details]
fix for corrupted keyboard after resume
Comment 18 Jürgen Botz 2005-04-09 12:43:59 EDT
I can confirm that this patch seems to fix the problem.  I can no longer hose
the keyboard with many suspend/resumes, even if I bang on some keys right after
wakeup starts.  I'm including a version of the patch adapted for the latest FC3
kernel (2.6.10-1.770_FC3) SRPM.

Comment 19 Satish Balay 2005-04-09 14:46:24 EDT
currently using the above patch from #16 with 2.6.11-1.14_FC3 from

So far my repeated suspend/resume attempts didn't triger the bug

[my previous failure was with modified 2.6.11-1.8_FC3 kernel]
Comment 20 Dave Jones 2005-07-15 13:53:27 EDT
An update has been released for Fedora Core 3 (kernel-2.6.12-1.1372_FC3) which
may contain a fix for your problem.   Please update to this new kernel, and
report whether or not it fixes your problem.

If you have updated to Fedora Core 4 since this bug was opened, and the problem
still occurs with the latest updates for that release, please change the version
field of this bug to 'fc4'.

Thank you.
Comment 21 Satish Balay 2005-07-15 14:05:55 EDT
I've been using the patch from #16 with fedora kernels [all the way to
2.6.11-1.35_FC3] - without a crash since my last report.

Looks like this patch is in 2.6.12 [hence in 2.6.12-1.1371_FC3/1372] so I'll
venture to say that it will work. 

Currently using 1371 - will report if the problem strikes again.
Comment 22 Dave Jones 2005-07-15 14:15:48 EDT
ok, reopen if it reoccurs.

thanks for testing.

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