From owner-freebsd-x11@FreeBSD.ORG Thu Mar 19 02:54:23 2009 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A82AB1065673 for ; Thu, 19 Mar 2009 02:54:23 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from gizmo.2hip.net (gizmo.2hip.net [64.74.207.195]) by mx1.freebsd.org (Postfix) with ESMTP id 6E24F8FC17 for ; Thu, 19 Mar 2009 02:54:23 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from [192.168.1.156] (adsl-19-214-182.bna.bellsouth.net [68.19.214.182]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id n2J2r1GL075852 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 18 Mar 2009 22:53:01 -0400 (EDT) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: Scott Spare In-Reply-To: References: Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-biwfZJXdl4ZbvGJsPtj9" Organization: FreeBSD Date: Wed, 18 Mar 2009 21:54:06 -0500 Message-Id: <1237431246.1738.71.camel@balrog.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.24.5 FreeBSD GNOME Team Port X-Spam-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RDNS_DYNAMIC autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gizmo.2hip.net Cc: freebsd-x11@freebsd.org Subject: Re: X11 mouse driver and USB mouse disconnection X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Mar 2009 02:54:23 -0000 --=-biwfZJXdl4ZbvGJsPtj9 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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). >=20 > Expected behavior: the mouse resumes working even if physically > disconnected. > Actual behavior: the mouse stops working if disconnected and reconnected= . >=20 > Remedy / Workaround: switch to one of the console-based virtual TTYs, the= n > switch back to the virtual TTY that runs XOrg. >=20 > 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 >=20 > -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. >=20 > -Upon reconnection, it displays the following: > ums0: = on > uhub 1 > ums0: 8 buttons and Z dir >=20 > 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. >=20 > 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=3D"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@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-x11 > To unsubscribe, send any mail to "freebsd-x11-unsubscribe@freebsd.org" --=20 Robert Noland FreeBSD --=-biwfZJXdl4ZbvGJsPtj9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEABECAAYFAknBs84ACgkQM4TrQ4qfROOz4QCfbZy+0pQagR2ef7Nkz8+sS2P4 mWsAn2Gf9+NA1upTkOubyA5e3JFyShgS =dl3W -----END PGP SIGNATURE----- --=-biwfZJXdl4ZbvGJsPtj9--