[FYI] Accessing usb mouse by /dev/usb/hiddev0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Readers,

two weeks before I compiled my first XFree86 on a "linux from scratch"
system on an i686 architecture with kernel 2.4.26. I didn't get an
Optical USB Mouse running. Searching for days in the net I didn't find a
solution, only the same problem often described.

Sorry, if there is a solution and I'm only to stupid to find. But if there isn't something maybe I can help others by sharing my experience.

OK, here a code snippet from my XF86Config:

Section "InputDevice"
	Identifier  "OptMouse"
	Driver      "mouse"
 	Option      "CorePointer"     "true"
	Option	    "Device"          "/dev/mouse"
	Option	    "Protocol"        "ImPS/2"
	...
EndSection

And here the output of "insmod hid" - important for the solution:

grmpf kernel: usb.c: registered new driver hiddev
grmpf kernel: usb.c: registered new driver hid
grmpf kernel: usb-uhci.c: interrupt, status 3, frame# 1242
grmpf kernel: hiddev0: USB HID v1.00 Mouse [Microsoft Microsoft
IntelliMouse® Optical] on usb1:2.0
grmpf kernel: hid-core.c: v1.8.1 Andreas Gal, Vojtech Pavlik
grmpf kernel: hid-core.c: USB HID support drivers

Note: "input" was compiled in the kernel and not as module. All other
modules were also compiled and loaded correctly. It was really double
checked a lot. But the mouse didn't work.

After reading $KERNELSRC/Documentation/usb/hiddev.txt nobody should get
the idea
- to rmmod all usb related modules
- to issue a "mknod /dev/usb/hiddev0 c 180 96"
- to insmod all usb related modules
- to issue a "cat /dev/usb/hiddev0"

But I did and was really happy after moving the mouse to got some
garbage output on my screen.

I changed my XF86Config:

Section "InputDevice"
	...
	Option	    "Device"          "/dev/usb/hiddev0"
	...
EndSection

After starting XFree the mouse cursor was moving ... not as expected,
only from the middle of the screen to the left down screen corner
independently what I did. But it was moving.

(Today I found a posting in a german forum from people who figured out
the same: http://www.linuxforen.de/forums/showthread.php?t=130539 )

After this findings I changed the USB configuration of my kernel
and took *absolutly* care that:
/dev/hiddev raw HID device support (CONFIG_USB_HIDDEV) is set to *[N]*:

USB Human Interface Device (full HID) support (CONFIG_USB_HID) [M/n/?]
  HID input layer support (CONFIG_USB_HIDINPUT) [Y/n/?]
  /dev/hiddev raw HID device support (CONFIG_USB_HIDDEV) [N/y/?]

I recompiled the kernel, installed it, rebooted the machine and studied
the output of "insmod hid" in my logfiles:

grmpf kernel: usb.c: registered new driver hid
grmpf kernel: usb-uhci.c: interrupt, status 3, frame# 311
grmpf kernel: input: USB HID v1.00 Mouse [Microsoft Microsoft
IntelliMouse® Optical] on usb1:2.0
grmpf kernel: hid-core.c: v1.8.1 Andreas Gal, Vojtech Pavlik
<vojtech@xxxxxxx>
grmpf kernel: hid-core.c: USB HID support drivers

Of course, when recompiling the kernel I removed "input" from the kernel
and compiled it as a module.
(But I think this has no influence to the problem and related solution.
Searching google with: "hiddev0: USB HID"+Mouse will bring a lot of
results with lines from logfiles like:
... input0,hiddev0: USB HID v1.00 Mouse ... and related complains.)

And yes, with:

Section "InputDevice"
	...
	Option	    "Device"          "/dev/mouse"
	...
EndSection

XFree and mouse worked fine after these changes on my system.

So that was my way to make the things working. Hope that helps anybody
out there.

Additional remarks
==================
The behaviour described above seems not i86 specific. There are also
complains from Suse-Sparc users. When I was searching two weeks before I
got the impression that complaining started with a 2.4.19-preXY kernel.
(READ: http://www.cs.helsinki.fi/linux/linux-kernel/2002-34/1217.html -
Maybe brings an other aspects of a solution to our focus).
But today I found a complain about a 2.4.18 kernel. It could be simple a
social behaviour that 2.4.18 isn't found so often with this problem. In
2.4.18 the hiddev module was in an experimental state and the help said:
"If unsure, say N.". In 2.4.26 nothing is mentioned about "Experimental"
and the help says: "If unsure, say Y.". ;-)

HTH & Best Regards
Andreas Woitzick

_______________________________________________
XFree86 mailing list
XFree86@xxxxxxxxxxx
http://XFree86.Org/mailman/listinfo/xfree86

[Index of Archives]     [X Forum]     [Xorg]     [XFree86 Newbie]     [IETF Announce]     [Security]     [Font Config]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux Kernel]

  Powered by Linux