X11 mouse driver and USB mouse disconnection

Robert Noland rnoland at FreeBSD.org
Wed Mar 18 19:54:23 PDT 2009


On Wed, 2009-03-18 at 20:36 -0400, Scott Spare wrote:
> Under FreeBSD 7.1 STABLE and XOrg, it looks like there's trouble with the
> handling of USB mouse disconnections  (e.g. when a KVM switch is used.)
> These problems only occur when Xorg / x11 is running and selected via the
> virtual TTY (i.e. ALT-F9).
> 
> Expected behavior: the mouse resumes working even if physically
> disconnected.
> Actual behavior:  the mouse stops working if disconnected and reconnected.
> 
> Remedy / Workaround: switch to one of the console-based virtual TTYs, then
> switch back to the virtual TTY that runs XOrg.
> 
> Other information:
> -This problem occurs regardless of whether moused is running.
> -This problem was tested with a Logitech Mx518 optical mouse, and XOrg 7_3.2
> 
> -Virtual TTY0 (ALT-F1) displays the following each time the mouse is
> disconnected and reconnected:
> ums0: at ubub 1 port 4 (addr5) disconnected
> ums0: detatched.
> 
> -Upon reconnection, it displays the following:
> ums0: <Logitech USB-PS/2 Optical Mouse, Class 0/0, rev 2.00/22.00, addr5> on
> uhub 1
> ums0: 8 buttons and Z dir
> 
> How to replicate:
> Presumably, disconnect and reconnect any USB mouse while X11 is running.
> The mouse will stop responding.
> Alternatively: use a Logitech Mx518 mouse with XOrg 7_3.2.
> 
> Would wiring down the mouse in device.hints have any effect?
> Is this a lower level issue?
> Can anyone comment??

Actually, I'm pretty sure that you aren't running hald... So, here is my
theory on what is happening...

moused:
With usb mice, moused is started via the moused_non_default bits in
rc.conf... X starts up, finds the mouse on /dev/sysmouse and things are
good.  When the disconnect event occurs, moused exits and ums
disappears.  When this happens Xorg loses /dev/sysmouse and there is
nothing to tell it that the mouse has been plugged back in and that it
should try to open it again.  That is hald's job...

moused_non_default="NO":
Pretty much the same story, /dev/ums0 vaporizes and nothing is there to
tell X when it has returned.

Particularly for your situation, I would not disable AutoAddDevices or
AllowEmptyInput.  At the very least, you need AutoAddDevices at its
default value and hald running.

robert.

> Best regards,
> Scott
> _______________________________________________
> freebsd-x11 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-x11
> To unsubscribe, send any mail to "freebsd-x11-unsubscribe at freebsd.org"
-- 
Robert Noland <rnoland at FreeBSD.org>
FreeBSD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-x11/attachments/20090319/16019f31/attachment.pgp


More information about the freebsd-x11 mailing list