Skip to contentSkip to conversation

AT keyboard dead on 2.6

DISCUSSION Wiktor 4 participants 24 messages Jan 21, 2005 – Jan 29, 2005

lore
Share & tools
lore

Wiktor

author
#0 lore raw

Hi,

my AT keyboard is dead on 2.6 series. Tests on other machines proves that this is my-hardware-specyfic problem (exacly the same binnary works on different mainboards with PS/2 keyboard and another AT keyboard). 2.4 series works correctly. On 2.6 kernel seems to not hear what keyboard wants to tell him (eg. atkbd.reset preforms keyboard reset but reports error). Were any hadrware-handling changes made since 2.4? If so, how to undo them and make keyboard alive? I'm grateful for any help.

---
May the Source be with you.
Wiktor

#1 lore raw
Quoted 10 lines · Wiktor

Hi,

my AT keyboard is dead on 2.6 series. Tests on other machines proves that this is my-hardware-specyfic problem (exacly the same binnary works on different mainboards with PS/2 keyboard and another AT keyboard). 2.4 series works correctly. On 2.6 kernel seems to not hear what keyboard wants to tell him (eg. atkbd.reset preforms keyboard reset but reports error). Were any hadrware-handling changes made since 2.4? If so, how to undo them and make keyboard alive? I'm grateful for any help.

Hi,

What kernel version are you using? Have you tried 2.6.8.1? - it looks like changes in 2.6.9-rc2-bk3 caused problems on some hardware.

Signature · 1 line
Dmitry
author
#2 lore raw
Quoted 5 lines · Dmitry Torokhov

Hi,

What kernel version are you using? Have you tried 2.6.8.1? - it looks like changes in 2.6.9-rc2-bk3 caused problems on some hardware.

Hi,

it looks like 2.6.10 (which I was using) - serio ports are detected ok (both on 0x60,0x64, keyboard irq 1, aux irq 12), keyboard also (AT Keyboard Translated Set 2 on isa0060/serio) and nothing - while detection NumLock (set by BIOS) is turned off and keyboard is dead. Maybe someone would be so kind and compare keyboard driver hadrware-level parts and (possibly) post patch reversing any changes since 2.4? Any other ideas?

(I use the newest gcc-3.3 if it matters.)

#3 lore raw
Quoted 9 lines · Wiktor
Quoted 5 lines · Dmitry Torokhov

Hi,

What kernel version are you using? Have you tried 2.6.8.1? - it looks like changes in 2.6.9-rc2-bk3 caused problems on some hardware.

Hi,

Quoted 7 lines

it looks like 2.6.10 (which I was using) - serio ports are detected ok (both on 0x60,0x64, keyboard irq 1, aux irq 12), keyboard also (AT Keyboard Translated Set 2 on isa0060/serio) and nothing - while detection NumLock (set by BIOS) is turned off and keyboard is dead. Maybe someone would be so kind and compare keyboard driver hadrware-level parts and (possibly) post patch reversing any changes since 2.4?

Ahem, that would be the one wiping out entire input system...

Quoted 1 line

Any other ideas?

1. Try compiling psmouse as a module and not load it until keyboard driver (atkbd) is loaded.

2. Try kernel 2.6.8.1 - it looks like changes in 2.6.9-rc2-bk3 are causing trouble on some systems but I can't figure out the reason.

Also, if you change undef DEBUG to #define DEBUG in drivers/input/serio/i8042.c, reboot with log_buf_size=131072 and send me the full dmesg or kernel log I'd appreciate it.

Thanks!

Signature · 1 line
Dmitry
author
#4 lore raw

Hi,

here you are gzip-ed dmesg from booting 2.6.8.1 - i've been playing keyboard while booting, maybe interrupt reports will help you. also my .config part follows:
CONFIG_INPUT=y
CONFIG_INPUT_MOUSEDEV=y
CONFIG_SOUND_GAMEPORT=y
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
no modules or other built-ins. maybe it is some simple way to fall back to old handling mechanism? in my system most of programs (i mean x-server) uses hardware directly (what means uses /dev/ttyS0 as mouse device). i'm grateful for any help.

---
May the Source be with you.
Witkor

#5 lore raw
Quoted 16 lines · Wiktor

Hi,

here you are gzip-ed dmesg from booting 2.6.8.1 - i've been playing keyboard while booting, maybe interrupt reports will help you. also my .config part follows:
CONFIG_INPUT=y
CONFIG_INPUT_MOUSEDEV=y
CONFIG_SOUND_GAMEPORT=y
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
no modules or other built-ins. maybe it is some simple way to fall back to old handling mechanism? in my system most of programs (i mean x-server) uses hardware directly (what means uses /dev/ttyS0 as mouse device). i'm grateful for any help.

This dmesg looks like the keyboard works perfectly OK. Do new lines appear in dmesg when you press keys while the system is running?

Signature · 2 lines
Vojtech Pavlik
SuSE Labs, SuSE CR
#6 lore raw
Quoted 18 lines · Vojtech Pavlik
Quoted 16 lines · Wiktor

Hi,

here you are gzip-ed dmesg from booting 2.6.8.1 - i've been playing keyboard while booting, maybe interrupt reports will help you. also my .config part follows:
CONFIG_INPUT=y
CONFIG_INPUT_MOUSEDEV=y
CONFIG_SOUND_GAMEPORT=y
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
no modules or other built-ins. maybe it is some simple way to fall back to old handling mechanism? in my system most of programs (i mean x-server) uses hardware directly (what means uses /dev/ttyS0 as mouse device). i'm grateful for any help.

Quoted 3 lines

This dmesg looks like the keyboard works perfectly OK. Do new lines appear in dmesg when you press keys while the system is running?

It does no report any IDs but ACKs GETID command. Not very nice...

Signature · 1 line
Dmitry
author
#7 lore raw

Hi,

Quoted 2 lines

This dmesg looks like the keyboard works perfectly OK. Do new lines appear in dmesg when you press keys while the system is running?

eeeeeeee.....no? no, they don't. i've new dmesg for you - it reports timeouts while trying to perform keyboard reset (by atkbd.reset=1). after detection pressing any keys has absolutley no effect. maybe it's some timeout-violation?

---
May the Source be with you.
wixor (it's my nick)

#8 lore raw
Quoted 10 lines · Wiktor

Hi,

Quoted 2 lines

This dmesg looks like the keyboard works perfectly OK. Do new lines appear in dmesg when you press keys while the system is running?

eeeeeeee.....no? no, they don't. i've new dmesg for you - it reports timeouts while trying to perform keyboard reset (by atkbd.reset=1). after detection pressing any keys has absolutley no effect. maybe it's some timeout-violation?

Could you please try editing drivers/input/serio/i8042.c and add udelay(20) before and after calls to i8042_write_data() in i8042_kbd_write() and i8042_command().

Signature · 1 line
Dmitry
author
#9 lore raw

Hi,

Quoted 3 lines

Could you please try editing drivers/input/serio/i8042.c and add udelay(20) before and after calls to i8042_write_data() in i8042_kbd_write() and i8042_command().

of course i could, will it make kernel not detect smoked AUX port? (problem is solved by i8042.noaux=1 cause my hardware has smoked PS/2 port) i would rather think about testing devices before assuming thet work and trying to use them (maybe not as standard kernel feature, but it would be nice stuff for people with self-built machines where not everything works). Thanks for your help

---
May the Source be with you.
wixor

#10 lore raw
Quoted 6 lines · Wiktor

Hi,

Quoted 3 lines

Could you please try editing drivers/input/serio/i8042.c and add udelay(20) before and after calls to i8042_write_data() in i8042_kbd_write() and i8042_command().

Quoted 6 lines

of course i could, will it make kernel not detect smoked AUX port? (problem is solved by i8042.noaux=1 cause my hardware has smoked PS/2 port) i would rather think about testing devices before assuming thet work and trying to use them (maybe not as standard kernel feature, but it would be nice stuff for people with self-built machines where not everything works).

We do test AUX port and your port appears to be perfectly functional from the kernel point of view - it porperly responds to AUX_LOOP commands, does not claim to support MUX mode and KBC properly sets status register when asked to disable interface...

Signature · 1 line
Dmitry
author
#11 lore raw

Hi,

Quoted 4 lines

We do test AUX port and your port appears to be perfectly functional from the kernel point of view - it porperly responds to AUX_LOOP commands, does not claim to support MUX mode and KBC properly sets status register when asked to disable interface...

ok, but how AUX block KBD port? if procesor-interface works, it shouldn't disturb communication in any way! how it is possible that tests do not detect broken down port? if kernel enables it in some way (when disabling port from command line, KBD works ok), it should be detected that AUX does not work correctly and lock it somehow? can it be etermined by analyzing data flow? or maybe tests are not enought good, maybe some corelations when using both KBD and AUX exist and are not tested? as my keyboard works now, i'm not keen on solving this, but to make the world better and dominate it, some "runtime hardware failures handling" could be added.

--
May the Source be with you.
wixor

#12 lore raw
Quoted 9 lines · Wiktor

Hi,

Quoted 4 lines

We do test AUX port and your port appears to be perfectly functional from the kernel point of view - it porperly responds to AUX_LOOP commands, does not claim to support MUX mode and KBC properly sets status register when asked to disable interface...

ok, but how AUX block KBD port? if procesor-interface works, it shouldn't disturb communication in any way!

The AUX and KBD ports share the same processor interface. If the AUX port is enabled, and somehow keeps the interface for itself, then the keyboard wouldn't work.

For some reason, however, the keyboard is recognized, which means it _can_ communicate with the kernel. I don't understand why it doesn't, at the moment.

Quoted 2 lines

how it is possible that
tests do not detect broken down port?

The kernel issues the AUX_TEST command, which instructs the port controller to test whether the port is OK. And the controller returns with "Yes, it is."

Quoted 3 lines

if kernel enables it in some way
(when disabling port from command line, KBD works ok), it should be detected that AUX does not work correctly and lock it somehow?

Remember, it's the keyboard that doesn't work in that case. How the kernel should know the AUX port is the cause, and how it should discern that from the user not typing?

Quoted 2 lines

can it be
etermined by analyzing data flow?

No.

Quoted 5 lines

or maybe tests are not enought good,
maybe some corelations when using both KBD and AUX exist and are not tested? as my keyboard works now, i'm not keen on solving this, but to make the world better and dominate it, some "runtime hardware failures handling" could be added.

We're pretty happy when it works on functional hardware at the moment.

Signature · 2 lines
Vojtech Pavlik
SuSE Labs, SuSE CR
#13 lore raw
In reply to Wiktor
Quoted 6 lines · Wiktor

Hi,

Quoted 3 lines

Could you please try editing drivers/input/serio/i8042.c and add udelay(20) before and after calls to i8042_write_data() in i8042_kbd_write() and i8042_command().

Quoted 6 lines

of course i could, will it make kernel not detect smoked AUX port? (problem is solved by i8042.noaux=1 cause my hardware has smoked PS/2 port) i would rather think about testing devices before assuming thet work and trying to use them (maybe not as standard kernel feature, but it would be nice stuff for people with self-built machines where not everything works). Thanks for your help

Well, the kernel tests the AUX port and it seemed OK, that's the problem. Unfortunately it's not always possible to detect whether there's a problem with some device.

Signature · 2 lines
Vojtech Pavlik
SuSE Labs, SuSE CR
#14 lore raw
In reply to Dmitry Torokhov
Quoted 12 lines · Dmitry Torokhov
Quoted 10 lines · Wiktor

Hi,

Quoted 2 lines

This dmesg looks like the keyboard works perfectly OK. Do new lines appear in dmesg when you press keys while the system is running?

eeeeeeee.....no? no, they don't. i've new dmesg for you - it reports timeouts while trying to perform keyboard reset (by atkbd.reset=1). after detection pressing any keys has absolutley no effect. maybe it's some timeout-violation?

Quoted 3 lines

Could you please try editing drivers/input/serio/i8042.c and add udelay(20) before and after calls to i8042_write_data() in i8042_kbd_write() and i8042_command().

Uh? What that'd help? All the communication proceeds OK, up to proper registration of the input device, but the keyboard seems to stay in a 'disabled' state. The keyboard, not the controller, because if it were the controller, atkbd.c wouldn't get the 'fa' responses back via functioning interrupts.

Wiktor, can you try atkbd.dumbkbd=1?

Signature · 2 lines
Vojtech Pavlik
SuSE Labs, SuSE CR
author
#15 lore raw
Quoted 3 lines

Wiktor, can you try atkbd.dumbkbd=1?

Here you are full dmesg (see attachment). i've been typing alphabet after kernel boot.

#16 lore raw
In reply to Wiktor
Quoted 9 lines · Wiktor

Hi,

Quoted 2 lines

This dmesg looks like the keyboard works perfectly OK. Do new lines appear in dmesg when you press keys while the system is running?

eeeeeeee.....no? no, they don't. i've new dmesg for you - it reports timeouts while trying to perform keyboard reset (by atkbd.reset=1). after detection pressing any keys has absolutley no effect. maybe it's some timeout-violation?

It still looks OK. It seems to be a very ancient keyboard. Can you try with a newer one? That'd tell us whether it's the controller or the keyboard that is giving problems.

What keyboard model is it? What machine?

Signature · 2 lines
Vojtech Pavlik
SuSE Labs, SuSE CR
author
#17 lore raw
Quoted 6 lines

It still looks OK. It seems to be a very ancient keyboard. Can you try with a newer one? That'd tell us whether it's the controller or the keyboard that is giving problems.

What keyboard model is it? What machine?

Machine info attached as a part of /dev/proc. i've tried with another AT keyboard and PS/2 keyboard attached via connector - results were the same. keyboard i'm using is: chicony model KB-5911 serial 6A00152705. what does it mean 'ancient'? mine keyb has about 10 years. is it ancient or not (it is the first keyboard i've been using)?

--
May the Source be with you.
wixor

#18 lore raw
In reply to Dmitry Torokhov
Quoted 19 lines · Dmitry Torokhov
Quoted 18 lines · Vojtech Pavlik
Quoted 16 lines · Wiktor

Hi,

here you are gzip-ed dmesg from booting 2.6.8.1 - i've been playing keyboard while booting, maybe interrupt reports will help you. also my .config part follows:
CONFIG_INPUT=y
CONFIG_INPUT_MOUSEDEV=y
CONFIG_SOUND_GAMEPORT=y
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
no modules or other built-ins. maybe it is some simple way to fall back to old handling mechanism? in my system most of programs (i mean x-server) uses hardware directly (what means uses /dev/ttyS0 as mouse device). i'm grateful for any help.

Quoted 5 lines
Quoted 3 lines

This dmesg looks like the keyboard works perfectly OK. Do new lines appear in dmesg when you press keys while the system is running?

It does no report any IDs but ACKs GETID command. Not very nice...

Very old AT keyboards can do that.

Signature · 2 lines
Vojtech Pavlik
SuSE Labs, SuSE CR
#19 lore raw
In reply to Wiktor
Quoted 9 lines · Wiktor

Hi,

my AT keyboard is dead on 2.6 series. Tests on other machines proves that this is my-hardware-specyfic problem (exacly the same binnary works on different mainboards with PS/2 keyboard and another AT keyboard). 2.4 series works correctly. On 2.6 kernel seems to not hear what keyboard wants to tell him (eg. atkbd.reset preforms keyboard reset but reports error). Were any hadrware-handling changes made since 2.4? If so, how to undo them and make keyboard alive? I'm grateful for any help.

Please try i8042.noaux=1. You say you're using a serial mouse in your other e-mail, so the system may not have an AUX port yet the kernel thinks it does. This may cause the keyboard to stop responding.

Signature · 2 lines
Vojtech Pavlik
SuSE Labs, SuSE CR
#20 lore raw
Quoted 9 lines · Vojtech Pavlik
Quoted 3 lines · Wiktor

Hi,

my AT keyboard is dead on 2.6 series. Tests on other machines proves that this is my-hardware-specyfic problem (exacly the same binnary works on different mainboards with PS/2 keyboard and another AT keyboard). 2.4 series works correctly. On 2.6 kernel seems to not hear what keyboard wants to tell him (eg. atkbd.reset preforms keyboard reset but reports error). Were any hadrware-handling changes made since 2.4? If so, how to undo them and make keyboard alive? I'm grateful for any help.

Please try i8042.noaux=1. You say you're using a serial mouse in your other e-mail, so the system may not have an AUX port yet the kernel thinks it does. This may cause the keyboard to stop responding.

fyi, there is a thread going on on linuxppc-dev regarding a similiar looking issue: http://ozlabs.org/pipermail/linuxppc-dev/2005-January/018321.html
someone suggested booting with atkbd.reset=0, maybe the problems are somehow related? what exact kernel version are you using, Wiktor?

Christian.

Signature · 3 lines
BOFH excuse #20:

divide-by-zero error
author
#21 lore raw

Hi, IT WORKED!

Quoted 3 lines

Please try i8042.noaux=1. You say you're using a serial mouse in your other e-mail, so the system may not have an AUX port yet the kernel thinks it does. This may cause the keyboard to stop responding.

command line "linux-new init=/bin/bash i8042.noaux=1 atkbd.reset=1" booted 2.6.8.1 kernel with working keyboard. reset succeded. If AUX port is what not-keen-on-hardware people call PS/2 port, the problem is solved. my mainboard has damaged PS/2 port - it is detected but it does NOT work. Thanks for paying attention.

---
May the Source be with you.
wixor (it's my nick)

#22 lore raw
Quoted 11 lines · Wiktor

Hi, IT WORKED!

Quoted 3 lines

Please try i8042.noaux=1. You say you're using a serial mouse in your other e-mail, so the system may not have an AUX port yet the kernel thinks it does. This may cause the keyboard to stop responding.

command line "linux-new init=/bin/bash i8042.noaux=1 atkbd.reset=1" booted 2.6.8.1 kernel with working keyboard. reset succeded. If AUX port is what not-keen-on-hardware people call PS/2 port, the problem is solved. my mainboard has damaged PS/2 port - it is detected but it does NOT work. Thanks for paying attention.

Yes, the AUX port and PS/2 mouse port are two names for the same thing.

Do you still need atkbd.reset=1?

Signature · 2 lines
Vojtech Pavlik
SuSE Labs, SuSE CR
author
#23 lore raw
Quoted 1 line

Do you still need atkbd.reset=1?

No, i don't. i've just tried it, because when keyboard was not working, the only error report was produced by this option.