"Find Similar Threads" found 2 nice threads 4-5 years old with 4 replies between them, and no conclusion.
This is Xorg 6.9 (Slackware 11 default) and current kernel is 2.6.25.1.
The USB mouse/kbd thingy is a PS2 Wireless job made by GE, with its base-station connected to USB thru a PS2->USB adapter.
My motherboards USB controller identifies at startup as a 8-port HUB as you will see below in /log/messages.
NOTE that regardless which kbd/mouse set I have connected to the adapter (the wireless OR my usual one), this thread applies equally.
Here goes:
Previously, on 2.6.24.4, the USB mouse and keyboard just worked, all the time, in VT console (kbd only because of GPM) or on the desktop. I had not configured either of them in xorg.conf, I just connected them and away I went. Right from boot/login, they just worked.
Now, I have lately spent significant time trying to configure the silly things (wireless USB mouse & kbd) in xorg.conf because they are no longer working since 2.6.25.x, and one day I decide what the heck, unplug them and plug them back in.. And voila, stupid things work as they used to, still with no xorg.configuration of them.
1st question: WHY is this?
Now, AFAIK, my kernel build has the same USB config options going on, as I don't generally change anything there when rebuilding.
On to part 2:
Let's say I want to configure the mouse & kbd explicitly in xorg.conf. How to go about it?
For the most part, I have discovered that whatever I put into xorg.conf in reference to this mouse & kbd either does nothing at all, OR it hangs X &/or the desktop &/or the machine. None of the usual friendly ways of killing the hang (or X) works, but I can usually get out by hitting the power button (which IS set up via acpid to shut off the machine, and it works cleanly to shut down-- unlike the da*ned reset button).
This hang/lockup happens primarily if I try to use the "evdev" driver on what I believe is the second mouse device (/dev/input/something), combined with the "AlwaysCore" option.
Without this magic combination of options that hangs the machine, there is simply no change in either detection or function of the mouse/kbd, except that when it doesn't work (which is usually), I see in the xorg.0.log that the second mouse was detected/identified as a keyboard. Grr..
For help, I have mostly consulted what is often a very helpful www place for stuff like this: The Gentoo Wiki's Advanced Mouse Configuration. Unfortunately, the description there of how to go about what I want to do is not really intuitive, particularly when it came to the EVDEV configuration.
The reason I want to use EVDEV is, AFAIK, it would allow for seamlessly operating the USB mouse (and kbd I guess) in cases when it happens to be/get connected to a different port some day, without me having to go through this rubbish of figuring out where the heck it is in /dev.
THEIR FIRST EXAMPLE showed how to use EVDEV the "old" way, by telling the X server to use Driver "evdev" and Device "/dev/<you-need-the-right-device-here>" which is not working for me for two reasons:
1) experimenting with evdev is hanging my machine leaving me nowhere;
and
2) I am not sure what the correct /dev node IS for this mouse and kbd (yes, the mouse and keyboard appear as ONE device with two pieces, AFAICT, yet they seem to work properly when they do work.)
2nd question: Incidentally, what is the /dev node for the FIRST keyboard on the PS2 port? Anyone know? Is there one?
THEIR SECOND EXAMPLE told me how to use evdev the "way evdev was indended to be used" which I suppose is supposed to be dynamic?? As before in their FIRST EXAMPLE above, they used Driver "evdev" but then went on to include a bunch of cryptic Options with no explanation, and stated that it would work.
I did not try the 'cryptic options method', because whether they work or not, I would like to know what they mean, where they got them, and WHY they work. Surely the cryptic options are not the exact same on everyones machine??
OK, I think that's enough questioning for now.. Here's some reference material:
First, some stuff from /proc when the USB devices are connected (this stuff is identical whether the USB stuff is connected but NOT working, or if I have unplugged it and reconnected it):
Code:
cat /proc/bus/usb/devices:
<-- snip -->
T: Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=1.5 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=13ba ProdID=0017 Rev= 0.01
S: Product=Generic USB K/B
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=24ms
I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbhid
E: Ad=82(I) Atr=03(Int.) MxPS= 5 Ivl=10ms
,-- snip -->
cat /proc/bus/input/devices:
I: Bus=0003 Vendor=13ba Product=0017 Version=0110
N: Name="Generic USB K/B"
P: Phys=usb-0000:00:0b.0-2/input0
S: Sysfs=/class/input/input4
U: Uniq=
H: Handlers=kbd event4
B: EV=120013
B: KEY=10000 7 ff9f207a c14057ff febeffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=1f
I: Bus=0003 Vendor=13ba Product=0017 Version=0110
N: Name="Generic USB K/B"
P: Phys=usb-0000:00:0b.0-2/input1
S: Sysfs=/class/input/input5
U: Uniq=
H: Handlers=kbd mouse1 event5
B: EV=17
B: KEY=7001f 0 0 0 c000 100000 0 0 0
B: REL=103
B: MSC=10
cat /proc/bus/input/handlers:
N: Number=0 Name=kbd
N: Number=1 Name=mousedev Minor=32
N: Number=2 Name=evdev Minor=64
Here's snippets of /var/log/messages (with my comments added), showing bootup messages, and later, me unplugging and reconnecting the USB thingy:
Code:
# Bootup USB stuff:
Jul 8 13:07:48 darkstarssi kernel: ACPI: PCI Interrupt 0000:00:0b.1[B] -> Link [LUB2] -> GSI 20 (level, low) -> IRQ 20
Jul 8 13:07:48 darkstarssi kernel: ehci_hcd 0000:00:0b.1: EHCI Host Controller
Jul 8 13:07:48 darkstarssi kernel: ehci_hcd 0000:00:0b.1: new USB bus registered, assigned bus number 1
Jul 8 13:07:48 darkstarssi kernel: ehci_hcd 0000:00:0b.1: debug port 1
Jul 8 13:07:48 darkstarssi kernel: ehci_hcd 0000:00:0b.1: irq 20, io mem 0xf9efec00
Jul 8 13:07:48 darkstarssi kernel: ehci_hcd 0000:00:0b.1: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
Jul 8 13:07:48 darkstarssi kernel: usb usb1: configuration #1 chosen from 1 choice
Jul 8 13:07:48 darkstarssi kernel: hub 1-0:1.0: USB hub found
Jul 8 13:07:48 darkstarssi kernel: hub 1-0:1.0: 8 ports detected
Jul 8 13:07:48 darkstarssi kernel: usbcore: registered new interface driver libusual
# Here's the standard PS2 mouse/kbd ports:
Jul 8 13:07:48 darkstarssi kernel: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f03:PS2M] at 0x60,0x64 irq 1,12
Jul 8 13:07:48 darkstarssi kernel: serio: i8042 KBD port at 0x60,0x64 irq 1
Jul 8 13:07:48 darkstarssi kernel: serio: i8042 AUX port at 0x60,0x64 irq 12
Jul 8 13:07:48 darkstarssi kernel: mice: PS/2 mouse device common for all mice
Jul 8 13:07:48 darkstarssi kernel: input: AT Translated Set 2 keyboard as /class/input/input2
<-- snip -->
Jul 8 13:07:48 darkstarssi kernel: input: ImPS/2 Logitech Wheel Mouse as /class/input/input3
<-- snip -->
# continued USB detection leading to the USB mouse/kbd identification:
Jul 8 13:07:48 darkstarssi kernel: ACPI: PCI Interrupt 0000:00:0b.0[A] -> Link [LUB0] -> GSI 22 (level, low) -> IRQ 22
Jul 8 13:07:48 darkstarssi kernel: ohci_hcd 0000:00:0b.0: OHCI Host Controller
Jul 8 13:07:48 darkstarssi kernel: ohci_hcd 0000:00:0b.0: new USB bus registered, assigned bus number 2
Jul 8 13:07:48 darkstarssi kernel: ohci_hcd 0000:00:0b.0: irq 22, io mem 0xf9eff000
Jul 8 13:07:48 darkstarssi kernel: usb usb2: configuration #1 chosen from 1 choice
Jul 8 13:07:48 darkstarssi kernel: hub 2-0:1.0: USB hub found
Jul 8 13:07:48 darkstarssi kernel: hub 2-0:1.0: 8 ports detected
<-- snip out some video card stuff -->
Jul 8 13:07:48 darkstarssi kernel: usb 2-2: new low speed USB device using ohci_hcd and address 2
Jul 8 13:07:48 darkstarssi kernel: usb 2-2: configuration #1 chosen from 1 choice
Jul 8 13:07:48 darkstarssi kernel: usbcore: registered new interface driver hiddev
Jul 8 13:07:48 darkstarssi kernel: input: Generic USB K/B as /class/input/input4
Jul 8 13:07:48 darkstarssi kernel: input,hidraw0: USB HID v1.10 Keyboard [Generic USB K/B] on usb-0000:00:0b.0-2
Jul 8 13:07:48 darkstarssi kernel: input: Generic USB K/B as /class/input/input5
Jul 8 13:07:48 darkstarssi kernel: input,hidraw1: USB HID v1.10 Mouse [Generic USB K/B] on usb-0000:00:0b.0-2
Jul 8 13:07:48 darkstarssi kernel: usbcore: registered new interface driver usbhid
Jul 8 13:07:48 darkstarssi kernel: drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
<-- snip out irrelevant boot messages -->
# Here's the gpm latching onto the PS2 mouse:
Jul 8 13:07:59 darkstarssi /usr/sbin/gpm[1821]: *** info [startup.c(95)]:
Jul 8 13:07:59 darkstarssi /usr/sbin/gpm[1821]: Started gpm successfully. Entered daemon mode.
Jul 8 13:07:59 darkstarssi /usr/sbin/gpm[1821]: *** info [mice.c(1766)]:
Jul 8 13:07:59 darkstarssi /usr/sbin/gpm[1821]: imps2: Auto-detected intellimouse PS/2
<-- snip -->
# and here is me unplugging and reconnecting the USB adapter with the wireless mouse/kbd, after which it works perfectly (note the different class/input# numbers):
Jul 8 13:19:48 darkstarssi kernel: usb 2-2: USB disconnect, address 2
Jul 8 13:19:52 darkstarssi kernel: usb 2-2: new low speed USB device using ohci_hcd and address 3
Jul 8 13:19:52 darkstarssi kernel: usb 2-2: configuration #1 chosen from 1 choice
Jul 8 13:19:52 darkstarssi kernel: input: Generic USB K/B as /class/input/input6
Jul 8 13:19:52 darkstarssi kernel: input,hidraw0: USB HID v1.10 Keyboard [Generic USB K/B] on usb-0000:00:0b.0-2
Jul 8 13:19:52 darkstarssi kernel: input: Generic USB K/B as /class/input/input7
Jul 8 13:19:52 darkstarssi kernel: input,hidraw1: USB HID v1.10 Mouse [Generic USB K/B] on usb-0000:00:0b.0-2
<-- snip -->
Here's the Gentoo Wiki pages I referred to earlier:
http://www.gentoo-wiki.com/HOWTO_Evdev_Input
http://www.gentoo-wiki.com/HOWTO_Advanced_Mouse
http://www.gentoo-wiki.com/HOWTO_Second_Mouse
If anyone wants more info, of if there's something I missed or should try, please feel free!
Sasha