# USB keyboard doesn't work under Linux

## chix4mat

Hi all: 

I have a USB keyboard that for whatever reason doesn't work under Linux, and I'm wondering if that's the ultimate rarity or more common than I might think? Up until now, I've always had a simple PS/2-based keyboard, and it has been fine, and in all of the USB keyboards I've tested, I've had a similar experience. But this one, (GIGABYTE K8100) simply refuses to work under Linux, so I'm not sure if I'm completely out of luck or not.

I booted up using the latest Gentoo and Ubuntu Live CD's on two different PCs to make sure it wasn't just this PC for some reason, but no cigar. At the same time, the board works just fine in Windows :-/

If anyone has any ideas of something I could try, I'd appreciate it!

----------

## bjlockie

Make sure USB1 (legacy) is enabled in the BIOS.

Can you boot with another keyboard and then plug the wireless transmitter in and post what dmesg shows?

Other wireless keyboards work with this same kernel?

----------

## chix4mat

Hi bjlockie: 

Thanks for the quick response  :Smile: 

Just to be clear, this isn't a wireless keyboard. I double-checked options in the BIOS, and while there are no options for legacy, the option for USB keyboard is enabled. 

Here's the dmesg:

```
usb 2-1: new high speed USB device using ehci_hcd and address 2

hub 2-1:1.0: USB hub found

hub 2-1:1.0: 4 ports detected

usb 2-1.2: new full speed USB device using ehci_hcd and address 3

generic-usb: probe of 0003:1044:7A02.0003 failed with error -22

input: HID 1044:7a02 as /devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1.2/2-1.2:1.1/input/input5

generic-usb 0003:1044:7A02.0004: input,hiddev97,hidraw2: USB HID v1.11 Mouse [HID 1044:7a02] on usb-0000:00:1d.7-1.2/input1

generic-usb 0003:1044:7A02.0005: input,hidraw3: USB HID v1.11 Device [HID 1044:7a02] on usb-0000:00:1d.7-1.2/input2

usb 2-1.4: new low speed USB device using ehci_hcd and address 4

input: KB USB Keyboard as /devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1.4/2-1.4:1.0/input/input6

generic-usb 0003:060B:2270.0006: input,hidraw4: USB HID v1.10 Keyboard [KB USB Keyboard] on usb-0000:00:1d.7-1.4/input0

generic-usb: probe of 0003:060B:2270.0007 failed with error -22
```

Is there a chance that the USB hub inside the keyboard is wiping out the keyboad functionality itself?

----------

## NeddySeagoon

chix4mat,

How old is your PC ?

 *dmesg wrote:*   

> usb 2-1.2: new full speed USB device using ehci_hcd and address 3 

 says you are trying to use Transaction Translation with the USB2 driver.

Try the USB1 driver for your hardware O/UHCI_HID and turn off Transaction Translation.

----------

## chix4mat

Hi NeddySeagoon: 

Thanks for the response!  :Very Happy: 

The PC shouldn't be the problem... it's very current. It also supports USB 3.0, and I have used such devices under Linux before without issue, so the fact that it complains about translation anything seems a little bizarre (I used this keyboard in a 2.0 port, not 3.0). I use other USB 2.0 devices no problem at all (mouse, microphone, external hard drive), so this keyboard should be a cinch. I'd hate to degrade the USB to 1.0 for obvious reasons... I use external storage a lot and it makes a massive difference.

Kernel configuration aside, I've booted up with both Gentoo and Ubuntu Live CDs and still have the problem. What does Transaction Translation do, exactly? If I disable it in the kernel, do I risk slower USB speeds? Just want to make sure before I try it since I need to reboot each time I do something in there, hehe. 

Thanks again!

----------

## NeddySeagoon

chix4mat,

You have a mix of USB 2 and USB 1.  There are two ways of coping with that.

1) the EHCI_HID driver for USB2 and the USB1 driver for your hardware

2) the EHCI_HID driver for USB2 and the Transaction Translation option to make it cope with USB1 devides.

You can mix USB1 and USB2 devices with both methods and they both run at their proper speeds.

Keyboards and mice are low speed USB devices.

The speeds are 

high speed - USB2 400Mbit/sec

full speed - USB1 12Mbit/sec

low speed -USB1 1.5Mbit/sec

Please post your /proc/bus/usb/devices with the keyboard plugged in.

----------

## chix4mat

Hi NeddySeagoon: 

You're right... it does turn out that I have a USB 1.x device (the microphone), but I'm still not sure why that's an issue. I've been using this same basic setup for ages, and it's only been this keyboard that's ever had a problem running. In addition, I tested out the same keyboard on another PC, which had nothing but a USB 2.0 mouse plugged in, and it still didn't work. 

I am not sure if this is still needed, but here's the verbatim output of /proc/bus/usb/devices:

```
T:  Bus=09 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=??  MxCh= 4

B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0

D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1

P:  Vendor=1d6b ProdID=0003 Rev= 2.06

S:  Manufacturer=Linux 2.6.34 xhci_hcd

S:  Product=xHCI Host Controller

S:  SerialNumber=0000:02:00.0

C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA

I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=12ms

T:  Bus=09 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=??  MxCh= 0

D:  Ver= 3.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  1

P:  Vendor=152d ProdID=0539 Rev= 1.00

S:  Manufacturer=JMicron

S:  Product=USB3.0 to SATA Bridge

S:  SerialNumber=DCAA0287865F

C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA

I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

E:  Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms

E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms

T:  Bus=08 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2

B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0

D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1

P:  Vendor=1d6b ProdID=0001 Rev= 2.06

S:  Manufacturer=Linux 2.6.34 uhci_hcd

S:  Product=UHCI Host Controller

S:  SerialNumber=0000:00:1d.2

C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA

I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=07 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2

B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0

D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1

P:  Vendor=1d6b ProdID=0001 Rev= 2.06

S:  Manufacturer=Linux 2.6.34 uhci_hcd

S:  Product=UHCI Host Controller

S:  SerialNumber=0000:00:1d.1

C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA

I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=06 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2

B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0

D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1

P:  Vendor=1d6b ProdID=0001 Rev= 2.06

S:  Manufacturer=Linux 2.6.34 uhci_hcd

S:  Product=UHCI Host Controller

S:  SerialNumber=0000:00:1d.0

C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA

I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=05 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2

B:  Alloc= 22/900 us ( 2%), #Int=  2, #Iso=  0

D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1

P:  Vendor=1d6b ProdID=0001 Rev= 2.06

S:  Manufacturer=Linux 2.6.34 uhci_hcd

S:  Product=UHCI Host Controller

S:  SerialNumber=0000:00:1a.2

C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA

I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=05 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0

D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=046d ProdID=c042 Rev=49.00

S:  Manufacturer=Logitech

S:  Product=USB Gaming Mouse

C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr= 98mA

I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbhid

E:  Ad=81(I) Atr=03(Int.) MxPS=  10 Ivl=1ms

I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid

E:  Ad=82(I) Atr=03(Int.) MxPS=  20 Ivl=10ms

T:  Bus=04 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2

B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0

D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1

P:  Vendor=1d6b ProdID=0001 Rev= 2.06

S:  Manufacturer=Linux 2.6.34 uhci_hcd

S:  Product=UHCI Host Controller

S:  SerialNumber=0000:00:1a.1

C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA

I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0

D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=0556 ProdID=0001 Rev= 0.01

S:  Manufacturer=AKM             

S:  Product=AK5370          

C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr= 90mA

I:* If#= 0 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=snd-usb-audio

I:* If#= 1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio

I:  If#= 1 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio

E:  Ad=81(I) Atr=01(Isoc) MxPS= 100 Ivl=1ms

T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2

B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0

D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1

P:  Vendor=1d6b ProdID=0001 Rev= 2.06

S:  Manufacturer=Linux 2.6.34 uhci_hcd

S:  Product=UHCI Host Controller

S:  SerialNumber=0000:00:1a.0

C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA

I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 6

B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0

D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1

P:  Vendor=1d6b ProdID=0002 Rev= 2.06

S:  Manufacturer=Linux 2.6.34 ehci_hcd

S:  Product=EHCI Host Controller

S:  SerialNumber=0000:00:1d.7

C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA

I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 6

B:  Alloc=  3/800 us ( 0%), #Int=  5, #Iso=  0

D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1

P:  Vendor=1d6b ProdID=0002 Rev= 2.06

S:  Manufacturer=Linux 2.6.34 ehci_hcd

S:  Product=EHCI Host Controller

S:  SerialNumber=0000:00:1a.7

C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA

I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480 MxCh= 2

D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1

P:  Vendor=0424 ProdID=2512 Rev= 0.00

C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  2mA

I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=256ms

T:  Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#=  6 Spd=480 MxCh= 4

D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=02 MxPS=64 #Cfgs=  1

P:  Vendor=0424 ProdID=2602 Rev= 0.00

C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  2mA

I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=01 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=256ms

I:* If#= 0 Alt= 1 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=02 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=256ms

T:  Bus=01 Lev=03 Prnt=06 Port=00 Cnt=01 Dev#=  9 Spd=480 MxCh= 0

D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1

P:  Vendor=0424 ProdID=2228 Rev= 5.39

S:  Manufacturer=Generic

S:  Product=Flash Card Reader

S:  SerialNumber=071031403561

C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA

I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=125us

E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  3 Spd=480 MxCh= 4

D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1

P:  Vendor=05e3 ProdID=0608 Rev=77.63

S:  Product=USB2.0 Hub

C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA

I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=256ms

T:  Bus=01 Lev=02 Prnt=03 Port=01 Cnt=01 Dev#=  7 Spd=12  MxCh= 0

D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=1044 ProdID=7a02 Rev= 0.00

C:* #Ifs= 3 Cfg#= 1 Atr=80 MxPwr=100mA

I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid

E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms

I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid

E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=1ms

I:* If#= 2 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid

E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=1ms

T:  Bus=01 Lev=02 Prnt=03 Port=03 Cnt=02 Dev#=  8 Spd=1.5 MxCh= 0

D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=060b ProdID=2270 Rev= 2.20

S:  Manufacturer=KB

S:  Product=USB Keyboard

C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=100mA

I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbhid

E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid

E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
```

I recompiled the kernel with the translation in place, and the keyboard still doesn't work (I also tried the experimental translation as well). As I mentioned before, I am using USB 3.0 devices in Linux just fine, and that's even with the USB 1.x microphone hooked up, so there's no sensible reason that this USB 2.0 keyboard shouldn't work. I am almost willing to bet that it's simply not compatible with Linux, but that it's likely the fault of the manufacturer and the way the keyboard is designed.

Thanks for the help!

----------

## NeddySeagoon

chix4mat,

To see what I see in your /proc/bus/usb/devices emerge and run usbview.

It shows all your connected USB devices in a nice tree layout.

Your keyboard, a low speed USB1 device is connected to an unpowered USB2 hub which it shares with a USB1 full speed device.

Your unpowered USB2 hub is connected to a powered USB2 hub, which also goes to another powered USB2 hub and a USB FLash card reader.

All this goes back to a USB2 port on your PC.

Big trees of devices like this are often a problem, athough you are not violating any USB rules. 

Your Microphone and Mouse are connected to their own USB1 ports on your PC. You also have a lot of spare SB1 ports.

Does the keyboard work if you plug it into the same pair of connectors as either the mouse or microphone, or even one of the spare SB1 ports?

usbview does not update in real time, move the keyboard connection and rerun usbview to see the new arangement.

----------

## chix4mat

 *NeddySeagoon wrote:*   

> Does the keyboard work if you plug it into the same pair of connectors as either the mouse or microphone, or even one of the spare SB1 ports?

 

Thanks for the heads-up on the usbview... it looks like a useful tool. Unfortunately, I think this is a lost cause. I unplugged every-single USB device except this keyboard, and it still won't work. I also plugged in a different USB keyboard, and it works fine... so more and more, I don't think this is a USB or PC issue, but rather a direct issue with this keyboard. In all my years of using Linux, I have never had a USB keyboard or mouse just not work, so I am not sure what it is with this one that causes issues.

I am not sure if this helps at all, but here's the usbview when I had everything hooked up:

http://deathspawner.net/etcetera/forums/linux/usbview_k8100.png

What it looks like to me is... the keyboard is actually acting first as a hub, and then a keyboard plugged into that hub. It feels like because of that configuration, the keyboard just can't work. Still not sure why that's the case when it works fine in Windows, though :-/

----------

## chithanh

Ensure in kernel config that you have CONFIG_EMBEDDED disabled, it allows you to toggle some USB input device quirks which are otherwise enabled by default.

----------

## idkravitz

Hm, it seems that problem with this keyboard is quite common.

I also bought this keyboard today and having same issue (while it works nicely in Windows and grub).

Also I noticed this string in dmesg:

generic-usb: probe of 0003:060B:2270.0007 failed with error -22

can't figure out how to fix it, but I have no doubts thats why keyboard not works

update:

Just found that it's not completely disabled -- sound adjusting from extra buttons (in fact a sensor panel) is working.

----------

## Josef.95

Hm, its wrong Keyboard-Mode?

See http://ubuntuforums.org/showthread.php?t=1458826

----------

