2

I'm trying to run virtual mouse driver from book "Essential Linux Device Drivers" but when I'm load this module into kernel using insmod in /var/log/Xorg.0.log I see:

[   757.212] (II) config/udev: Adding input device  (/dev/input/event10)
[   757.212] (II) No identifier specified, ignoring this device.

How can I force Xorg to don't ignoring this device? or what I must add to kernel module code?

  • Sounds like your learning how to write device drivers. In that case you should ask on Stackoverflow, not here. – Hauke Laging Jun 2 '13 at 17:42
  • 1
    The book is 5 years old, a lot of different things have changed. Just a suggestion from a tactic I used many years ago when the kernel was more in flux and how-to were out-of-date more often than not: setup the environment the authors use in a VM and make sure everything works there. Then upgrade (one at a time) kernel, X and gcc to until things break. At least that way you know where the culprit may be and search (e.g. in ChangeLogs). It takes time compiling and installing stuff, but that needs little attendance once started. – Anthon Jun 3 '13 at 4:36
0

Try replacing the below lines of code in the input device driver

set_bit(EV_REL, vms_input_dev->evbit);
set_bit(REL_X, vms_input_dev->relbit);
set_bit(REL_Y, vms_input_dev->relbit);

with

vms_input_dev->name = "Virtual Mouse";
vms_input_dev->phys = "vmd/input0"; // "vmd" is the driver's name
vms_input_dev->id.bustype = BUS_VIRTUAL;
vms_input_dev->id.vendor  = 0x0000;
vms_input_dev->id.product = 0x0000;
vms_input_dev->id.version = 0x0000;

vms_input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL);
vms_input_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_LEFT) | BIT_MASK(BTN_RIGHT) | BIT_MASK(BTN_MIDDLE);
vms_input_dev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y);
vms_input_dev->keybit[BIT_WORD(BTN_MOUSE)] |= BIT_MASK(BTN_SIDE) | BIT_MASK(BTN_EXTRA);
vms_input_dev->relbit[0] |= BIT_MASK(REL_WHEEL);

It worked for me on ubuntu 12.04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.