ThinkPad T61: num lock key generates an input event when turning on, but not off

Bug #281669 reported by Matt Zimmerman
4
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Lee Jones

Bug Description

As originally reported as part of bug 280646 (with some further analysis there), there seems to be no input event generated when the user presses the num lock key to turn it off. This is a problem because num lock state is tracked in software, and becomes out of sync with the hardware state.

Some places where this problem can be observed include:

1. GNOME: turn num lock on and then off. gconftool-2 --get /desktop/gnome/peripherals/keyboard/host-perseus/0/numlock_on always shows "true" (should be false)
2. X modifier state: Run xkbwatch, turn num lock on and then off. The num lock modifier remains lit (should turn off)
3. Kernel input layer: Using input-events from input-utils, watch events on the AT keyboard device (must be done on the console). Key press events are seen (for the Fn and num lock keys) the first time num lock is activated, but not the second time.

It's been suggested that this may be a hardware or BIOS issue, but seems to need further investigation.

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 8.10
Package: linux-image-2.6.27-6-generic 2.6.27-6.9 [modified: lib/modules/2.6.27-6-generic/modules.pcimap lib/modules/2.6.27-6-generic/modules.dep lib/modules/2.6.27-6-generic/modules.ieee1394map lib/modules/2.6.27-6-generic/modules.usbmap lib/modules/2.6.27-6-generic/modules.isapnpmap lib/modules/2.6.27-6-generic/modules.inputmap lib/modules/2.6.27-6-generic/modules.seriomap lib/modules/2.6.27-6-generic/modules.alias lib/modules/2.6.27-6-generic/modules.symbols]
ProcCmdLine: root=UUID=305dde78-d20a-4248-aaf4-09447b7c5791 ro quiet splash
ProcEnviron:
 LC_COLLATE=C
 PATH=/home/username/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/sbin:/usr/sbin:/usr/games:/usr/lib/surfraw
 LANG=en_US.UTF-8
 SHELL=/bin/zsh
ProcVersionSignature: Ubuntu 2.6.27-6.9-generic
SourcePackage: linux

Revision history for this message
Matt Zimmerman (mdz) wrote :
Revision history for this message
Matt Zimmerman (mdz) wrote :

Bryce Harrington says in bug 280646:

"On the Thinkpad T61 specific issue, I discussed it with Peter Hutterer. It seems to be that on this hardware, the numlock key doesn't actually send events when the fn is pressed so we have no way of knowing that it is pressed. This was verified via gdb on the xserver. Scroll lock and numlock are shared, so fn has to be pressed to trigger numlock.

So it seems to be either a hardware or kernel bug."

This doesn't seem quite accurate: I do (at least sometimes) see key events for the Fn key. Also, shift+numlock also activates num lock, and shift definitely does show key events.

Revision history for this message
Matt Zimmerman (mdz) wrote :

The attached log shows the output from input-events when pressing shift+numlock twice consecutively.

/dev/input/event1
   bustype : BUS_I8042
   vendor : 0x1
   product : 0x1
   version : 43860
   name : "AT Translated Set 2 keyboard"
   phys : "isa0060/serio0/input0"
   bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP

waiting for events
[...I release the enter key from running the command...]
11:20:38.277176: EV_MSC code=4 value=42
11:20:38.277200: EV_KEY KEY_LEFTSHIFT pressed
11:20:38.277207: EV_SYN code=0 value=0
[...repeated many times...]
11:20:39.280132: EV_MSC code=4 value=69
11:20:39.280152: EV_KEY KEY_NUMLOCK pressed
11:20:39.280160: EV_SYN code=0 value=0
11:20:39.280170: EV_LED code=0 value=1
11:20:39.280176: EV_SYN code=0 value=0
11:20:39.359822: EV_MSC code=4 value=69
11:20:39.359845: EV_KEY KEY_NUMLOCK released
11:20:39.359852: EV_SYN code=0 value=0
11:20:39.720412: EV_MSC code=4 value=42
11:20:39.720435: EV_KEY KEY_LEFTSHIFT released
11:20:39.720441: EV_SYN code=0 value=0
[...then I press it a second time...]
11:20:41.397847: EV_MSC code=4 value=42
11:20:41.397874: EV_KEY KEY_LEFTSHIFT pressed
11:20:41.397881: EV_SYN code=0 value=0
[...repeats many times...]
11:20:42.206978: EV_MSC code=4 value=42
11:20:42.207005: EV_KEY KEY_LEFTSHIFT released
11:20:42.207011: EV_SYN code=0 value=0

No KEY_NUMLOCK or EV_LED event is seen for the second press.

Revision history for this message
Matt Zimmerman (mdz) wrote :

http://www-307.ibm.com/pc/support/site.wss/MIGR-4YQKLQ.html makes reference to a test program for DOS which might be useful in tracking down whether this is a hardware issue or not.

Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote : Kernel team bugs

Per a decision made by the Ubuntu Kernel Team, bugs will longer be assigned to the ubuntu-kernel-team in Launchpad as part of the bug triage process. The ubuntu-kernel-team is being unassigned from this bug report. Refer to https://wiki.ubuntu.com/KernelTeamBugPolicies for more information. Thanks.

Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

This bug report was marked as Triaged a while ago but has not had any updated comments for quite some time. Please let us know if this issue remains in the current Ubuntu release, http://www.ubuntu.com/getubuntu/download . If the issue remains, click on the current status under the Status column and change the status back to "New". Thanks.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kj-triage
Changed in linux (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Matt Zimmerman (mdz) wrote :

Same symptoms in Lucid as described in the original report.

Changed in linux (Ubuntu):
status: Incomplete → New
Bryce Harrington (bryce)
tags: added: lucid
Lee Jones (lag)
Changed in linux (Ubuntu):
assignee: nobody → Lee Jones (lag)
Revision history for this message
Lee Jones (lag) wrote :

I'm fairly sure this is a hardware issue.

One hardware interrupt is fired when Shift/Fn+NmLk is pressed for the first time.

Subsequent presses do not result in further interrupts.

I am in the process of contacting Lenovo and will update when I know more.

Revision history for this message
Matt Zimmerman (mdz) wrote : Re: [Bug 281669] Re: ThinkPad T61: num lock key generates an input event when turning on, but not off

On Fri, Aug 20, 2010 at 08:02:00AM -0000, Lee Jones wrote:
> I'm fairly sure this is a hardware issue.
>
> One hardware interrupt is fired when Shift/Fn+NmLk is pressed for the
> first time.
>
> Subsequent presses do not result in further interrupts.
>
> I am in the process of contacting Lenovo and will update when I know
> more.

Thanks for looking into this old bug.

--
 - mdz

Revision history for this message
Lee Jones (lag) wrote :

I just picked it off the pile and didn't see the report date until I'd assigned myself.

May as well put it to bed. :)

I've written to some Lenovo tech guys in China.

Hopefully we'll have some answers soon.

Lee Jones (lag)
Changed in linux (Ubuntu):
status: New → In Progress
Revision history for this message
Lee Jones (lag) wrote :

I believe this is a BIOS issue.

I have fixed it by entering the BIOS (pressing the blue ThinkVantage button during boot) and editing the following configuration:

Hit F1 to enter the BIOS Setup Utility
Enter: 'Config' menu ->
Enter: 'Keyboard/Mouse' menu ->
Edit: 'ThinkPad NumLock' [from Independent to Synchronized]

Reboot the computer and run:
  sudo input-events -t30 3" and press "Fn+NmLk

You should receive outputs for each press:

/dev/input/event3
   bustype : BUS_I8042
   vendor : 0x1
   product : 0x1
   version : 43860
   name : "AT Translated Set 2 keyboard"
   phys : "isa0060/serio0/input0"
   bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP

waiting for events
11:58:52.899591: EV_SYN code=0 value=0
11:58:56.004989: EV_MSC code=4 value=69
11:58:56.005006: EV_KEY KEY_NUMLOCK (0x45) pressed
11:58:56.005012: EV_SYN code=0 value=0
11:58:56.005439: EV_LED code=0 value=1
11:58:56.060590: EV_MSC code=4 value=69
11:58:56.060604: EV_KEY KEY_NUMLOCK (0x45) released
11:58:56.060609: EV_SYN code=0 value=0
11:58:57.262065: EV_MSC code=4 value=69
11:58:57.262080: EV_KEY KEY_NUMLOCK (0x45) pressed

Revision history for this message
Matt Zimmerman (mdz) wrote :

On Thu, Oct 14, 2010 at 11:03:57AM -0000, Lee Jones wrote:
> I believe this is a BIOS issue.
>
> I have fixed it by entering the BIOS (pressing the blue ThinkVantage
> button during boot) and editing the following configuration:
>
> Hit F1 to enter the BIOS Setup Utility
> Enter: 'Config' menu ->
> Enter: 'Keyboard/Mouse' menu ->
> Edit: 'ThinkPad NumLock' [from Independent to Synchronized]
>
> Reboot the computer and run:
> sudo input-events -t30 3" and press "Fn+NmLk
>
> You should receive outputs for each press:
>
> /dev/input/event3
> bustype : BUS_I8042
> vendor : 0x1
> product : 0x1
> version : 43860
> name : "AT Translated Set 2 keyboard"
> phys : "isa0060/serio0/input0"
> bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP
>
> waiting for events
> 11:58:52.899591: EV_SYN code=0 value=0
> 11:58:56.004989: EV_MSC code=4 value=69
> 11:58:56.005006: EV_KEY KEY_NUMLOCK (0x45) pressed
> 11:58:56.005012: EV_SYN code=0 value=0
> 11:58:56.005439: EV_LED code=0 value=1
> 11:58:56.060590: EV_MSC code=4 value=69
> 11:58:56.060604: EV_KEY KEY_NUMLOCK (0x45) released
> 11:58:56.060609: EV_SYN code=0 value=0
> 11:58:57.262065: EV_MSC code=4 value=69
> 11:58:57.262080: EV_KEY KEY_NUMLOCK (0x45) pressed

Thanks for looking into this and identifying the solution. I will confirm
the next time I have the opportunity to reboot this system. Feel free to
close this bug in the meantime and I will reopen it in the unlikely event
that I still have a problem.

--
 - mdz

Revision history for this message
Lee Jones (lag) wrote :

Sounds good to me. :)

Changed in linux (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.