2

This question may be better asked on unix.stackexchange.com, but I'm asking it here because I'm quite sure someone will have an answer.

My keybaord doesn't have a driver for Linux, and I'm thinking about trying to write one as a way to learn C. I have a book but a good project is also helpful. I don't really know how to go about doing that, but thats a question for another place and time. The question I have now is what do the following error messages mean?

I get 54 of these on boot, each with a different leading number in the brackets.

[ 1.543402] hid-generic 0003:05C7:2012.0004: unknown main item tag 0x0

and then I get 1 of these:

[ 1.546827] hid-generic 0003:05C7:2012.0004: unbalanced collection at end of report description

and 1 of these :

[ 1.547479] hid-generic: probe of 0003:05C7:2012.0004 failed with error -22

Can someone tell me what these mean? I know for a fact it's my keyboard. The messages go away when I unplug it.

Jonathan
  • 121

1 Answers1

1

I apologize for spoiling your fun, but it does not sound like a good project. For one thing, there is this Launchpad bug report which sounds very similar to yours indeed. Second, there is a possible solution on the ever helpful Arch Linux wiki: it is recommended that you enable EHCI Hand-off in your BIOS settings.

If it is indeed a bug, or a misconfiguration of the BIOS settings, it is hardly a matter to be solved by writing a good driver. My personal inclination is that it is a matter of BIOS setting (will you let me know?) because this German fellow reports using exactly your generic keyboard without a hitch in 2006. He displays the output of

cat /proc/bus/input/devices
.......
I: Bus=0003 Vendor=05c7 Product=2012 Version=0001
N: Name="Generic USB K/B"

which is exactly your keyboard as reported by

[    1.543402] hid-generic 0003:05C7:2012.0004: unknown main item tag 0x0

As for the meaning of the error messages, I can help you only partially: hid-generic is a driver for HID-compatible peripherals. HID (=Human Interface Device) is a protocol for the specification of input/output devices assuring compatibility of components across different computers. You can find a good intro to HID here.

You were searching for an (advanced!) C project: you may then hunt down the error messages you find in the code of the hid-generic driver I referenced above. I am too lazy to do it myself.

MariusMatutiae
  • 48,517
  • 12
  • 86
  • 136