My keyboard doesn't have a Linux driver, can someone tell me what these error messages mean?

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

Posted 2015-11-25T18:00:08.240

Reputation: 121

1

You might find useful information regarding the probe error here: http://stackoverflow.com/questions/7199827/linux-usb-device-driver-not-getting-probed. Depending on your programming experience, learning C by developing a Linux driver is going to be tough. I recommend learning the basics of C in userland, then move to driver development.

– user5071535 – 2015-11-25T18:12:50.690

Answers

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

Posted 2015-11-25T18:00:08.240

Reputation: 41 321

Thanks for the advice. I looked in my BIOS and didn't find that option. I'm going to do some googling, but I'm wondering if my ASROCK bios doesn't have that option. If not, I can live with the errors. – Jonathan – 2015-11-26T04:52:01.757