Discussion:
USB Keyboard
Jiri Kosina
2007-03-15 17:53:01 UTC
Permalink
I have multiple AMD 64-bit servers in several configurations, with
several different motherboards, which fail to recognize a USB keyboard
when booted from a "stock" Linux kernel. They only work with a RedHat
kernel! I have removed all but one CPU from one in an attempt to find
the problem.
[...]
linux-2.6.8 linux-2.6.9 linux-2.6.10 linux-2.6.11
linux-2.6.11.9 linux-2.6.12 linux-2.6.12.5 linux-2.6.13
linux-2.6.13.4 linux-2.6.15.4 linux-2.6.16.24 linux-2.6.16.4
linux-2.6.19
Could you please turn on USB debugging (and also maybe HID debugging, but
usb debug should be more interesting now) and send us the logs?
Ouch! I can't do anything by copy from a screen! There is no way to get
`dmesg` without the keyboard! That's why I sent a request to
linux-kernel, hoping that the problem would sound familiar. All I can do
is boot the system (off a CD-ROM) and then pull the plug when the
keyboad doesn't work!
You state that this happens on different hardware configurations, which
looks pretty strange, there are many 64bit amd systems with working USB
keyboards.

Do you happen to have USB Legacy setting in BIOS? If so, could you try
turning it off?

Also, does this happen only with one particular type of keyboard, or with
various ones?
--
Jiri Kosina
Dmitry Torokhov
2007-03-15 17:59:45 UTC
Permalink
Post by Jiri Kosina
I have multiple AMD 64-bit servers in several configurations, with
several different motherboards, which fail to recognize a USB keyboard
when booted from a "stock" Linux kernel. They only work with a RedHat
kernel! I have removed all but one CPU from one in an attempt to find
the problem.
[...]
linux-2.6.8 linux-2.6.9 linux-2.6.10 linux-2.6.11
linux-2.6.11.9 linux-2.6.12 linux-2.6.12.5 linux-2.6.13
linux-2.6.13.4 linux-2.6.15.4 linux-2.6.16.24 linux-2.6.16.4
linux-2.6.19
Could you please turn on USB debugging (and also maybe HID debugging, but
usb debug should be more interesting now) and send us the logs?
Ouch! I can't do anything by copy from a screen! There is no way to get
`dmesg` without the keyboard! That's why I sent a request to
linux-kernel, hoping that the problem would sound familiar. All I can do
is boot the system (off a CD-ROM) and then pull the plug when the
keyboad doesn't work!
You state that this happens on different hardware configurations, which
looks pretty strange, there are many 64bit amd systems with working USB
keyboards.
Do you happen to have USB Legacy setting in BIOS? If so, could you try
turning it off?
Also, does this happen only with one particular type of keyboard, or with
various ones?
Seeing .config might also be interesting.
--
Dmitry

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-***@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
linux-os (Dick Johnson)
2007-03-15 18:18:11 UTC
Permalink
Post by Jiri Kosina
I have multiple AMD 64-bit servers in several configurations, with
several different motherboards, which fail to recognize a USB keyboard
when booted from a "stock" Linux kernel. They only work with a RedHat
kernel! I have removed all but one CPU from one in an attempt to find
the problem.
[...]
linux-2.6.8 linux-2.6.9 linux-2.6.10 linux-2.6.11
linux-2.6.11.9 linux-2.6.12 linux-2.6.12.5 linux-2.6.13
linux-2.6.13.4 linux-2.6.15.4 linux-2.6.16.24 linux-2.6.16.4
linux-2.6.19
Could you please turn on USB debugging (and also maybe HID debugging, but
usb debug should be more interesting now) and send us the logs?
Ouch! I can't do anything by copy from a screen! There is no way to get
`dmesg` without the keyboard! That's why I sent a request to
linux-kernel, hoping that the problem would sound familiar. All I can do
is boot the system (off a CD-ROM) and then pull the plug when the
keyboad doesn't work!
You state that this happens on different hardware configurations, which
looks pretty strange, there are many 64bit amd systems with working USB
keyboards.
Do you happen to have USB Legacy setting in BIOS? If so, could you try
turning it off?
I will turn it OFF, if ON. I just recompiled the drivers with USB debugging
turned ON and I tried it on a machine that works. There are few enough
debugging messages so I will be able to copy off the screen. I now need
to wait in line to use the machine (about an hour or so), then I will
get back to you.
Post by Jiri Kosina
Also, does this happen only with one particular type of keyboard, or with
various ones?
Any keyboards I have tried including the Dell keyboards we have laying
all over the place. I even tried an Apple keyboard because they are
different. I didn't expect to "work," only to be recognized as a keyboard.
Post by Jiri Kosina
--
Jiri Kosina
I'll get back to you in about an hour.


Cheers,
Dick Johnson
Penguin : Linux version 2.6.16.24 on an i686 machine (5615.29 BogoMips).
New book: http://www.AbominableFirebug.com/
_


****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to ***@analogic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.
Alan Stern
2007-03-15 19:07:29 UTC
Permalink
Ouch! I can't do anything by copy from a screen! There is no way to get
`dmesg` without the keyboard! That's why I sent a request to
linux-kernel, hoping that the problem would sound familiar. All I can do
is boot the system (off a CD-ROM) and then pull the plug when the
keyboad doesn't work!
Can you get the live-CD to initialize a network interface via DHCP and
then log in remotely?

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-***@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
linux-os (Dick Johnson)
2007-03-15 19:58:44 UTC
Permalink
Post by Alan Stern
Ouch! I can't do anything by copy from a screen! There is no way to get
`dmesg` without the keyboard! That's why I sent a request to
linux-kernel, hoping that the problem would sound familiar. All I can do
is boot the system (off a CD-ROM) and then pull the plug when the
keyboad doesn't work!
Can you get the live-CD to initialize a network interface via DHCP and
then log in remotely?
Alan Stern
What I have is a bootable-CD/ROM that boots Linux with
a very minimum system. It executes a simple home-made
shell which has three commands, one to check if all
the hardware is present, another to install software,
and the last to umount the drive(s) and reboot. The
rest of the CD/ROM contains a tar.gz ball of the entire
software to be installed after the shell partitions the
drive(s), builds file-systems, and mounts them. After
the entire directory structure with all the files is
cloned, `grub` is executed to put the boot-sector on
the first partition of the first drive. This is how
we 'clone' a number of embedded image-processing
systems.

It is only __after__ all that happens that I have
a system that can be used interactively. It doesn't
normally run on a network, but it could once it is
completely built. Using this technique, one doesn't
need to have some technicians install a distribution
from scratch, then install all the third-party stuff,
then install all the Analogic stuff. We just 'clone'
a "golden" system, which takes about two hours per
system as opposed to about 8 hours the "hard" way.
The time is basically the time to read from the CD.

The OS on the CD is a standard 32-bit version as
the attached ".config" file will show. It boots
these systems fine because it doesn't do anything
special, only claims to be a Pentium, etc.

So, this worked with RedHat versions of the kernel.
However, we now have some third-party software that
doesn't so I built another CD/ROM that contains a
new tarball plus a kernel from the net. That's
when I found that the USB keyboard doesn't work
on most of the systems, but still works on some.

The initrd "linuxrc" file that loads the modules is
here. One can see the order in which the modules are
loaded. We had to make our own shell to replace 'nash'
because the SCSI drivers spawned "children" that
confused nash with SIGCHLD when they executed.

#!/bin/command
echo "Mount /proc filesystem"
mount -t proc /proc /proc
echo "Loading modules"
echo "Loading scsi_mod.ko module"
insmod /lib/scsi_mod.ko
echo "Loading sd_mod.ko module"
insmod /lib/sd_mod.ko
echo "Loading scsi_transport_spi.ko module"
insmod /lib/scsi_transport_spi.ko
echo "Loading aic79xx.ko module"
insmod /lib/aic79xx.ko
echo "Loading jbd.ko module"
insmod /lib/jbd.ko
echo "Loading ext3.ko module"
insmod /lib/ext3.ko
echo "Loading loop.ko module"
insmod /lib/loop.ko
echo "Loading rtc.ko module"
insmod /lib/rtc.ko
echo "Loading uhci-hcd.ko module"
insmod /lib/uhci-hcd.ko
echo "Loading ehci-hcd.ko module"
insmod /lib/ehci-hcd.ko
echo "Loading usbhid.ko module"
insmod /lib/usbhid.ko
echo "Loading usbkbd.ko module"
insmod /lib/usbkbd.ko
echo "sleeping for a few seconds"
sleep 2
echo "Mounting root filesystem"
/bin/findroot
mount -o defaults --ro -t iso9660 /dev/root /sysroot
pivot_root /sysroot /sysroot/initrd
umount /initrd/proc
exec /sbin/init

On the systems where it works, one can unplug or plug in the
keyboard and get a corresponding message. On the ones that
don't, it's dead. I was going to boot a troublesome system
again and report results on the screen with debugging enabled.
However, that system is now having its software loaded the
"hard" way because they need to make shipments. They will soon
find out that they can't complete the installation because
the keyboard doesn't work once Linux is up, but they didn't
listen.... I will be able to boot it again after they finish
failing (tommorrow)!


Cheers,
Dick Johnson
Penguin : Linux version 2.6.16.24 on an i686 machine (5615.29 BogoMips).
New book: http://www.AbominableFirebug.com/
_



****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to ***@analogic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.
Dmitry Torokhov
2007-03-15 20:07:18 UTC
Permalink
Post by linux-os (Dick Johnson)
echo "Loading uhci-hcd.ko module"
insmod /lib/uhci-hcd.ko
echo "Loading ehci-hcd.ko module"
insmod /lib/ehci-hcd.ko
I don't see you loading OHCI and I thought AMD boxes used that flavor.
Post by linux-os (Dick Johnson)
echo "Loading usbhid.ko module"
insmod /lib/usbhid.ko
echo "Loading usbkbd.ko module"
insmod /lib/usbkbd.ko
echo "sleeping for a few seconds"
sleep 2
echo "Mounting root filesystem"
/bin/findroot
mount -o defaults --ro -t iso9660 /dev/root /sysroot
pivot_root /sysroot /sysroot/initrd
umount /initrd/proc
exec /sbin/init
--
Dmitry
Alan Stern
2007-03-15 21:25:44 UTC
Permalink
Post by Dmitry Torokhov
Post by linux-os (Dick Johnson)
echo "Loading uhci-hcd.ko module"
insmod /lib/uhci-hcd.ko
echo "Loading ehci-hcd.ko module"
insmod /lib/ehci-hcd.ko
I don't see you loading OHCI and I thought AMD boxes used that flavor.
It depends on the chipset used for the motherboard. Intel and VIA use
UHCI, pretty much everyone else uses OHCI.

Dick, there's an even simpler way to debug this. Install your special CD
on a machine with an old-fashioned PS/2 keyboard and use that!

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-***@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
linux-os (Dick Johnson)
2007-03-15 21:40:39 UTC
Permalink
Post by Alan Stern
Post by Dmitry Torokhov
Post by linux-os (Dick Johnson)
echo "Loading uhci-hcd.ko module"
insmod /lib/uhci-hcd.ko
echo "Loading ehci-hcd.ko module"
insmod /lib/ehci-hcd.ko
I don't see you loading OHCI and I thought AMD boxes used that flavor.
It depends on the chipset used for the motherboard. Intel and VIA use
UHCI, pretty much everyone else uses OHCI.
Dick, there's an even simpler way to debug this. Install your special CD
on a machine with an old-fashioned PS/2 keyboard and use that!
Alan Stern
It's not the same hardware and all the machines that I tried that
have keyboards end up WORKING with the USB keyboard as well! But
Dmitry Torokhov was right! I just burned a CD with all three modules,
and the keyboard works! I didn't bother to check the DEBUG messages.
It's interesting that the "wrong" module loaded fine with no warnings
that it might not be the correct one!

Thanks a lot.


Cheers,
Dick Johnson
Penguin : Linux version 2.6.16.24 on an i686 machine (5615.29 BogoMips).
New book: http://www.AbominableFirebug.com/
_


****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to ***@analogic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-***@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Alan Stern
2007-03-16 01:54:46 UTC
Permalink
Post by linux-os (Dick Johnson)
It's not the same hardware and all the machines that I tried that
have keyboards end up WORKING with the USB keyboard as well! But
Dmitry Torokhov was right! I just burned a CD with all three modules,
and the keyboard works! I didn't bother to check the DEBUG messages.
Congratulations. Sometimes these problems have easy solutions. :-)
Post by linux-os (Dick Johnson)
It's interesting that the "wrong" module loaded fine with no warnings
that it might not be the correct one!
There's no warning because the driver doesn't know anything is wrong.
Even though it may not find any devices to manage when it first gets
loaded, there's nothing to prevent you adding, for example, a PC-card with
a USB controller on it at some later time.

That's true in general for most Linux drivers. (The ones that aren't
platform-specific, anyway.) They don't look for devices to manage at load
time; instead the driver core calls their probe() routine later on.
Consequently drivers can't tell at load time whether there will be any
useful work for them to do.

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-***@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

linux-os (Dick Johnson)
2007-03-15 21:41:33 UTC
Permalink
Post by Dmitry Torokhov
Post by linux-os (Dick Johnson)
echo "Loading uhci-hcd.ko module"
insmod /lib/uhci-hcd.ko
echo "Loading ehci-hcd.ko module"
insmod /lib/ehci-hcd.ko
I don't see you loading OHCI and I thought AMD boxes used that flavor.
Post by linux-os (Dick Johnson)
echo "Loading usbhid.ko module"
insmod /lib/usbhid.ko
echo "Loading usbkbd.ko module"
insmod /lib/usbkbd.ko
echo "sleeping for a few seconds"
sleep 2
echo "Mounting root filesystem"
/bin/findroot
mount -o defaults --ro -t iso9660 /dev/root /sysroot
pivot_root /sysroot /sysroot/initrd
umount /initrd/proc
exec /sbin/init
--
Dmitry
Yes! You are correct! I added that module and now the keyboard works!
Thanks!

Cheers,
Dick Johnson
Penguin : Linux version 2.6.16.24 on an i686 machine (5615.29 BogoMips).
New book: http://www.AbominableFirebug.com/
_


****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to ***@analogic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-***@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Jiri Kosina
2007-03-15 21:43:12 UTC
Permalink
On Thu, 15 Mar 2007, linux-os (Dick Johnson) wrote:

[...]
The initrd "linuxrc" file that loads the modules is here. One can see
the order in which the modules are loaded. We had to make our own shell
to replace 'nash' because the SCSI drivers spawned "children" that
confused nash with SIGCHLD when they executed.
[...]
echo "Loading uhci-hcd.ko module"
insmod /lib/uhci-hcd.ko
echo "Loading ehci-hcd.ko module"
insmod /lib/ehci-hcd.ko
echo "Loading usbhid.ko module"
insmod /lib/usbhid.ko
echo "Loading usbkbd.ko module"
insmod /lib/usbkbd.ko
Could you please try to *not* insmod usbkbd module? Or is there any
special particular reason for you doing so?

This module is not what should be used in a normal situation on production
and fully working systems. Everything for USB keyboard to work is normally
handled by the usbhid module. Please see the description of what usbkbd
is:

config USB_KBD
tristate "USB HIDBP Keyboard (simple Boot) support"
depends on USB && INPUT
---help---
Say Y here only if you are absolutely sure that you don't want
to use the generic HID driver for your USB keyboard and prefer
to use the keyboard in its limited Boot Protocol mode instead.

This is almost certainly not what you want. This is mostly
useful for embedded applications or simple keyboards.

To compile this driver as a module, choose M here: the
module will be called usbkbd.

If even remotely unsure, say N.

The module could be buggy, your keyboard might be hidbp incompatible, or
whatever. usbkbd is very rarely used and is there only for really special
ocasions, as the Kconfig help text clearly states.

So could you please try without this module loaded and let me know the
result?
--
Jiri Kosina

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-***@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
linux-os (Dick Johnson)
2007-03-15 21:49:56 UTC
Permalink
Post by Jiri Kosina
[...]
The initrd "linuxrc" file that loads the modules is here. One can see
the order in which the modules are loaded. We had to make our own shell
to replace 'nash' because the SCSI drivers spawned "children" that
confused nash with SIGCHLD when they executed.
[...]
echo "Loading uhci-hcd.ko module"
insmod /lib/uhci-hcd.ko
echo "Loading ehci-hcd.ko module"
insmod /lib/ehci-hcd.ko
echo "Loading usbhid.ko module"
insmod /lib/usbhid.ko
echo "Loading usbkbd.ko module"
insmod /lib/usbkbd.ko
Could you please try to *not* insmod usbkbd module? Or is there any
special particular reason for you doing so?
This module is not what should be used in a normal situation on production
and fully working systems. Everything for USB keyboard to work is normally
handled by the usbhid module. Please see the description of what usbkbd
config USB_KBD
tristate "USB HIDBP Keyboard (simple Boot) support"
depends on USB && INPUT
---help---
Say Y here only if you are absolutely sure that you don't want
to use the generic HID driver for your USB keyboard and prefer
to use the keyboard in its limited Boot Protocol mode instead.
This is almost certainly not what you want. This is mostly
useful for embedded applications or simple keyboards.
To compile this driver as a module, choose M here: the
module will be called usbkbd.
If even remotely unsure, say N.
The module could be buggy, your keyboard might be hidbp incompatible, or
whatever. usbkbd is very rarely used and is there only for really special
ocasions, as the Kconfig help text clearly states.
So could you please try without this module loaded and let me know the
result?
--
Jiri Kosina
Yes! I will try it in the morning. It's now past quitting time and,
following this thread, you will note that the ohci module needed to
be loaded for this AMD unit so the keyboard now works! I will
remove the unused modules tomorrow morning and post hopefully
good news. I used the usbkbd module in a blind attempt to get
things working (I have been following a lot of suggestions).

Cheers,
Dick Johnson
Penguin : Linux version 2.6.16.24 on an i686 machine (5615.29 BogoMips).
New book: http://www.AbominableFirebug.com/
_


****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to ***@analogic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-***@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Jiri Kosina
2007-03-15 21:54:33 UTC
Permalink
Post by linux-os (Dick Johnson)
Yes! I will try it in the morning. It's now past quitting time and,
following this thread, you will note that the ohci module needed to be
loaded for this AMD unit so the keyboard now works! I will remove the
Oh I see, looks like I have been deleted from CC in the middle of the
thread, so sorry for superfluous reply. However, the fact about usbkbd
still applies - it is almost certain that you don't want to use it, and
you'd better keep it unloaded.
--
Jiri Kosina

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-***@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Loading...