# TouchPad mouse detected, but not my USB? Can I have both?

## johnnyICON

Hi, I was wondering if it is possible to have two mouses used at once? Not that it is necessary, just that when I'm at home I would like to use my USB mouse, and when I'm at school the touchpad is my only option.

Right now I am at home. Gentoo is using my TouchPad mouse, and I am not sure if it is detecting my USB mouse. When I was installing, however, it was using my USB mouse, and could not detect my TouchPad mouse.

----------

## NeddySeagoon

johnnyICON,

You may have up to 16 usb mice.

They will appear individually as /dev/input/mouse0 to mouse15

Collectively they will be /dev/input/mice

If you plug your usb mouse in and /dev/input/mouse0 does not appear, the kernel is missing some modules.

If its there, point X to /dev/input/mice in xorg.conf

It should pick up your touchpad mouse events too. If not, its a minor change to xorg.conf.

----------

## johnnyICON

Do I need to add another InputDevice section to Xorg.conf?

----------

## jdmulloy

Are you using Gentoo-Sources aka kernel 2.4 or Gentoo-Dev-Sources aka 2.6 ?

In addition are you using devfs or udev?

I would recomend 2.6 and udev as this would give you the configuration described above with all mice on one device node.

If you would like to upgrade try this link http://www.gentoo.org/doc/en/kernel-upgrade.xmlLast edited by jdmulloy on Sat Jan 01, 2005 12:46 am; edited 2 times in total

----------

## johnnyICON

Gentoo Dev Sources. I am not too sure about UDEV though.

----------

## NeddySeagoon

johnnyICON,

Maybe. Do you get the /dev/input/mouse0 come and go with plugging and unplugging your mouse. If that doesn't work, yo uhave to add some kernel modules and test first.

----------

## johnnyICON

/dev/input/mouse0 remains when unplugged.

Maybe something I should of noted though, the current mouse device I am using is in /dev/mouse. So maybe /dev/mouse corresponds to my touchpad, and /dev/input/mouse0 is my USB?

----------

## jdmulloy

http://www.gentoo.org/doc/en/udev-guide.xml

this will explain how to install and use udev.

I don't know about devfs but with udev all mice can be accessed at /dev/input/mice.

So if you use udev and configure xorg.conf you can use both at the same time.

----------

## NeddySeagoon

johnnyICON,

/dev/mouse is a symbolic link to the PS/2 mouse.

If you change your xorg.conf moust setup to use /dev/input/mice

It should pick up all the pointing devices connected. That works well if you can live with the same settings for all of them.

If not, it seperate sections in xorg.conf. Its well explained in man xorg.conf

----------

## mikkime23

i have the same problem, only, when i use dev/input/mice, startx willn not start because it cannot find my core device.

----------

## NeddySeagoon

mikkime23,

Does /dev/input/mice actually exist?

X doesn't need a mouse there to start.

----------

## mikkime23

neddy, how do i make it exist?

----------

## NeddySeagoon

mikkime23,

You need to build USB support and HID support in your kernel, or as modules.

Under USB support, choose

```
Support for Host-side USB (USB)

USB device filesystem (USB_DEVICEFS)

EHCI HCD (USB 2.0) support

OHCI HCD support or UHCI HCD (most Intel and VIA) support 

USB Human Interface Device (full HID) support

HID input layer support

```

that shoul dbe enogh for your mouse. You must only load OHCI HCD or UHCI HCD, not both.

Rebuild and reinstall your kernel. If you chose modules,

```
make modules

make modules_install 
```

is enough.

----------

## johnnyICON

Neddy, would it be worth my time using UDEV as well as jd has been suggesting?

----------

## johnnyICON

Well, no luck so far. I tried configuring my xorg.conf, but it's still not working. Take a look at what I've done, maybe I did somethign wrong.

Here is my CorePointer InputDevice Section, this being my TouchPad Mouse:

```
# **********************************************************************

# Core Pointer's InputDevice section

# **********************************************************************

Section "InputDevice"

# Identifier and driver

    Identifier "TouchPad Mouse"

    Driver "mouse"

    Option  "Protocol"     "IMPS/2"

    Option  "Device"       "/dev/mouse"

    Option  "ZAxisMapping"  "4 5"

EndSection
```

And Here is my USB mouse:

```
Section "InputDevice" 

    Identifier  "USB Mouse"

    Driver      "mouse"

    Option      "Protocol"       "IMPS/2"

    Option      "Device"         "/dev/input/mouse0"

    Option "ZAxisMapping"  "4 5"

    Option "SendCoreEvents"

EndSection
```

I've also made the proper adjustments to the ServerLayout section as you can see here:

```
    InputDevice "TouchPad Mouse"  "CorePointer"

    InputDevice "USB Mouse"  "SendCoreEvents"
```

Any suggestions?

As well, here is my kernel config forthe usb part. Did I get everything right?

```
#

# USB support

#

CONFIG_USB=y

# CONFIG_USB_DEBUG is not set

#

# Miscellaneous USB options

#

CONFIG_USB_DEVICEFS=y

# CONFIG_USB_BANDWIDTH is not set

# CONFIG_USB_DYNAMIC_MINORS is not set

# CONFIG_USB_SUSPEND is not set

# CONFIG_USB_OTG is not set

#

# USB Host Controller Drivers

#

CONFIG_USB_EHCI_HCD=y

# CONFIG_USB_EHCI_SPLIT_ISO is not set

# CONFIG_USB_EHCI_ROOT_HUB_TT is not set

# CONFIG_USB_OHCI_HCD is not set

CONFIG_USB_UHCI_HCD=y

#

# USB Device Class drivers

#

# CONFIG_USB_AUDIO is not set

# CONFIG_USB_BLUETOOTH_TTY is not set

# CONFIG_USB_MIDI is not set

# CONFIG_USB_ACM is not set

CONFIG_USB_PRINTER=y

CONFIG_USB_STORAGE=y

# CONFIG_USB_STORAGE_DEBUG is not set

# CONFIG_USB_STORAGE_RW_DETECT is not set

# CONFIG_USB_STORAGE_DATAFAB is not set

# CONFIG_USB_STORAGE_FREECOM is not set

# CONFIG_USB_STORAGE_ISD200 is not set

# CONFIG_USB_STORAGE_DPCM is not set

# CONFIG_USB_STORAGE_HP8200e is not set

# CONFIG_USB_STORAGE_SDDR09 is not set

# CONFIG_USB_STORAGE_SDDR55 is not set

# CONFIG_USB_STORAGE_JUMPSHOT is not set

#

# USB Human Interface Devices (HID)

#

CONFIG_USB_HID=y

CONFIG_USB_HIDINPUT=y

# CONFIG_HID_FF is not set

# CONFIG_USB_HIDDEV is not set

# CONFIG_USB_AIPTEK is not set

# CONFIG_USB_WACOM is not set

# CONFIG_USB_KBTAB is not set

# CONFIG_USB_POWERMATE is not set

# CONFIG_USB_MTOUCH is not set

CONFIG_USB_EGALAX=m

# CONFIG_USB_XPAD is not set

# CONFIG_USB_ATI_REMOTE is not set

#

# USB Imaging devices

#

# CONFIG_USB_MDC800 is not set

# CONFIG_USB_MICROTEK is not set

# CONFIG_USB_HPUSBSCSI is not set

#

# USB Multimedia devices

#

# CONFIG_USB_DABUSB is not set

#

# Video4Linux support is needed for USB Multimedia device support

#

#

# USB Network adaptors

#

# CONFIG_USB_CATC is not set

# CONFIG_USB_KAWETH is not set

# CONFIG_USB_PEGASUS is not set

# CONFIG_USB_RTL8150 is not set

# CONFIG_USB_USBNET is not set

#

# USB port drivers

#

# CONFIG_USB_USS720 is not set

#

# USB Serial Converter support

#

# CONFIG_USB_SERIAL is not set

#

# USB Miscellaneous drivers

#

# CONFIG_USB_EMI62 is not set

# CONFIG_USB_EMI26 is not set

# CONFIG_USB_TIGL is not set

# CONFIG_USB_AUERSWALD is not set

# CONFIG_USB_RIO500 is not set

# CONFIG_USB_LEGOTOWER is not set

# CONFIG_USB_LCD is not set

# CONFIG_USB_LED is not set

CONFIG_USB_CYTHERM=m

CONFIG_USB_PHIDGETSERVO=m

# CONFIG_USB_TEST is not set

#

# USB Gadget Support

#

# CONFIG_USB_GADGET is not set

# CONFIG_USB_GADGET_NET2280 is not set

# CONFIG_USB_GADGET_PXA2XX is not set

# CONFIG_USB_GADGET_GOKU is not set

# CONFIG_USB_GADGET_SA1100 is not set

# CONFIG_USB_GADGET_LH7A40X is not set

# CONFIG_USB_GADGET_DUMMY_HCD is not set

# CONFIG_USB_GADGET_OMAP is not set

# CONFIG_USB_ZERO is not set

# CONFIG_USB_ETH is not set

# CONFIG_USB_GADGETFS is not set

# CONFIG_USB_FILE_STORAGE is not set

# CONFIG_USB_G_SERIAL is not set
```

----------

## NeddySeagoon

johnnyICON,

udev is a different way of doing what devfs does. While your box is not working, don't risk breaking it some more. While you are investigating an issue, you need to minimise the number of variables you are dealing with. In short, not at the moment.

```
CONFIG_USB_UHCI_HCD=y 
```

Is for VIA or Intel USB 1.1 root hubs. What does lspci say about that?

You should be able to see your mouse in /proc/bus/usb/devices

```
emerge usbview
```

 if you want a pretty view. 

Looking at you xorg.conf, IMPS/2 may not be the right protocol. My MX700 uses

```
Section "InputDevice"

# Identifier and driver

    Identifier  "Mouse2"

    Driver      "mouse"

#    Option     "Protocol" "ExplorerPS/2"

    Option      "Protocol"      "Auto"

    Option "Device"      "/dev/input/mice"

# Allow Both mice to work for debugging

    Option "SendCoreEvents"

#   For the Logitech Mx700 

   Option "ZAxisMapping" "5 4"

   Option "Buttons" "7"

EndSection
```

My server layout includes

```
    InputDevice "Mouse1" "CorePointer"

    InputDevice "Mouse2"
```

but I know that there are several ways of doing it, so I'm not suggesting yours set up is wrong.

A useful test is 

```
cat /dev/input/mice
```

and see if you get rubbish when you move the mouse and operate the buttons. That shows that the events are getting out of the kernel, so the kernel is OK.

----------

## johnnyICON

Yea, my friend was helping me a bit and I got it working.

I also looked at your previous post about the UHCI and OHCI. I currently had UHCI compiled in, and as you could see, it wasn't working. So I made OHCI and UHCI both modules, re-compiled and used the OHCI Module, and viola, it works now. I still may need to configure the mouse though. 

Me and my friend found that the /dev/input/mouse0 corresponds to my touchpad as well. So my configuration for my second mouse is wrong.

Wow, I'm really enjoying this. Learning a lot.

By the way, I have a Microsoft Intelli Optical Mouse. You mentioned that IMPS/2 may not be the proper protocol, what would you suggest? And if you happen to know off the top of your head, what would be the proper configuration for a touchpad mouse? I'll do a bit of searching myself as I am sure there a lot of people who have already done this.

Right now I have 3 mouses in my /dev/input but I guess that is because I have 3 USB connections. Mouse2 corresponds to my USB, and I'm guessing that /dev/mouse will still be my touchpad.

I tried emerging usbview. It needs GTK... I don't know much but I am using KDE... 

One other thing... I was really intrigued when I read up on UDEV, should I give it a try?

----------

## NeddySeagoon

johnnyICON,

If you have a usb connected touchpad, your mouse will be mouse1

----------

## johnnyICON

Haha yea, that makes sense. Did you read my usbview question?

----------

## NeddySeagoon

johnnyICON,

You can use 

```
usbls
```

 then. You get similar info if you use the -v switch.

----------

## johnnyICON

command not found

----------

## NeddySeagoon

johnnyICON,

You need to be root. Its full name is /usr/sbin/lsusb

OOps, thats not what I posted. Sorry.

```
/usr/sbin/lsusb

Password:

Bus 003 Device 004: ID 0698:1786 Chuntex (CTX) 1300ex Monitor

Bus 003 Device 003: ID 046d:08b2 Logitech, Inc. QuickCam Pro 4000

Bus 003 Device 002: ID 0698:9999 Chuntex (CTX) VLxxxx Monitor+Hub

Bus 003 Device 001: ID 0000:0000

Bus 002 Device 004: ID 046d:c506 Logitech, Inc.

Bus 002 Device 003: ID 0443:001c Gateway, Inc.

Bus 002 Device 002: ID 0443:001d Gateway, Inc.

Bus 002 Device 001: ID 0000:0000

Bus 001 Device 001: ID 0000:0000
```

----------

## johnnyICON

ahh.. you had it the other way around  :Very Happy: 

----------

## mikkime23

thanks neddy

----------

