Re: Hot-plugging USB mice?

From: Alex Belits (abelits@phobos.illtel.denver.co.us)
Date: Mon May 01 2000 - 14:56:45 EST


On Mon, 1 May 2000, Lars Kellogg-Stedman wrote:

> I'd like to configure a laptop to work a USB mouse that is only
> occasionally (i.e., when the laptop is in the office) attached. The
> problem I'm running into is that when the mouse is unplugged, programs
> (such as gpm or X) that attempt to open the mouse device fail.
>
> Is there any way to tell the USB subsystem (the backport patch from
> 2.3.99pre6, applied to 2.2.15pre20) to leave the mouse driver connected,
> even when the mouse has been unplugged? It seems like this would solve
> most of the problems I've run into.

  I use USB input device with "mixed" mice, and X is configured to
see it as the second mouse (what in general isn't necessary, however
reflects most common configuration where a laptop has buitin
mouse/trackpad/...). AllowMouseOpenFail option is redundant -- it only
helps if for some reason X is started without USB drivers.

.config (relevant or remotely relevant options):
---8<---
CONFIG_USB=m
CONFIG_USB_UHCI=m
CONFIG_USB_UHCI_HIGH_BANDWIDTH=y
CONFIG_USB_UHCI_ALT=m
CONFIG_USB_UHCI_ALT_UNLINK_OPTIMIZE=y
CONFIG_USB_DEVICEFS=y
CONFIG_USB_PRINTER=m
CONFIG_USB_SCANNER=m
CONFIG_USB_AUDIO=m
CONFIG_USB_ACM=m
CONFIG_USB_SERIAL=m
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_VISOR=y
CONFIG_USB_SERIAL_WHITEHEAT=y
CONFIG_USB_SERIAL_FTDI_SIO=y
CONFIG_USB_SERIAL_KEYSPAN_PDA=y
CONFIG_USB_IBMCAM=m
CONFIG_USB_OV511=m
CONFIG_USB_DC2XX=m
CONFIG_USB_STORAGE=m
CONFIG_USB_STORAGE_DEBUG=y
CONFIG_USB_DABUSB=m
CONFIG_USB_RIO500=m
CONFIG_USB_HID=m
CONFIG_USB_KBD=m
CONFIG_USB_MOUSE=m
CONFIG_USB_WACOM=m
CONFIG_USB_WMFORCE=m
CONFIG_INPUT_KEYBDEV=m
CONFIG_INPUT_MOUSEDEV=m
CONFIG_INPUT_MOUSEDEV_MIX=y
CONFIG_INPUT_MOUSEDEV_DIGITIZER=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_EVDEV=m
--->8---

XF86Config (relevant sections):
---8<---
Section "ServerFlags"
    AllowMouseOpenFail
EndSection

Section "Pointer"
    Protocol "PS/2"
    Device "/dev/mouse"
    Emulate3Buttons
    Emulate3Timeout 50
EndSection

Section "Xinput"
  SubSection "Mouse"
    Protocol "IMPS/2"
    DeviceName "USB Mouse"
    Port "/dev/hidmouse0"
    Buttons 5
    ZAxisMapping 4 5
    AlwaysCore
  EndSubSection
EndSection
--->8---

ls -l /dev/hidmouse0 output:
---8<---
crw-rw-r-- 1 root root 10, 32 Mar 11 13:27 /dev/hidmouse0
--->8---

-- 
Alex

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:09 EST