Bug 30942

Summary: Lenovo s10-3c keyboard
Product: Platform Specific/Hardware Reporter: Leonid (uxlinuser)
Component: i386Assignee: platform_i386
Status: RESOLVED OBSOLETE    
Severity: normal CC: alan, isukin.intelliware, krnls10c, kyle, mbaturlov, pavel.katuntsev, rustnail01
Priority: P1    
Hardware: All   
OS: Linux   
URL: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/677633
Kernel Version: 2.6.* - 2.6.38 Subsystem:
Regression: No Bisected commit-id:
Bug Depends on:    
Bug Blocks: 56331    
Attachments: DMesg file While KB is Not Working - ACPI enabled
DMesg file While KB is Working - ACPI disabled
Example Kernel Config
dmidecode output
dmidecode output

Description Leonid 2011-03-12 08:09:09 UTC
On my Lenovo S10-3C the Keyboard works right up until the kernel loads.  It
also works if I enable "noapic acpi=off" while in Grub.  
Unfortunately this also creates a basically unusable system as the graphics
drivers for the laptop require ACPI
Comment 1 rustnail01 2011-03-23 17:51:49 UTC
on 2.6.38 don't work too
Comment 2 krnls10c 2011-03-24 18:48:07 UTC
I confirm this bug on lenovo s10-3c.
Built-in keyboard and ACPI don't work together.
Comment 3 Leonid 2011-03-26 08:14:52 UTC
2.6.38 - interesting thing: waking up from suspend by pressing the keyboard button works, but then the keyboard still not working
Comment 4 Leonid 2011-03-26 08:16:47 UTC
2.6.38 - interesting thing: waking up from suspend by pressing the keyboard button works, but then the keyboard still not working
Comment 5 Kyle Jones 2011-04-17 16:20:29 UTC
I would like to point out the other bug trackers that were tracking this until we were referred here.
http://bugs.gentoo.org/show_bug.cgi?id=355627
and
https://bugs.launchpad.net/gentoo/+bug/677633

Internal keyboard works sometimes when the enter key is pressed on an an external USB keyboard repeatedly while the kernel is loading. -- Though it is not practical for a netbook user to be carting around a USB keyboard everywhere they go ;-)
Comment 6 Kyle Jones 2011-05-14 15:47:30 UTC
Created attachment 57812 [details]
DMesg file While KB is Not Working - ACPI enabled
Comment 7 Kyle Jones 2011-05-14 15:48:13 UTC
Created attachment 57822 [details]
DMesg file While KB is Working - ACPI disabled
Comment 8 Kyle Jones 2011-05-14 15:48:46 UTC
Created attachment 57832 [details]
Example Kernel Config
Comment 9 Kyle Jones 2011-05-14 15:57:59 UTC
On my Lenovo S10-3C the Keyboard works right up until the kernel loads.  It
also works if I enable "noapic acpi=off" while in Grub.  
Unfortunately this also creates a basically unusable system as the graphics
drivers for the laptop require ACPI.
I am able to login with SSH or use a USB keyboard, so if you need any type of
logs then let me know what I should get for you.
I am using gentoo-sources 2.6.37 .

Reproducible: Always

Steps to Reproduce:
1.Get Lenovo S10-3C - boot Linux
2.Keyboard stops working after Grub.(all built in KB response stops, Caps lock
does not light up)

Actual Results:  
Keyboard doesn't work when apic and acpi are enabled.(all built in KB response
stops, Caps lock does not light up)

Expected Results:  
Keyboard should work with apic and acpi enabled.

Additional Notes:
Repeatedly hitting <enter> on an attached USB keyboard while the kernel is loading will sometimes activate the KB, sometimes not, and sometimes crash the boot process causing automatic reboot.  (not a good option for a digital nomad like myself who got a netbook cause it is small)

On the ubuntu bug tracker Jay said:
---
The problem is located in atkbd.c . It was fixed a long time ago. I will get with them after the new year and see if they will patch it since it affects a project they are working on. If you would like to see both the acpi and the keyboard workiing. The new unbuntu kernel update has issues with these laptops. Use the stock kernel 2.6.35-22-generic add the following to the grub boot line. You need to attach a external keyboard.

apm=power-off nomce vga=771 intel_idle.max_cstate=0

Now once you boot with a external keyboard attached keep tapping the enterkey <This is very important it creates a response from the atkdb which initializes the internal and external keyboard.

It may be a little bit flaky with the unbuntu kernel. Your system may reboot a couple of times. This has been fixed in the test kernel. It works just fine with the stock knoppix 6.2.1 kernel. If you would like to test it out without reinstalling anything.
---

Hope this helps someone get started on this!
Comment 10 Boris Savelev 2011-06-06 10:28:23 UTC
Created attachment 60902 [details]
dmidecode output
Comment 11 Boris Savelev 2011-06-06 10:29:16 UTC
Created attachment 60912 [details]
dmidecode output
Comment 12 Kyle Jones 2011-06-06 12:23:45 UTC
Doesn't work in 2.6.39 either.
Comment 13 Ivan Sukin 2011-06-23 08:02:02 UTC
*** Bug 38062 has been marked as a duplicate of this bug. ***
Comment 14 Ivan Sukin 2011-06-23 08:43:19 UTC
> The problem is located in atkbd.c . It was fixed a long time ago. I will get
> with them after the new year and see if they will patch it since it affects a
> project they are working on.

Where is this patch?
Comment 15 Ivan Sukin 2011-06-23 10:19:09 UTC
I've tried to compile kernel with ATKBD and i8042 as modules, but in vain. Also, any other free OS kernels (I've tried NetBSD/OpenBSD/FreeBSD/Plan9) are not capable of working with this keyboard adn ACPI enabled. All of suggested boot parameters cannot help me.
Comment 16 Ivan Sukin 2011-06-23 10:24:47 UTC
There is some version of Meego that works with this laptop. Can anyone look how it it configured?
Comment 17 Kyle Jones 2011-06-23 13:03:33 UTC
> Where is this patch?
I'm afraid I was quoting a person on a different forum.  I have yet to see an actual patch.

The only partial solution I have found is to buy one of those USB number pads/USB keyboards.  And if you repeatedly hit Enter key on the USB keyboard while the kernel is loading then sometimes you get the internal keyboard to work with acpi and you can disconnect the USB device without trouble.  Really though, it is a pain, and it usually takes several tries to work.
Comment 18 Kyle Jones 2011-06-23 13:07:38 UTC
> There is some version of Meego that works with this laptop. Can anyone look
> how
it it configured?
Do you know which version?
Also do they mention the S10-3 specifically?  Cause the S10-2 worked, and the S10 worked, the problem seems to be with this model.
Comment 19 Ivan Sukin 2011-06-23 13:26:08 UTC
I've seen exactly S10-3c shipped with Meego. Unfortunately, I don't know what version of Meego it was.

> And if you repeatedly hit Enter key on the USB keyboard
> while the kernel is loading then sometimes you get the internal keyboard to
> work with acpi and you can disconnect the USB device without trouble. 

Interesting fact.
Comment 20 Ivan Sukin 2011-06-23 18:32:52 UTC
Meego Linuxcenter Edition has the same problem, but some people say that it is Meego edition S10-3c shipped with. May be it needs some configuration.
Comment 21 Pavel 2011-06-24 11:40:58 UTC
http://blog.yjl.im/2010/08/disable-laptop-ps2-at-keyboard-i8042.html the problem is here. This code did a thing:

#include <unistd.h>
#include <sys/io.h>

#define I8042_COMMAND_REG 0x64

int main(int argc, char *argv[]) {
  char data = 0xae; // enable keyboard

  ioperm(I8042_COMMAND_REG, 1, 1);

  if (argc == 2 && argv[1][0] == '0')
    data = 0xad; // disable keyboard
  outb(data, I8042_COMMAND_REG);
  return 0;
}
Comment 23 Pavel 2011-06-24 12:05:08 UTC
We need some beer to thank
Comment 24 Kyle Jones 2011-06-24 14:57:49 UTC
I can confirm that fix worked for me :D  I just set up an init script that called that program and now I have the internal keyboard working with ACPI on boot :)
Comment 25 Zhang Rui 2012-01-18 03:25:25 UTC
*** Bug 31852 has been marked as a duplicate of this bug. ***